+/* md_patch_replacement_point **************************************************
+
+ Patch the given replacement point.
+
+*******************************************************************************/
+
+void md_patch_replacement_point(rplpoint *rp)
+{
+ u8 mcode;
+
+ /* save the current machine code */
+ mcode = *(u8*)rp->pc;
+
+ /* write the new machine code */
+ *(u8*)(rp->pc) = rp->mcode;
+
+ /* store saved mcode */
+ rp->mcode = mcode;
+
+ {
+ u1* u1ptr = rp->pc;
+ DISASSINSTR(u1ptr);
+ DISASSINSTR(u1ptr);
+ fflush(stdout);
+ }
+
+ /* flush instruction cache */
+ md_icacheflush(rp->pc,2*4);
+}
+