From d901867ed019d0d1a0d8346a3285b8919d4fcb51 Mon Sep 17 00:00:00 2001 From: twisti Date: Thu, 9 Nov 2006 15:27:03 +0000 Subject: [PATCH] * src/vm/jit/powerpc/codegen.c (codegen): Use codegen_add_branch_ref, removed opt_shownops code. (createnativestub): Likewise. * src/vm/jit/powerpc/codegen.h (PATCHER_NOPS): Added. * src/vm/jit/mips/codegen.h (PATCHER_NOPS): Removed opt_shownops check. * src/vm/jit/codegen-common.c (codegen_add_patch_ref): Check for opt_shownops, added [__POWERPC__]. --- src/vm/jit/codegen-common.c | 7 +- src/vm/jit/mips/codegen.h | 14 ++- src/vm/jit/powerpc/codegen.c | 185 +++++++++++------------------------ src/vm/jit/powerpc/codegen.h | 10 +- 4 files changed, 78 insertions(+), 138 deletions(-) diff --git a/src/vm/jit/codegen-common.c b/src/vm/jit/codegen-common.c index a13803365..d386a415c 100644 --- a/src/vm/jit/codegen-common.c +++ b/src/vm/jit/codegen-common.c @@ -48,7 +48,7 @@ memory. All functions writing values into the data area return the offset relative the begin of the code area (start of procedure). - $Id: codegen-common.c 5930 2006-11-06 21:12:52Z twisti $ + $Id: codegen-common.c 5943 2006-11-09 15:27:03Z twisti $ */ @@ -478,10 +478,11 @@ void codegen_add_patch_ref(codegendata *cd, functionptr patcher, voidptr ref, pr->next = cd->patchrefs; cd->patchrefs = pr; -#if defined(ENABLE_JIT) && defined(__MIPS__) +#if defined(ENABLE_JIT) && (defined(__MIPS__) || defined(__POWERPC__)) /* Generate NOPs for opt_shownops. */ - PATCHER_NOPS; + if (opt_shownops) + PATCHER_NOPS; #endif #if defined(ENABLE_JIT) && (defined(__I386__) || defined(__MIPS__) || defined(__X86_64__)) diff --git a/src/vm/jit/mips/codegen.h b/src/vm/jit/mips/codegen.h index 9d9a1e91e..eb5f7b06e 100644 --- a/src/vm/jit/mips/codegen.h +++ b/src/vm/jit/mips/codegen.h @@ -27,7 +27,7 @@ Authors: Andreas Krall Christian Thalinger - $Id: codegen.h 5930 2006-11-06 21:12:52Z twisti $ + $Id: codegen.h 5943 2006-11-09 15:27:03Z twisti $ */ @@ -65,13 +65,11 @@ #define PATCHER_NOPS \ do { \ - if (opt_shownops) { \ - M_NOP; \ - M_NOP; \ - M_NOP; \ - M_NOP; \ - M_NOP; \ - } \ + M_NOP; \ + M_NOP; \ + M_NOP; \ + M_NOP; \ + M_NOP; \ } while (0) #define M_INTMOVE(a,b) \ diff --git a/src/vm/jit/powerpc/codegen.c b/src/vm/jit/powerpc/codegen.c index f872a977c..4dcf1b83a 100644 --- a/src/vm/jit/powerpc/codegen.c +++ b/src/vm/jit/powerpc/codegen.c @@ -30,7 +30,7 @@ Christian Ullrich Edwin Steiner - $Id: codegen.c 5942 2006-11-09 10:52:34Z twisti $ + $Id: codegen.c 5943 2006-11-09 15:27:03Z twisti $ */ @@ -546,9 +546,6 @@ bool codegen(jitdata *jd) codegen_addpatchref(cd, PATCHER_resolve_classref_to_classinfo, cr, disp); - - if (opt_shownops) - M_NOP; } else disp = dseg_add_address(cd, iptr->sx.val.anyptr); @@ -1315,7 +1312,7 @@ bool codegen(jitdata *jd) M_FCMPU(s1, s2); M_BNAN(1); M_BEQ(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_FCMPNE: /* ..., value, value ==> ... */ @@ -1325,9 +1322,9 @@ bool codegen(jitdata *jd) s2 = emit_load_s2(jd, iptr, REG_FTMP2); M_FCMPU(s1, s2); M_BNAN(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); M_BNE(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; @@ -1338,9 +1335,9 @@ bool codegen(jitdata *jd) s2 = emit_load_s2(jd, iptr, REG_FTMP2); M_FCMPU(s1, s2); M_BNAN(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); M_BLT(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_FCMPL_GT: /* ..., value, value ==> ... */ @@ -1351,7 +1348,7 @@ bool codegen(jitdata *jd) M_FCMPU(s1, s2); M_BNAN(1); M_BGT(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_FCMPL_LE: /* ..., value, value ==> ... */ @@ -1361,9 +1358,9 @@ bool codegen(jitdata *jd) s2 = emit_load_s2(jd, iptr, REG_FTMP2); M_FCMPU(s1, s2); M_BNAN(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); M_BLE(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_FCMPL_GE: /* ..., value, value ==> ... */ @@ -1374,7 +1371,7 @@ bool codegen(jitdata *jd) M_FCMPU(s1, s2); M_BNAN(1); M_BGE(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_FCMPG_LT: /* ..., value, value ==> ... */ @@ -1385,7 +1382,7 @@ bool codegen(jitdata *jd) M_FCMPU(s1, s2); M_BNAN(1); M_BLT(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_FCMPG_GT: /* ..., value, value ==> ... */ @@ -1395,9 +1392,9 @@ bool codegen(jitdata *jd) s2 = emit_load_s2(jd, iptr, REG_FTMP2); M_FCMPU(s1, s2); M_BNAN(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); M_BGT(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_FCMPG_LE: /* ..., value, value ==> ... */ @@ -1408,7 +1405,7 @@ bool codegen(jitdata *jd) M_FCMPU(s1, s2); M_BNAN(1); M_BLE(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_FCMPG_GE: /* ..., value, value ==> ... */ @@ -1418,9 +1415,9 @@ bool codegen(jitdata *jd) s2 = emit_load_s2(jd, iptr, REG_FTMP2); M_FCMPU(s1, s2); M_BNAN(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); M_BGE(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; @@ -1647,22 +1644,15 @@ bool codegen(jitdata *jd) disp = dseg_add_unique_address(cd, uf); codegen_addpatchref(cd, PATCHER_get_putstatic, uf, disp); - - if (opt_shownops) - M_NOP; } else { fi = iptr->sx.s23.s3.fmiref->p.field; fieldtype = fi->type; disp = dseg_add_address(cd, &(fi->value)); - if (!CLASS_IS_OR_ALMOST_INITIALIZED(fi->class)) { + if (!CLASS_IS_OR_ALMOST_INITIALIZED(fi->class)) codegen_addpatchref(cd, PATCHER_initialize_class, fi->class, disp); - - if (opt_shownops) - M_NOP; - } } M_ALD(REG_ITMP1, REG_PV, disp); @@ -1700,22 +1690,15 @@ bool codegen(jitdata *jd) disp = dseg_add_unique_address(cd, uf); codegen_addpatchref(cd, PATCHER_get_putstatic, uf, disp); - - if (opt_shownops) - M_NOP; } else { fi = iptr->sx.s23.s3.fmiref->p.field; fieldtype = fi->type; disp = dseg_add_address(cd, &(fi->value)); - if (!CLASS_IS_OR_ALMOST_INITIALIZED(fi->class)) { + if (!CLASS_IS_OR_ALMOST_INITIALIZED(fi->class)) codegen_addpatchref(cd, PATCHER_initialize_class, fi->class, disp); - - if (opt_shownops) - M_NOP; - } } M_ALD(REG_ITMP1, REG_PV, disp); @@ -1755,9 +1738,6 @@ bool codegen(jitdata *jd) disp = 0; codegen_addpatchref(cd, PATCHER_get_putfield, uf, 0); - - if (opt_shownops) - M_NOP; } else { fi = iptr->sx.s23.s3.fmiref->p.field; @@ -1822,13 +1802,9 @@ bool codegen(jitdata *jd) else s2 = emit_load_s2(jd, iptr, REG_FTMP2); - if (INSTRUCTION_IS_UNRESOLVED(iptr)) { + if (INSTRUCTION_IS_UNRESOLVED(iptr)) codegen_addpatchref(cd, PATCHER_get_putfield, uf, 0); - if (opt_shownops) - M_NOP; - } - switch (fieldtype) { case TYPE_INT: M_IST(s2, s1, disp); @@ -1862,9 +1838,6 @@ bool codegen(jitdata *jd) unresolved_class *uc = iptr->sx.s23.s2.uc; codegen_addpatchref(cd, PATCHER_resolve_class, uc, 0); - - if (opt_shownops) - M_NOP; } #endif /* ENABLE_VERIFIER */ @@ -1889,14 +1862,14 @@ bool codegen(jitdata *jd) case ICMD_RET: /* ... ==> ... */ M_BR(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); ALIGNCODENOP; break; case ICMD_JSR: /* ... ==> ... */ M_BR(0); - codegen_addreference(cd, iptr->sx.s23.s3.jsrtarget.block); + codegen_add_branch_ref(cd, iptr->sx.s23.s3.jsrtarget.block); ALIGNCODENOP; break; @@ -1905,7 +1878,7 @@ bool codegen(jitdata *jd) s1 = emit_load_s1(jd, iptr, REG_ITMP1); M_TST(s1); M_BEQ(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IFNONNULL: /* ..., value ==> ... */ @@ -1913,7 +1886,7 @@ bool codegen(jitdata *jd) s1 = emit_load_s1(jd, iptr, REG_ITMP1); M_TST(s1); M_BNE(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IFLT: @@ -1950,7 +1923,7 @@ bool codegen(jitdata *jd) M_BEQ(0); break; } - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; @@ -1974,7 +1947,7 @@ bool codegen(jitdata *jd) M_OR_TST(REG_ITMP1, REG_ITMP2, REG_ITMP3); } M_BEQ(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_LLT: /* ..., value ==> ... */ @@ -1987,7 +1960,7 @@ bool codegen(jitdata *jd) else if ((iptr->sx.val.l >= 0) && (iptr->sx.val.l <= 0xffff)) { M_CMPI(s2, 0); M_BLT(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); M_BGT(2); M_CMPUI(s1, iptr->sx.val.l & 0xffff); } @@ -1995,13 +1968,13 @@ bool codegen(jitdata *jd) ICONST(REG_ITMP3, iptr->sx.val.l >> 32); M_CMP(s2, REG_ITMP3); M_BLT(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); M_BGT(3); ICONST(REG_ITMP3, iptr->sx.val.l & 0xffffffff); M_CMPU(s1, REG_ITMP3); } M_BLT(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_LLE: /* ..., value ==> ... */ @@ -2016,7 +1989,7 @@ bool codegen(jitdata *jd) if ((iptr->sx.val.l >= 0) && (iptr->sx.val.l <= 0xffff)) { M_CMPI(s2, 0); M_BLT(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); M_BGT(2); M_CMPUI(s1, iptr->sx.val.l & 0xffff); } @@ -2024,13 +1997,13 @@ bool codegen(jitdata *jd) ICONST(REG_ITMP3, iptr->sx.val.l >> 32); M_CMP(s2, REG_ITMP3); M_BLT(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); M_BGT(3); ICONST(REG_ITMP3, iptr->sx.val.l & 0xffffffff); M_CMPU(s1, REG_ITMP3); } M_BLE(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_LNE: /* ..., value ==> ... */ @@ -2053,7 +2026,7 @@ bool codegen(jitdata *jd) M_OR_TST(REG_ITMP1, REG_ITMP2, REG_ITMP3); } M_BNE(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_LGT: /* ..., value ==> ... */ @@ -2068,7 +2041,7 @@ bool codegen(jitdata *jd) if ((iptr->sx.val.l >= 0) && (iptr->sx.val.l <= 0xffff)) { M_CMPI(s2, 0); M_BGT(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); M_BLT(2); M_CMPUI(s1, iptr->sx.val.l & 0xffff); } @@ -2076,13 +2049,13 @@ bool codegen(jitdata *jd) ICONST(REG_ITMP3, iptr->sx.val.l >> 32); M_CMP(s2, REG_ITMP3); M_BGT(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); M_BLT(3); ICONST(REG_ITMP3, iptr->sx.val.l & 0xffffffff); M_CMPU(s1, REG_ITMP3); } M_BGT(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_LGE: /* ..., value ==> ... */ @@ -2096,7 +2069,7 @@ bool codegen(jitdata *jd) else if ((iptr->sx.val.l >= 0) && (iptr->sx.val.l <= 0xffff)) { M_CMPI(s2, 0); M_BGT(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); M_BLT(2); M_CMPUI(s1, iptr->sx.val.l & 0xffff); } @@ -2104,13 +2077,13 @@ bool codegen(jitdata *jd) ICONST(REG_ITMP3, iptr->sx.val.l >> 32); M_CMP(s2, REG_ITMP3); M_BGT(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); M_BLT(3); ICONST(REG_ITMP3, iptr->sx.val.l & 0xffffffff); M_CMPU(s1, REG_ITMP3); } M_BGE(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_ICMPEQ: /* ..., value, value ==> ... */ @@ -2120,7 +2093,7 @@ bool codegen(jitdata *jd) s2 = emit_load_s2(jd, iptr, REG_ITMP2); M_CMP(s1, s2); M_BEQ(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_LCMPEQ: /* ..., value, value ==> ... */ @@ -2134,7 +2107,7 @@ bool codegen(jitdata *jd) M_BNE(2); M_CMP(s1, s2); M_BEQ(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_ICMPNE: /* ..., value, value ==> ... */ @@ -2144,7 +2117,7 @@ bool codegen(jitdata *jd) s2 = emit_load_s2(jd, iptr, REG_ITMP2); M_CMP(s1, s2); M_BNE(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_LCMPNE: /* ..., value, value ==> ... */ @@ -2153,12 +2126,12 @@ bool codegen(jitdata *jd) s2 = emit_load_s2_high(jd, iptr, REG_ITMP2); M_CMP(s1, s2); M_BNE(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); s1 = emit_load_s1_low(jd, iptr, REG_ITMP1); s2 = emit_load_s2_low(jd, iptr, REG_ITMP2); M_CMP(s1, s2); M_BNE(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_ICMPLT: /* ..., value, value ==> ... */ @@ -2167,7 +2140,7 @@ bool codegen(jitdata *jd) s2 = emit_load_s2(jd, iptr, REG_ITMP2); M_CMP(s1, s2); M_BLT(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_LCMPLT: /* ..., value, value ==> ... */ @@ -2176,14 +2149,14 @@ bool codegen(jitdata *jd) s2 = emit_load_s2_high(jd, iptr, REG_ITMP2); M_CMP(s1, s2); M_BLT(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); /* load low-bits before the branch, so we know the distance */ s1 = emit_load_s1_low(jd, iptr, REG_ITMP1); s2 = emit_load_s2_low(jd, iptr, REG_ITMP2); M_BGT(2); M_CMPU(s1, s2); M_BLT(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_ICMPGT: /* ..., value, value ==> ... */ @@ -2192,7 +2165,7 @@ bool codegen(jitdata *jd) s2 = emit_load_s2(jd, iptr, REG_ITMP2); M_CMP(s1, s2); M_BGT(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_LCMPGT: /* ..., value, value ==> ... */ @@ -2201,14 +2174,14 @@ bool codegen(jitdata *jd) s2 = emit_load_s2_high(jd, iptr, REG_ITMP2); M_CMP(s1, s2); M_BGT(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); /* load low-bits before the branch, so we know the distance */ s1 = emit_load_s1_low(jd, iptr, REG_ITMP1); s2 = emit_load_s2_low(jd, iptr, REG_ITMP2); M_BLT(2); M_CMPU(s1, s2); M_BGT(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_ICMPLE: /* ..., value, value ==> ... */ @@ -2217,7 +2190,7 @@ bool codegen(jitdata *jd) s2 = emit_load_s2(jd, iptr, REG_ITMP2); M_CMP(s1, s2); M_BLE(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_LCMPLE: /* ..., value, value ==> ... */ @@ -2226,14 +2199,14 @@ bool codegen(jitdata *jd) s2 = emit_load_s2_high(jd, iptr, REG_ITMP2); M_CMP(s1, s2); M_BLT(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); /* load low-bits before the branch, so we know the distance */ s1 = emit_load_s1_low(jd, iptr, REG_ITMP1); s2 = emit_load_s2_low(jd, iptr, REG_ITMP2); M_BGT(2); M_CMPU(s1, s2); M_BLE(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_ICMPGE: /* ..., value, value ==> ... */ @@ -2242,7 +2215,7 @@ bool codegen(jitdata *jd) s2 = emit_load_s2(jd, iptr, REG_ITMP2); M_CMP(s1, s2); M_BGE(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IF_LCMPGE: /* ..., value, value ==> ... */ @@ -2251,14 +2224,14 @@ bool codegen(jitdata *jd) s2 = emit_load_s2_high(jd, iptr, REG_ITMP2); M_CMP(s1, s2); M_BGT(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); /* load low-bits before the branch, so we know the distance */ s1 = emit_load_s1_low(jd, iptr, REG_ITMP1); s2 = emit_load_s2_low(jd, iptr, REG_ITMP2); M_BLT(2); M_CMPU(s1, s2); M_BGE(0); - codegen_addreference(cd, iptr->dst.block); + codegen_add_branch_ref(cd, iptr->dst.block); break; case ICMD_IRETURN: /* ..., retvalue ==> ... */ @@ -2277,9 +2250,6 @@ bool codegen(jitdata *jd) unresolved_class *uc = iptr->sx.s23.s2.uc; codegen_addpatchref(cd, PATCHER_resolve_class, uc, 0); - - if (opt_shownops) - M_NOP; } #endif /* ENABLE_VERIFIER */ goto nowperformreturn; @@ -2413,7 +2383,7 @@ nowperformreturn: M_CMPUI(REG_ITMP1, i - 1); M_BGT(0); - codegen_addreference(cd, table[0].block); + codegen_add_branch_ref(cd, table[0].block); /* build jump table top down and use address of lowest entry */ @@ -2458,12 +2428,12 @@ nowperformreturn: M_CMP(s1, REG_ITMP2); } M_BEQ(0); - codegen_addreference(cd, lookup->target.block); + codegen_add_branch_ref(cd, lookup->target.block); lookup++; } M_BR(0); - codegen_addreference(cd, iptr->sx.s23.s3.lookupdefault.block); + codegen_add_branch_ref(cd, iptr->sx.s23.s3.lookupdefault.block); ALIGNCODENOP; break; @@ -2567,9 +2537,6 @@ gen_method: codegen_addpatchref(cd, PATCHER_invokestatic_special, um, disp); - - if (opt_shownops) - M_NOP; } else disp = dseg_add_address(cd, lm->stubroutine); @@ -2583,9 +2550,6 @@ gen_method: if (lm == NULL) { codegen_addpatchref(cd, PATCHER_invokevirtual, um, 0); - if (opt_shownops) - M_NOP; - s1 = 0; } else { @@ -2603,9 +2567,6 @@ gen_method: if (lm == NULL) { codegen_addpatchref(cd, PATCHER_invokeinterface, um, 0); - if (opt_shownops) - M_NOP; - s1 = 0; s2 = 0; } @@ -2724,9 +2685,6 @@ gen_method: iptr->sx.s23.s3.c.ref, disp); - if (opt_shownops) - M_NOP; - M_ILD(REG_ITMP2, REG_PV, disp); M_AND_IMM(REG_ITMP2, ACC_INTERFACE, REG_ITMP2); M_BEQ(s2 + 1); @@ -2740,9 +2698,6 @@ gen_method: PATCHER_checkcast_instanceof_interface, iptr->sx.s23.s3.c.ref, 0); - - if (opt_shownops) - M_NOP; } else { M_TST(s1); @@ -2774,9 +2729,6 @@ gen_method: codegen_addpatchref(cd, PATCHER_resolve_classref_to_vftbl, iptr->sx.s23.s3.c.ref, disp); - - if (opt_shownops) - M_NOP; } else { disp = dseg_add_address(cd, super->vftbl); @@ -2825,9 +2777,6 @@ gen_method: codegen_addpatchref(cd, PATCHER_resolve_classref_to_classinfo, iptr->sx.s23.s3.c.ref, disp); - - if (opt_shownops) - M_NOP; } else disp = dseg_add_address(cd, iptr->sx.s23.s3.c.cls); @@ -2912,9 +2861,6 @@ gen_method: codegen_addpatchref(cd, PATCHER_resolve_classref_to_flags, iptr->sx.s23.s3.c.ref, disp); - if (opt_shownops) - M_NOP; - M_ILD(REG_ITMP3, REG_PV, disp); M_AND_IMM(REG_ITMP3, ACC_INTERFACE, REG_ITMP3); M_BEQ(s2 + 1); @@ -2927,9 +2873,6 @@ gen_method: codegen_addpatchref(cd, PATCHER_checkcast_instanceof_interface, iptr->sx.s23.s3.c.ref, 0); - - if (opt_shownops) - M_NOP; } else { M_TST(s1); @@ -2960,9 +2903,6 @@ gen_method: codegen_addpatchref(cd, PATCHER_resolve_classref_to_vftbl, iptr->sx.s23.s3.c.ref, disp); - - if (opt_shownops) - M_NOP; } else { disp = dseg_add_address(cd, super->vftbl); @@ -3025,9 +2965,6 @@ gen_method: codegen_addpatchref(cd, PATCHER_resolve_classref_to_classinfo, iptr->sx.s23.s3.c.ref, disp); - - if (opt_shownops) - M_NOP; } else disp = dseg_add_address(cd, iptr->sx.s23.s3.c.cls); @@ -3220,12 +3157,8 @@ u1 *createnativestub(functionptr f, jitdata *jd, methoddesc *nmd) funcdisp = dseg_add_functionptr(cd, f); #if !defined(WITH_STATIC_CLASSPATH) - if (f == NULL) { + if (f == NULL) codegen_addpatchref(cd, PATCHER_resolve_native_function, m, funcdisp); - - if (opt_shownops) - M_NOP; - } #endif /* save integer and float argument registers */ diff --git a/src/vm/jit/powerpc/codegen.h b/src/vm/jit/powerpc/codegen.h index de34c9b68..8f7afe06b 100644 --- a/src/vm/jit/powerpc/codegen.h +++ b/src/vm/jit/powerpc/codegen.h @@ -30,7 +30,7 @@ Christian Thalinger Christian Ullrich - $Id: codegen.h 5942 2006-11-09 10:52:34Z twisti $ + $Id: codegen.h 5943 2006-11-09 15:27:03Z twisti $ */ @@ -109,6 +109,14 @@ } +/* some patcher defines *******************************************************/ + +#define PATCHER_NOPS \ + do { \ + M_NOP; \ + } while (0) + + /* macros to create code ******************************************************/ #define M_OP3(opcode,y,oe,rc,d,a,b) \ -- 2.25.1