Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: md.c 7571 2007-03-24 22:37:09Z twisti $
-
*/
#if defined(ENABLE_REPLACEMENT)
void md_patch_replacement_point(codeinfo *code, s4 index, rplpoint *rp, u1 *savedmcode)
{
- s4 disp;
u8 mcode;
/* XXX this is probably unsafe! */
savedmcode[4] = rp->pc[4];
/* build the machine code for the patch */
- disp = (code->replacementstubs - rp->pc)
- + index * REPLACEMENT_STUB_SIZE
- - 5;
-
- mcode = 0xe9 | ((u8) disp << 8);
+ assert(0); /* XXX build trap instruction below */
+ mcode = 0;
/* write spinning instruction */
*(u2*)(rp->pc) = 0xebfe;