From: michi Date: Wed, 18 Jul 2007 19:52:23 +0000 (+0000) Subject: * src/vm/jit/replace.h (REPLACEMENT_EMIT_STUBS): Removed macro. X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=87dead37a6ba0686c5df4f0c0784a29359ed2729;p=cacao.git * src/vm/jit/replace.h (REPLACEMENT_EMIT_STUBS): Removed macro. * src/vm/jit/emit-common.h (emit_replacement_stubs): Removed. * src/vm/jit/arm/emit.c, * src/vm/jit/arm/codegen.c, * src/vm/jit/powerpc/emit.c, * src/vm/jit/powerpc/codegen.c, * src/vm/jit/sparc64/emit.c, * src/vm/jit/sparc64/codegen.c, * src/vm/jit/alpha/emit.c, * src/vm/jit/alpha/codegen.c, * src/vm/jit/s390/emit.c, * src/vm/jit/mips/emit.c, * src/vm/jit/mips/codegen.c, * src/vm/jit/m68k/codegen.c, * src/vm/jit/powerpc64/emit.c, * src/vm/jit/powerpc64/codegen.c, * src/vm/jit/i386/emit.c, * src/vm/jit/i386/codegen.c, * src/vm/jit/x86_64/emit.c, * src/vm/jit/x86_64/codegen.c (emit_replacement_stubs): Removed. (codegen_emit): Do not create replacement stubs anymore. --- diff --git a/src/vm/jit/alpha/codegen.c b/src/vm/jit/alpha/codegen.c index c1935a866..546e7f8d3 100644 --- a/src/vm/jit/alpha/codegen.c +++ b/src/vm/jit/alpha/codegen.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: codegen.c 8186 2007-07-05 23:48:16Z michi $ + $Id: codegen.c 8211 2007-07-18 19:52:23Z michi $ */ @@ -3064,10 +3064,9 @@ gen_method: dseg_createlinenumbertable(cd); - /* generate stubs */ + /* generate traps */ emit_patcher_traps(jd); - REPLACEMENT_EMIT_STUBS(jd); /* everything's ok */ diff --git a/src/vm/jit/alpha/emit.c b/src/vm/jit/alpha/emit.c index d0e08dce3..6a9dabd3d 100644 --- a/src/vm/jit/alpha/emit.c +++ b/src/vm/jit/alpha/emit.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: emit.c 8186 2007-07-05 23:48:16Z michi $ + $Id: emit.c 8211 2007-07-18 19:52:23Z michi $ */ @@ -450,71 +450,6 @@ void emit_patcher_traps(jitdata *jd) } -/* emit_replacement_stubs ****************************************************** - - Generates the code for the replacement stubs. - -*******************************************************************************/ - -#if defined(ENABLE_REPLACEMENT) -void emit_replacement_stubs(jitdata *jd) -{ - codegendata *cd; - codeinfo *code; - rplpoint *rplp; - s4 disp; - s4 i; -#if !defined(NDEBUG) - u1 *savedmcodeptr; -#endif - - /* get required compiler data */ - - cd = jd->cd; - code = jd->code; - - rplp = code->rplpoints; - - /* store beginning of replacement stubs */ - - code->replacementstubs = (u1*) (cd->mcodeptr - cd->mcodebase); - - for (i = 0; i < code->rplpointcount; ++i, ++rplp) { - /* do not generate stubs for non-trappable points */ - - if (rplp->flags & RPLPOINT_FLAG_NOTRAP) - continue; - - /* check code segment size */ - - MCODECHECK(100); - -#if !defined(NDEBUG) - savedmcodeptr = cd->mcodeptr; -#endif - - /* create stack frame - 16-byte aligned */ - - M_LSUB_IMM(REG_SP, 2 * 8, REG_SP); - - /* push address of `rplpoint` struct */ - - disp = dseg_add_address(cd, rplp); - M_ALD(REG_ITMP3, REG_PV, disp); - M_AST(REG_ITMP3, REG_SP, 0 * 8); - - /* jump to replacement function */ - - disp = dseg_add_functionptr(cd, asm_replacement_out); - M_ALD(REG_ITMP3, REG_PV, disp); - M_JMP(REG_ZERO, REG_ITMP3); - - assert((cd->mcodeptr - savedmcodeptr) == 4*REPLACEMENT_STUB_SIZE); - } -} -#endif /* defined(ENABLE_REPLACEMENT) */ - - /* emit_verbosecall_enter ****************************************************** Generates the code for the call trace. diff --git a/src/vm/jit/arm/codegen.c b/src/vm/jit/arm/codegen.c index df3a3d6de..ddf555b12 100644 --- a/src/vm/jit/arm/codegen.c +++ b/src/vm/jit/arm/codegen.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: codegen.c 8182 2007-07-05 20:36:16Z michi $ + $Id: codegen.c 8211 2007-07-18 19:52:23Z michi $ */ @@ -2879,10 +2879,9 @@ bool codegen_emit(jitdata *jd) dseg_createlinenumbertable(cd); - /* generate stubs */ + /* generate traps */ emit_patcher_traps(jd); - REPLACEMENT_EMIT_STUBS(jd); /* everything's ok */ diff --git a/src/vm/jit/arm/emit.c b/src/vm/jit/arm/emit.c index ae658a566..2967a7872 100644 --- a/src/vm/jit/arm/emit.c +++ b/src/vm/jit/arm/emit.c @@ -604,30 +604,6 @@ void emit_patcher_traps(jitdata *jd) } -/* emit_replacement_stubs ****************************************************** - - Generates the code for the replacement stubs. - -*******************************************************************************/ - -#if defined(ENABLE_REPLACEMENT) -void emit_replacement_stubs(jitdata *jd) -{ - codegendata *cd; - codeinfo *code; - rplpoint *rplp; - u1 *savedmcodeptr; - s4 disp; - s4 i; - - /* get required compiler data */ - - cd = jd->cd; - code = jd->code; -} -#endif /* defined(ENABLE_REPLACEMENT) */ - - /* emit_verbosecall_enter ****************************************************** Generates the code for the call trace. diff --git a/src/vm/jit/emit-common.h b/src/vm/jit/emit-common.h index 2749d8ebf..99c4b7216 100644 --- a/src/vm/jit/emit-common.h +++ b/src/vm/jit/emit-common.h @@ -180,9 +180,6 @@ void emit_exception_check(codegendata *cd, instruction *iptr); void emit_patcher_stubs(jitdata *jd); void emit_patcher_traps(jitdata *jd); -#if defined(ENABLE_REPLACEMENT) -void emit_replacement_stubs(jitdata *jd); -#endif void emit_verbosecall_enter(jitdata *jd); void emit_verbosecall_exit(jitdata *jd); diff --git a/src/vm/jit/i386/codegen.c b/src/vm/jit/i386/codegen.c index 8b84a898f..908caeb6f 100644 --- a/src/vm/jit/i386/codegen.c +++ b/src/vm/jit/i386/codegen.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: codegen.c 8210 2007-07-18 12:51:00Z twisti $ + $Id: codegen.c 8211 2007-07-18 19:52:23Z michi $ */ @@ -3476,7 +3476,6 @@ gen_method: /* generate stubs */ emit_patcher_stubs(jd); - REPLACEMENT_EMIT_STUBS(jd); /* everything's ok */ diff --git a/src/vm/jit/i386/emit.c b/src/vm/jit/i386/emit.c index 3d69327cf..9c4d2d6e1 100644 --- a/src/vm/jit/i386/emit.c +++ b/src/vm/jit/i386/emit.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: emit.c 8210 2007-07-18 12:51:00Z twisti $ + $Id: emit.c 8211 2007-07-18 19:52:23Z michi $ */ @@ -576,71 +576,6 @@ void emit_patcher_stubs(jitdata *jd) } -/* emit_replacement_stubs ****************************************************** - - Generates the code for the replacement stubs. - -*******************************************************************************/ - -#if defined(ENABLE_REPLACEMENT) -void emit_replacement_stubs(jitdata *jd) -{ - codegendata *cd; - codeinfo *code; - rplpoint *rplp; - s4 i; - s4 branchmpc; - s4 outcode; - - /* get required compiler data */ - - cd = jd->cd; - code = jd->code; - - rplp = code->rplpoints; - - /* store beginning of replacement stubs */ - - code->replacementstubs = (u1*) (cd->mcodeptr - cd->mcodebase); - - for (i = 0; i < code->rplpointcount; ++i, ++rplp) { - /* do not generate stubs for non-trappable points */ - - if (rplp->flags & RPLPOINT_FLAG_NOTRAP) - continue; - - /* check code segment size */ - - MCODECHECK(512); - - /* note start of stub code */ - - outcode = (s4) (cd->mcodeptr - cd->mcodebase); - - /* push address of `rplpoint` struct */ - - M_PUSH_IMM(rplp); - - /* jump to replacement function */ - - M_PUSH_IMM(asm_replacement_out); - M_RET; - - /* add jump reference for COUNTDOWN points */ - - if (rplp->flags & RPLPOINT_FLAG_COUNTDOWN) { - - branchmpc = (s4)rplp->pc + (7 + 6); - - md_codegen_patch_branch(cd, branchmpc, (s4) outcode); - } - - assert(((cd->mcodeptr - cd->mcodebase) - outcode) == REPLACEMENT_STUB_SIZE); - } -} -#endif /* defined(ENABLE_REPLACEMENT) */ - - /* emit_verbosecall_enter ****************************************************** Generates the code for the call trace. diff --git a/src/vm/jit/m68k/codegen.c b/src/vm/jit/m68k/codegen.c index ddb1d56c3..1616268f7 100644 --- a/src/vm/jit/m68k/codegen.c +++ b/src/vm/jit/m68k/codegen.c @@ -2368,7 +2368,6 @@ nowperformreturn: /* generate stubs */ emit_patcher_stubs(jd); - REPLACEMENT_EMIT_STUBS(jd); return true; } diff --git a/src/vm/jit/mips/codegen.c b/src/vm/jit/mips/codegen.c index 6294fff94..4e3a515c2 100644 --- a/src/vm/jit/mips/codegen.c +++ b/src/vm/jit/mips/codegen.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: codegen.c 8123 2007-06-20 23:50:55Z michi $ + $Id: codegen.c 8211 2007-07-18 19:52:23Z michi $ */ @@ -3595,7 +3595,6 @@ gen_method: /* generate stubs */ emit_patcher_stubs(jd); - REPLACEMENT_EMIT_STUBS(jd); /* everything's ok */ diff --git a/src/vm/jit/mips/emit.c b/src/vm/jit/mips/emit.c index d3352fbcd..094350a33 100644 --- a/src/vm/jit/mips/emit.c +++ b/src/vm/jit/mips/emit.c @@ -743,72 +743,6 @@ void emit_patcher_stubs(jitdata *jd) } -/* emit_replacement_stubs ****************************************************** - - Generates the code for the replacement stubs. - -*******************************************************************************/ - -#if defined(ENABLE_REPLACEMENT) -void emit_replacement_stubs(jitdata *jd) -{ - codegendata *cd; - codeinfo *code; - rplpoint *rplp; - s4 disp; - s4 i; -#if !defined(NDEBUG) - u1 *savedmcodeptr; -#endif - - /* get required compiler data */ - - cd = jd->cd; - code = jd->code; - - rplp = code->rplpoints; - - /* store beginning of replacement stubs */ - - code->replacementstubs = (u1*) (cd->mcodeptr - cd->mcodebase); - - for (i = 0; i < code->rplpointcount; ++i, ++rplp) { - /* do not generate stubs for non-trappable points */ - - if (rplp->flags & RPLPOINT_FLAG_NOTRAP) - continue; - - /* check code segment size */ - - MCODECHECK(100); - -#if !defined(NDEBUG) - savedmcodeptr = cd->mcodeptr; -#endif - - /* create stack frame - 16-byte aligned */ - - M_ASUB_IMM(REG_SP, 2 * 8, REG_SP); - - /* push address of `rplpoint` struct */ - - disp = dseg_add_address(cd, rplp); - M_ALD(REG_ITMP3, REG_PV, disp); - M_AST(REG_ITMP3, REG_SP, 0 * 8); - - /* jump to replacement function */ - - disp = dseg_add_functionptr(cd, asm_replacement_out); - M_ALD(REG_ITMP3, REG_PV, disp); - M_JMP(REG_ITMP3); - M_NOP; /* delay slot */ - - assert((cd->mcodeptr - savedmcodeptr) == 4*REPLACEMENT_STUB_SIZE); - } -} -#endif /* defined(ENABLE_REPLACEMENT) */ - - /* emit_verbosecall_enter ****************************************************** Generates the code for the call trace. diff --git a/src/vm/jit/powerpc/codegen.c b/src/vm/jit/powerpc/codegen.c index a2d8feea9..7a4aeec78 100644 --- a/src/vm/jit/powerpc/codegen.c +++ b/src/vm/jit/powerpc/codegen.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: codegen.c 8196 2007-07-11 13:54:21Z twisti $ + $Id: codegen.c 8211 2007-07-18 19:52:23Z michi $ */ @@ -2918,7 +2918,6 @@ gen_method: /* generate stubs */ emit_patcher_stubs(jd); - REPLACEMENT_EMIT_STUBS(jd); /* everything's ok */ diff --git a/src/vm/jit/powerpc/emit.c b/src/vm/jit/powerpc/emit.c index 8a1001bbd..040609771 100644 --- a/src/vm/jit/powerpc/emit.c +++ b/src/vm/jit/powerpc/emit.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: emit.c 8191 2007-07-08 15:15:53Z twisti $ + $Id: emit.c 8211 2007-07-18 19:52:23Z michi $ */ @@ -618,72 +618,6 @@ void emit_patcher_stubs(jitdata *jd) } -/* emit_replacement_stubs ****************************************************** - - Generates the code for the replacement stubs. - -*******************************************************************************/ - -#if defined(ENABLE_REPLACEMENT) -void emit_replacement_stubs(jitdata *jd) -{ - codegendata *cd; - codeinfo *code; - rplpoint *rplp; - s4 disp; - s4 i; -#if !defined(NDEBUG) - u1 *savedmcodeptr; -#endif - - /* get required compiler data */ - - cd = jd->cd; - code = jd->code; - - rplp = code->rplpoints; - - /* store beginning of replacement stubs */ - - code->replacementstubs = (u1*) (cd->mcodeptr - cd->mcodebase); - - for (i = 0; i < code->rplpointcount; ++i, ++rplp) { - /* do not generate stubs for non-trappable points */ - - if (rplp->flags & RPLPOINT_FLAG_NOTRAP) - continue; - - /* check code segment size */ - - MCODECHECK(100); - -#if !defined(NDEBUG) - savedmcodeptr = cd->mcodeptr; -#endif - - /* create stack frame - keep 16-byte aligned */ - - M_AADD_IMM(REG_SP, -4 * 4, REG_SP); - - /* push address of `rplpoint` struct */ - - disp = dseg_add_address(cd, rplp); - M_ALD(REG_ITMP3, REG_PV, disp); - M_AST_INTERN(REG_ITMP3, REG_SP, 0 * 4); - - /* jump to replacement function */ - - disp = dseg_add_functionptr(cd, asm_replacement_out); - M_ALD(REG_ITMP3, REG_PV, disp); - M_MTCTR(REG_ITMP3); - M_RTS; - - assert((cd->mcodeptr - savedmcodeptr) == 4*REPLACEMENT_STUB_SIZE); - } -} -#endif /* defined(ENABLE_REPLACEMENT) */ - - /* emit_verbosecall_enter ****************************************************** Generates the code for the call trace. diff --git a/src/vm/jit/powerpc64/codegen.c b/src/vm/jit/powerpc64/codegen.c index 8e2bc2964..01919a281 100644 --- a/src/vm/jit/powerpc64/codegen.c +++ b/src/vm/jit/powerpc64/codegen.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: codegen.c 8123 2007-06-20 23:50:55Z michi $ + $Id: codegen.c 8211 2007-07-18 19:52:23Z michi $ */ @@ -2676,7 +2676,6 @@ gen_method: /* generate stubs */ emit_patcher_stubs(jd); - REPLACEMENT_EMIT_STUBS(jd); /* everything's ok */ diff --git a/src/vm/jit/powerpc64/emit.c b/src/vm/jit/powerpc64/emit.c index 4a8dc9bf6..c5c6c7ded 100644 --- a/src/vm/jit/powerpc64/emit.c +++ b/src/vm/jit/powerpc64/emit.c @@ -757,100 +757,6 @@ void emit_patcher_stubs(jitdata *jd) } -/* emit_replacement_stubs ****************************************************** - - Generates the code for the replacement stubs. - -*******************************************************************************/ - -#if defined(ENABLE_REPLACEMENT) -void emit_replacement_stubs(jitdata *jd) -{ - codegendata *cd; - codeinfo *code; - rplpoint *replacementpoint; - s4 disp; - s4 i; -#if !defined(NDEBUG) - u1 *savedmcodeptr; -#endif - - /* get required compiler data */ - - cd = jd->cd; - code = jd->code; - - replacementpoint = jd->code->rplpoints; - - for (i = 0; i < code->rplpointcount; ++i, ++replacementpoint) { - /* do not generate stubs for non-trappable points */ - - if (replacementpoint->flags & RPLPOINT_FLAG_NOTRAP) - continue; - - - /* check code segment size */ - - MCODECHECK(200); - -#if !defined(NDEBUG) - savedmcodeptr = cd->mcodeptr; -#endif - /* create stack frame - keep 16-byte aligned */ - - M_AADD_IMM(REG_SP, -4 * 8, REG_SP); - - /* push address of `rplpoint` struct */ - - disp = dseg_add_address(cd, replacementpoint); - M_ALD(REG_ITMP3, REG_PV, disp); - M_AST_INTERN(REG_ITMP3, REG_SP, 0 * 8); - - /* jump to replacement function */ - - disp = dseg_add_functionptr(cd, asm_replacement_out); - M_ALD(REG_ITMP3, REG_PV, disp); - M_MTCTR(REG_ITMP3); - M_RTS; - - assert((cd->mcodeptr - savedmcodeptr) == 4*REPLACEMENT_STUB_SIZE); - -#if 0 - /* note start of stub code */ - - replacementpoint->outcode = (u1 *) (cd->mcodeptr - cd->mcodebase); - - /* make machine code for patching */ - - savedmcodeptr = cd->mcodeptr; - cd->mcodeptr = (u1 *) &(replacementpoint->mcode) + 1 /* big-endian */; - - disp = (ptrint)((s4*)replacementpoint->outcode - (s4*)replacementpoint->pc) - 1; - M_BR(disp); - - cd->mcodeptr = savedmcodeptr; - - /* create stack frame - keep 16-byte aligned */ - - M_AADD_IMM(REG_SP, -4 * 4, REG_SP); - - /* push address of `rplpoint` struct */ - - disp = dseg_add_unique_address(cd, replacementpoint); - M_ALD(REG_ITMP3, REG_PV, disp); - M_AST_INTERN(REG_ITMP3, REG_SP, 0 * 4); - - /* jump to replacement function */ - - disp = dseg_add_functionptr(cd, asm_replacement_out); - M_ALD(REG_ITMP3, REG_PV, disp); - M_MTCTR(REG_ITMP3); - M_RTS; -#endif - } -} -#endif /* define(ENABLE_REPLACEMENT) */ - /* * These are local overrides for various environment variables in Emacs. * Please do not remove this and leave it at the end of the file, where diff --git a/src/vm/jit/replace.h b/src/vm/jit/replace.h index dd3e32bc3..51714d646 100644 --- a/src/vm/jit/replace.h +++ b/src/vm/jit/replace.h @@ -45,7 +45,6 @@ #define REPLACEMENT_POINT_RETURN(cd, iptr) #define REPLACEMENT_POINT_INVOKE(cd, iptr) #define REPLACEMENT_POINT_INVOKE_RETURN(cd, iptr) -#define REPLACEMENT_EMIT_STUBS(jd) #else /* defined(ENABLE_REPLACEMENT) */ @@ -272,9 +271,6 @@ struct replace_safestack_t { cd->replacementpoint[-1].callsize = (cd->mcodeptr - cd->mcodebase)\ - (ptrint) cd->replacementpoint[-1].pc; -#define REPLACEMENT_EMIT_STUBS(jd) \ - emit_replacement_stubs(jd); - /*** prototypes ********************************************************/ bool replace_create_replacement_points(jitdata *jd); diff --git a/src/vm/jit/s390/emit.c b/src/vm/jit/s390/emit.c index a6bb47f95..e2becf830 100644 --- a/src/vm/jit/s390/emit.c +++ b/src/vm/jit/s390/emit.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: emit.c 8123 2007-06-20 23:50:55Z michi $ + $Id: emit.c 8211 2007-07-18 19:52:23Z michi $ */ @@ -363,57 +363,6 @@ __PORTED__ void emit_patcher_stubs(jitdata *jd) } -/* emit_replacement_stubs ****************************************************** - - Generates the code for the replacement stubs. - -*******************************************************************************/ - -void emit_replacement_stubs(jitdata *jd) -{ -#if 0 - codegendata *cd; - codeinfo *code; - rplpoint *rplp; - s4 disp; - s4 i; - - /* get required compiler data */ - - cd = jd->cd; - code = jd->code; - - rplp = code->rplpoints; - - for (i = 0; i < code->rplpointcount; ++i, ++rplp) { - /* check code segment size */ - - MCODECHECK(512); - - /* note start of stub code */ - - rplp->outcode = (u1 *) (ptrint) (cd->mcodeptr - cd->mcodebase); - - /* make machine code for patching */ - - disp = (ptrint) (rplp->outcode - rplp->pc) - 5; - - rplp->mcode = 0xe9 | ((u8) disp << 8); - - /* push address of `rplpoint` struct */ - - M_MOV_IMM(rplp, REG_ITMP3); - M_PUSH(REG_ITMP3); - - /* jump to replacement function */ - - M_MOV_IMM(asm_replacement_out, REG_ITMP3); - M_JMP(REG_ITMP3); - } -#endif -} - - /* emit_verbosecall_enter ****************************************************** Generates the code for the call trace. diff --git a/src/vm/jit/sparc64/codegen.c b/src/vm/jit/sparc64/codegen.c index e1bbb3ada..1ba11be83 100644 --- a/src/vm/jit/sparc64/codegen.c +++ b/src/vm/jit/sparc64/codegen.c @@ -3007,7 +3007,6 @@ gen_method: /* generate stubs */ emit_patcher_stubs(jd); - REPLACEMENT_EMIT_STUBS(jd); /* everything's ok */ diff --git a/src/vm/jit/sparc64/emit.c b/src/vm/jit/sparc64/emit.c index 118eaad40..c89716dc8 100644 --- a/src/vm/jit/sparc64/emit.c +++ b/src/vm/jit/sparc64/emit.c @@ -682,18 +682,6 @@ void emit_patcher_stubs(jitdata *jd) } -/* emit_replacement_stubs ****************************************************** - - Generates the code for the replacement stubs. - -*******************************************************************************/ - -#if defined(ENABLE_REPLACEMENT) -void emit_replacement_stubs(jitdata *jd) -{ -} -#endif /* defined(ENABLE_REPLACEMENT) */ - /* emit_verbosecall_enter ****************************************************** Generates the code for the call trace. diff --git a/src/vm/jit/x86_64/codegen.c b/src/vm/jit/x86_64/codegen.c index 0f460a7c2..7c0b5650c 100644 --- a/src/vm/jit/x86_64/codegen.c +++ b/src/vm/jit/x86_64/codegen.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: codegen.c 8115 2007-06-20 19:14:05Z michi $ + $Id: codegen.c 8211 2007-07-18 19:52:23Z michi $ */ @@ -2887,7 +2887,6 @@ gen_method: /* generate stubs */ emit_patcher_stubs(jd); - REPLACEMENT_EMIT_STUBS(jd); /* everything's ok */ diff --git a/src/vm/jit/x86_64/emit.c b/src/vm/jit/x86_64/emit.c index 356590e3c..91d550681 100644 --- a/src/vm/jit/x86_64/emit.c +++ b/src/vm/jit/x86_64/emit.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: emit.c 8123 2007-06-20 23:50:55Z michi $ + $Id: emit.c 8211 2007-07-18 19:52:23Z michi $ */ @@ -507,67 +507,6 @@ void emit_patcher_stubs(jitdata *jd) } -/* emit_replacement_stubs ****************************************************** - - Generates the code for the replacement stubs. - -*******************************************************************************/ - -#if defined(ENABLE_REPLACEMENT) -void emit_replacement_stubs(jitdata *jd) -{ - codegendata *cd; - codeinfo *code; - rplpoint *rplp; - s4 i; -#if !defined(NDEBUG) - u1 *savedmcodeptr; -#endif - - /* get required compiler data */ - - cd = jd->cd; - code = jd->code; - - rplp = code->rplpoints; - - /* store beginning of replacement stubs */ - - code->replacementstubs = (u1*) (cd->mcodeptr - cd->mcodebase); - - for (i = 0; i < code->rplpointcount; ++i, ++rplp) { - /* do not generate stubs for non-trappable points */ - - if (rplp->flags & RPLPOINT_FLAG_NOTRAP) - continue; - - /* check code segment size */ - - MCODECHECK(512); - - /* note start of stub code */ - -#if !defined(NDEBUG) - savedmcodeptr = cd->mcodeptr; -#endif - - /* push address of `rplpoint` struct */ - - M_MOV_IMM(rplp, REG_ITMP3); - M_PUSH(REG_ITMP3); - - /* jump to replacement function */ - - M_MOV_IMM(asm_replacement_out, REG_ITMP3); - M_PUSH(REG_ITMP3); - M_RET; - - assert((cd->mcodeptr - savedmcodeptr) == REPLACEMENT_STUB_SIZE); - } -} -#endif /* defined(ENABLE_REPLACEMENT) */ - - /* emit_verbosecall_enter ****************************************************** Generates the code for the call trace.