From c7431d7f18454f101cd6a64df2d12057cdd8aaa5 Mon Sep 17 00:00:00 2001 From: michi Date: Sun, 15 Apr 2007 00:38:00 +0000 Subject: [PATCH] Merged revisions 7693-7700 via svnmerge from svn+ssh://michi@c1.complang.tuwien.ac.at/ahome/cacao/svn/cacao/trunk ........ r7694 | tbfg | 2007-04-12 17:35:13 +0200 (Thu, 12 Apr 2007) | 8 lines * src/vm/jit/powerpc64/emit.c (emit_patcher_stubs): Removed dead code. * src/vm/jit/powerpc64/codegen.c (ICMD_ISUB): Fixed evil bug. (ICMD_LSHR): Fixed a bug. (createnativestub): Use emit_patcher_stub. * src/vm/jit/powerpc64/patcher.c (patcher_resolve_native): Fixed. ........ r7695 | twisti | 2007-04-12 21:49:34 +0200 (Thu, 12 Apr 2007) | 14 lines * src/vm/jit/stack.c (stack_analyse): Removed USEBUILTINTABLE, always check for automatic-builtins (compile this is not affected). * src/vm/jit/alpha/arch.h, src/vm/jit/arm/arch.h, src/vm/jit/i386/arch.h, src/vm/jit/m68k/arch.h, src/vm/jit/mips/arch.h, src/vm/jit/powerpc/arch.h, src/vm/jit/powerpc64/arch.h, src/vm/jit/s390/arch.h, src/vm/jit/sparc64/arch.h, src/vm/jit/x86_64/arch.h (USEBUILTINTABLE): Removed. ........ r7698 | twisti | 2007-04-13 12:12:04 +0200 (Fri, 13 Apr 2007) | 5 lines * src/cacao/cacao.c (main): Save the error message of the first lt_dlopenext and print it too when the second fails (thanks Dalibor). Although there's still a problem, when the first fails for some reason and the second picks up and old installed one silently. ........ r7699 | twisti | 2007-04-13 12:42:05 +0200 (Fri, 13 Apr 2007) | 2 lines * src/vm/jit/mips/md-abi.c (md_param_alloc): Code beautified. ........ r7700 | twisti | 2007-04-13 13:48:48 +0200 (Fri, 13 Apr 2007) | 3 lines * src/vm/jit/mips/codegen.c (codegen_emit): ICMD_LDIV, ICMD_LREM: Use REG_Ax_Ax_PACKED defines. ........ --HG-- branch : exact-gc --- src/cacao/cacao.c | 17 +++++- src/vm/jit/alpha/arch.h | 4 +- src/vm/jit/arm/arch.h | 12 ++--- src/vm/jit/i386/arch.h | 4 +- src/vm/jit/m68k/arch.h | 4 -- src/vm/jit/mips/arch.h | 4 +- src/vm/jit/mips/codegen.c | 19 +++---- src/vm/jit/mips/md-abi.c | 38 +++++++------ src/vm/jit/powerpc/arch.h | 4 +- src/vm/jit/powerpc64/arch.h | 6 +-- src/vm/jit/powerpc64/codegen.c | 98 +++++++--------------------------- src/vm/jit/powerpc64/emit.c | 14 ----- src/vm/jit/powerpc64/patcher.c | 7 +-- src/vm/jit/s390/arch.h | 4 +- src/vm/jit/sparc64/arch.h | 2 - src/vm/jit/stack.c | 12 ++--- src/vm/jit/x86_64/arch.h | 4 +- 17 files changed, 80 insertions(+), 173 deletions(-) diff --git a/src/cacao/cacao.c b/src/cacao/cacao.c index 76c97004f..223c083d8 100644 --- a/src/cacao/cacao.c +++ b/src/cacao/cacao.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: cacao.c 7236 2007-01-22 17:25:03Z twisti $ + $Id: cacao.c 7698 2007-04-13 10:12:04Z twisti $ */ @@ -78,6 +78,7 @@ int main(int argc, char **argv) lt_dlhandle libjvm_handle; lt_ptr libjvm_vm_createjvm; lt_ptr libjvm_vm_run; + const char *lterror; bool (*vm_createjvm)(JavaVM **, void **, void *); void (*vm_run)(JavaVM *, JavaVMInitArgs *); @@ -129,10 +130,24 @@ int main(int argc, char **argv) If not found, try the absolute path. */ if (!(libjvm_handle = lt_dlopenext("libjvm"))) { + /* save the error message */ + + lterror = strdup(lt_dlerror()); + if (!(libjvm_handle = lt_dlopenext(path))) { + /* print the first error message too */ + + fprintf(stderr, "main: lt_dlopenext failed: %s\n", lterror); + + /* and now the current one */ + fprintf(stderr, "main: lt_dlopenext failed: %s\n", lt_dlerror()); abort(); } + + /* free the error string */ + + free((void *) lterror); } if (!(libjvm_vm_createjvm = lt_dlsym(libjvm_handle, "vm_createjvm"))) { diff --git a/src/vm/jit/alpha/arch.h b/src/vm/jit/alpha/arch.h index ce684456d..ae3ea3714 100644 --- a/src/vm/jit/alpha/arch.h +++ b/src/vm/jit/alpha/arch.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: arch.h 7601 2007-03-28 23:02:50Z michi $ + $Id: arch.h 7695 2007-04-12 19:49:34Z twisti $ */ @@ -37,8 +37,6 @@ #define U8_AVAILABLE 1 -/* #define USEBUILTINTABLE */ - #define SUPPORT_DIVISION 0 #define SUPPORT_LONG 1 diff --git a/src/vm/jit/arm/arch.h b/src/vm/jit/arm/arch.h index bbca00f95..70264ab5e 100644 --- a/src/vm/jit/arm/arch.h +++ b/src/vm/jit/arm/arch.h @@ -22,12 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - Contact: cacao@cacaojvm.org - - Authors: Michael Starzinger - Christian Thalinger - - $Id: arch.h 7601 2007-03-28 23:02:50Z michi $ + $Id: arch.h 7695 2007-04-12 19:49:34Z twisti $ */ @@ -35,12 +30,13 @@ #ifndef _ARCH_H #define _ARCH_H +#include "config.h" + + /* define architecture features ***********************************************/ #define U8_AVAILABLE 1 -#define USEBUILTINTABLE - #define SUPPORT_DIVISION 0 #define SUPPORT_LONG 1 diff --git a/src/vm/jit/i386/arch.h b/src/vm/jit/i386/arch.h index 979ad514e..22cd6de2e 100644 --- a/src/vm/jit/i386/arch.h +++ b/src/vm/jit/i386/arch.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: arch.h 7601 2007-03-28 23:02:50Z michi $ + $Id: arch.h 7695 2007-04-12 19:49:34Z twisti $ */ @@ -48,8 +48,6 @@ #define U8_AVAILABLE 1 -#define USEBUILTINTABLE - #define SUPPORT_DIVISION 1 #define SUPPORT_LONG 1 diff --git a/src/vm/jit/m68k/arch.h b/src/vm/jit/m68k/arch.h index 583c008da..9173d1906 100644 --- a/src/vm/jit/m68k/arch.h +++ b/src/vm/jit/m68k/arch.h @@ -33,14 +33,10 @@ #include "config.h" -/*#define USE_FAKE_ATOMIC_INSTRUCTIONS 0 */ - /* define architecture features ***********************************************/ #define U8_AVAILABLE 1 -#define USEBUILTINTABLE - #define SUPPORT_DIVISION 0 #define SUPPORT_LONG 0 diff --git a/src/vm/jit/mips/arch.h b/src/vm/jit/mips/arch.h index 6d8cfe45b..002d468a0 100644 --- a/src/vm/jit/mips/arch.h +++ b/src/vm/jit/mips/arch.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: arch.h 7601 2007-03-28 23:02:50Z michi $ + $Id: arch.h 7695 2007-04-12 19:49:34Z twisti $ */ @@ -37,8 +37,6 @@ #define U8_AVAILABLE 1 -#define USEBUILTINTABLE - #if SIZEOF_VOID_P == 8 #define SUPPORT_DIVISION 1 diff --git a/src/vm/jit/mips/codegen.c b/src/vm/jit/mips/codegen.c index 1460dc51e..89daefaba 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 7692 2007-04-12 14:47:24Z twisti $ + $Id: codegen.c 7700 2007-04-13 11:48:48Z twisti $ */ @@ -980,22 +980,17 @@ bool codegen_emit(jitdata *jd) case ICMD_LDIV: /* ..., val1, val2 ==> ..., val1 / val2 */ case ICMD_LREM: /* ..., val1, val2 ==> ..., val1 % val2 */ - bte = iptr->sx.s23.s3.bte; - md = bte->md; + s1 = emit_load_s1(jd, iptr, REG_A0_A1_PACKED); + s2 = emit_load_s2(jd, iptr, REG_A2_A3_PACKED); - s2 = emit_load_s2(jd, iptr, REG_ITMP12_PACKED); + /* XXX TODO: only do this if arithmetic check is really done! */ M_OR(GET_HIGH_REG(s2), GET_LOW_REG(s2), REG_ITMP3); emit_arithmetic_check(cd, iptr, REG_ITMP3); - s3 = PACK_REGS(rd->argintregs[GET_LOW_REG(md->params[1].regoff)], - rd->argintregs[GET_HIGH_REG(md->params[1].regoff)]); - M_LNGMOVE(s2, s3); - - s1 = emit_load_s1(jd, iptr, REG_ITMP12_PACKED); - s3 = PACK_REGS(rd->argintregs[GET_LOW_REG(md->params[0].regoff)], - rd->argintregs[GET_HIGH_REG(md->params[0].regoff)]); - M_LNGMOVE(s1, s3); + M_LNGMOVE(s1, REG_A0_A1_PACKED); + M_LNGMOVE(s2, REG_A2_A3_PACKED); + bte = iptr->sx.s23.s3.bte; disp = dseg_add_functionptr(cd, bte->fp); M_ALD(REG_ITMP3, REG_PV, disp); M_JSR(REG_RA, REG_ITMP3); diff --git a/src/vm/jit/mips/md-abi.c b/src/vm/jit/mips/md-abi.c index a28ef716f..a14b27247 100644 --- a/src/vm/jit/mips/md-abi.c +++ b/src/vm/jit/mips/md-abi.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: md-abi.c 7351 2007-02-13 21:32:36Z twisti $ + $Id: md-abi.c 7699 2007-04-13 10:42:05Z twisti $ */ @@ -172,12 +172,13 @@ void md_param_alloc(methoddesc *md) case TYPE_LNG: if (i < INT_ARG_CNT) { pd->inmemory = false; - pd->regoff = reguse; + pd->regoff = reguse; reguse++; md->argintreguse = reguse; - } else { + } + else { pd->inmemory = true; - pd->regoff = stacksize; + pd->regoff = stacksize; stacksize++; } break; @@ -185,12 +186,13 @@ void md_param_alloc(methoddesc *md) case TYPE_DBL: if (i < FLT_ARG_CNT) { pd->inmemory = false; - pd->regoff = reguse; + pd->regoff = reguse; reguse++; md->argfltreguse = reguse; - } else { + } + else { pd->inmemory = true; - pd->regoff = stacksize; + pd->regoff = stacksize; stacksize++; } break; @@ -234,16 +236,16 @@ void md_param_alloc(methoddesc *md) if (reguse < INT_ARG_CNT) { pd->inmemory = false; # if WORDS_BIGENDIAN == 1 - pd->regoff = PACK_REGS(reguse + 1, reguse); + pd->regoff = PACK_REGS(reguse + 1, reguse); # else - pd->regoff = PACK_REGS(reguse, reguse + 1); + pd->regoff = PACK_REGS(reguse, reguse + 1); # endif reguse += 2; md->argintreguse = reguse; } else { pd->inmemory = true; - pd->regoff = ALIGN_2_WORD(stacksize); + pd->regoff = ALIGN_2_WORD(stacksize); } stacksize += 2; } @@ -275,12 +277,13 @@ void md_param_alloc(methoddesc *md) if (i < INT_ARG_CNT) { pd->inmemory = false; - pd->regoff = reguse; + pd->regoff = reguse; reguse++; md->argintreguse = reguse; - } else { + } + else { pd->inmemory = true; - pd->regoff = stacksize; + pd->regoff = stacksize; } stacksize++; break; @@ -291,15 +294,16 @@ void md_param_alloc(methoddesc *md) if (i < INT_ARG_CNT) { pd->inmemory = false; #if WORDS_BIGENDIAN == 1 - pd->regoff = PACK_REGS(reguse + 1, reguse); + pd->regoff = PACK_REGS(reguse + 1, reguse); #else - pd->regoff = PACK_REGS(reguse, reguse + 1); + pd->regoff = PACK_REGS(reguse, reguse + 1); #endif reguse += 2; md->argintreguse = reguse; - } else { + } + else { pd->inmemory = true; - pd->regoff = stacksize; + pd->regoff = stacksize; } stacksize += 2; break; diff --git a/src/vm/jit/powerpc/arch.h b/src/vm/jit/powerpc/arch.h index d1cb3de5e..8ff6cd1c4 100644 --- a/src/vm/jit/powerpc/arch.h +++ b/src/vm/jit/powerpc/arch.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: arch.h 7601 2007-03-28 23:02:50Z michi $ + $Id: arch.h 7695 2007-04-12 19:49:34Z twisti $ */ @@ -37,8 +37,6 @@ #define U8_AVAILABLE 1 -#define USEBUILTINTABLE - #define SUPPORT_DIVISION 1 #define SUPPORT_LONG 1 diff --git a/src/vm/jit/powerpc64/arch.h b/src/vm/jit/powerpc64/arch.h index 48e93dee0..a545e244b 100644 --- a/src/vm/jit/powerpc64/arch.h +++ b/src/vm/jit/powerpc64/arch.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: arch.h 7688 2007-04-12 09:05:12Z michi $ + $Id: arch.h 7695 2007-04-12 19:49:34Z twisti $ */ @@ -33,14 +33,10 @@ #include "config.h" -/*#define USE_FAKE_ATOMIC_INSTRUCTIONS 0 */ - /* define architecture features ***********************************************/ #define U8_AVAILABLE 1 -#define USEBUILTINTABLE - #define SUPPORT_DIVISION 1 #define SUPPORT_LONG 1 diff --git a/src/vm/jit/powerpc64/codegen.c b/src/vm/jit/powerpc64/codegen.c index 81add2a49..9cf23c42b 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 7693 2007-04-12 14:56:49Z michi $ + $Id: codegen.c 7694 2007-04-12 15:35:13Z tbfg $ */ @@ -608,6 +608,7 @@ bool codegen_emit(jitdata *jd) s2 = emit_load_s2(jd, iptr, REG_ITMP2); d = codegen_reg_of_dst(jd, iptr, REG_ITMP2); M_SUB(s1, s2, d); + M_EXTSW(d, d); emit_store_dst(jd, iptr, d); break; @@ -835,7 +836,8 @@ bool codegen_emit(jitdata *jd) s1 = emit_load_s1(jd, iptr, REG_ITMP1); s2 = emit_load_s2(jd, iptr, REG_ITMP2); d = codegen_reg_of_dst(jd, iptr, REG_ITMP2); - M_SRA(s1, s2, d); + M_AND_IMM(s2, 0x3f, REG_ITMP2); + M_SRA(s1, REG_ITMP2, d); emit_store_dst(jd, iptr, d); break; case ICMD_LUSHRCONST: @@ -906,6 +908,17 @@ bool codegen_emit(jitdata *jd) /* sx.val.i = constant */ s1 = emit_load_s1(jd, iptr, REG_ITMP1); d = codegen_reg_of_dst(jd, iptr, REG_ITMP2); +#if 0 + /* fast division, result in REG_ITMP3) */ + M_SRA_IMM(s1, iptr->sx.val.i, REG_ITMP3); + M_ADDZE(REG_ITMP3, REG_ITMP3); + + M_SUB(s1, REG_ITMP3, d); + M_EXTSW(d, d); + emit_store_dst(jd, iptr, d); + break; +#else + M_MOV(s1, REG_ITMP2); M_CMPI(s1, 0); M_BGE(1 + 2*(iptr->sx.val.i >= 32768)); @@ -926,6 +939,7 @@ bool codegen_emit(jitdata *jd) M_EXTSW(d, d); emit_store_dst(jd, iptr, d); break; +#endif case ICMD_IOR: /* ..., val1, val2 ==> ..., val1 | val2 */ case ICMD_LOR: @@ -2924,85 +2938,11 @@ void codegen_emit_stub_native(jitdata *jd, methoddesc *nmd, functionptr f) /* generate patcher stub call code */ - { - patchref *pref; - u4 mcode; - u1 *savedmcodeptr; - u1 *tmpmcodeptr; - - for (pref = cd->patchrefs; pref != NULL; pref = pref->next) { - /* Get machine code which is patched back in later. The - call is 1 instruction word long. */ - - tmpmcodeptr = cd->mcodebase + pref->branchpos; - - mcode = *((u4 *) tmpmcodeptr); - - /* Patch in the call to call the following code (done at - compile time). */ - - savedmcodeptr = cd->mcodeptr; /* save current mcodeptr */ - cd->mcodeptr = tmpmcodeptr; /* set mcodeptr to patch position */ - - disp = ((u4 *) savedmcodeptr) - (((u4 *) tmpmcodeptr) + 1); - M_BL(disp); - - cd->mcodeptr = savedmcodeptr; /* restore the current mcodeptr */ - - /* create stack frame - keep stack 16-byte aligned */ - - M_AADD_IMM(REG_SP, -8 * 8, REG_SP); - - /* move return address onto stack */ - - M_MFLR(REG_ZERO); - M_AST(REG_ZERO, REG_SP, 5 * 8); - - /* move pointer to java_objectheader onto stack */ - -#if defined(ENABLE_THREADS) - /* order reversed because of data segment layout */ - - (void) dseg_add_unique_address(cd, NULL); /* flcword */ - (void) dseg_add_unique_address(cd, lock_get_initial_lock_word()); /* monitorPtr */ - disp = dseg_add_unique_address(cd, NULL); /* vftbl */ - - M_LDA(REG_ITMP3, REG_PV, disp); - M_AST(REG_ITMP3, REG_SP, 4 * 8); -#else - /* do nothing */ -#endif - - /* move machine code onto stack */ - - disp = dseg_add_unique_s4(cd, mcode); - M_ILD(REG_ITMP3, REG_PV, disp); - M_IST(REG_ITMP3, REG_SP, 3 * 8); - - /* move class/method/field reference onto stack */ - - disp = dseg_add_unique_address(cd, pref->ref); - M_ALD(REG_ITMP3, REG_PV, disp); - M_AST(REG_ITMP3, REG_SP, 2 * 8); - - /* move data segment displacement onto stack */ - - disp = dseg_add_unique_s4(cd, pref->disp); - M_ILD(REG_ITMP3, REG_PV, disp); - M_IST(REG_ITMP3, REG_SP, 1 * 8); - - /* move patcher function pointer onto stack */ + emit_patcher_stubs(jd); - disp = dseg_add_functionptr(cd, pref->patcher); - M_ALD(REG_ITMP3, REG_PV, disp); - M_AST(REG_ITMP3, REG_SP, 0 * 8); + codegen_finish(jd); - disp = dseg_add_functionptr(cd, asm_patcher_wrapper); - M_ALD(REG_ITMP3, REG_PV, disp); - M_MTCTR(REG_ITMP3); - M_RTS; - } - } + return code->entrypoint; } diff --git a/src/vm/jit/powerpc64/emit.c b/src/vm/jit/powerpc64/emit.c index 43fd7ed74..d5ed21a84 100644 --- a/src/vm/jit/powerpc64/emit.c +++ b/src/vm/jit/powerpc64/emit.c @@ -687,11 +687,9 @@ void emit_patcher_stubs(jitdata *jd) cd->mcodeptr = savedmcodeptr; /* restore the current mcodeptr */ /* create stack frame - keep stack 16-byte aligned */ - M_AADD_IMM(REG_SP, -8 * 8, REG_SP); /* calculate return address and move it onto the stack */ - M_LDA(REG_ITMP3, REG_PV, pref->branchpos); M_AST_INTERN(REG_ITMP3, REG_SP, 5 * 8); @@ -711,36 +709,25 @@ void emit_patcher_stubs(jitdata *jd) #endif /* move machine code onto stack */ - disp = dseg_add_s4(cd, mcode); M_ILD(REG_ITMP3, REG_PV, disp); M_IST_INTERN(REG_ITMP3, REG_SP, 3 * 8); /* move class/method/field reference onto stack */ - disp = dseg_add_address(cd, pref->ref); M_ALD(REG_ITMP3, REG_PV, disp); M_AST_INTERN(REG_ITMP3, REG_SP, 2 * 8); /* move data segment displacement onto stack */ - disp = dseg_add_s4(cd, pref->disp); M_ILD(REG_ITMP3, REG_PV, disp); M_IST_INTERN(REG_ITMP3, REG_SP, 1 * 8); - M_NOP; /* move patcher function pointer onto stack */ - disp = dseg_add_functionptr(cd, pref->patcher); M_ALD(REG_ITMP3, REG_PV, disp); M_AST_INTERN(REG_ITMP3, REG_SP, 0 * 8); -#if 0 - disp = dseg_add_functionptr(cd, asm_patcher_wrapper); - M_ALD(REG_ITMP3, REG_PV, disp); - M_MTCTR(REG_ITMP3); - M_RTS; -#else if (targetdisp == 0) { targetdisp = ((u4 *) cd->mcodeptr) - ((u4 *) cd->mcodebase); @@ -754,7 +741,6 @@ void emit_patcher_stubs(jitdata *jd) (((u4 *) cd->mcodeptr) + 1); M_BR(disp); } -#endif } } diff --git a/src/vm/jit/powerpc64/patcher.c b/src/vm/jit/powerpc64/patcher.c index 3a8063f93..831c076d0 100644 --- a/src/vm/jit/powerpc64/patcher.c +++ b/src/vm/jit/powerpc64/patcher.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: patcher.c 7601 2007-03-28 23:02:50Z michi $ + $Id: patcher.c 7694 2007-04-12 15:35:13Z tbfg $ */ @@ -1080,11 +1080,6 @@ bool patcher_resolve_native(u1 *sp) disp = *((s4 *) (sp + 1 * 8)); pv = (u1 *) *((ptrint *) (sp + 0 * 8)); - /* calculate and set the new return address */ - - ra = ra - 1 * 4; - *((ptrint *) (sp + 5 * 8)) = (ptrint) ra; - /* resolve native function */ if (!(f = native_resolve_function(m))) diff --git a/src/vm/jit/s390/arch.h b/src/vm/jit/s390/arch.h index f8b13f1f4..e5f96bcd9 100644 --- a/src/vm/jit/s390/arch.h +++ b/src/vm/jit/s390/arch.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: arch.h 7688 2007-04-12 09:05:12Z michi $ + $Id: arch.h 7695 2007-04-12 19:49:34Z twisti $ */ @@ -37,8 +37,6 @@ #define U8_AVAILABLE 1 -#define USEBUILTINTABLE - #define SUPPORT_DIVISION 1 #define SUPPORT_LONG 1 diff --git a/src/vm/jit/sparc64/arch.h b/src/vm/jit/sparc64/arch.h index 459ad892a..7cc3c511c 100644 --- a/src/vm/jit/sparc64/arch.h +++ b/src/vm/jit/sparc64/arch.h @@ -37,8 +37,6 @@ #define U8_AVAILABLE 1 -/* #define USEBUILTINTABLE */ - #define SUPPORT_DIVISION 0 #define SUPPORT_LONG 1 diff --git a/src/vm/jit/stack.c b/src/vm/jit/stack.c index 541f8269c..974c91630 100644 --- a/src/vm/jit/stack.c +++ b/src/vm/jit/stack.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: stack.c 7667 2007-04-05 00:16:05Z michi $ + $Id: stack.c 7695 2007-04-12 19:49:34Z twisti $ */ @@ -2315,18 +2315,16 @@ bool stack_analyse(jitdata *jd) /* automatically replace some ICMDs with builtins */ -#if defined(USEBUILTINTABLE) bte = builtintable_get_automatic(opcode); - if (bte && bte->opcode == opcode) { - iptr->opc = ICMD_BUILTIN; + if ((bte != NULL) && (bte->opcode == opcode)) { + iptr->opc = ICMD_BUILTIN; iptr->flags.bits &= INS_FLAG_ID_MASK; - iptr->sx.s23.s3.bte = bte; + iptr->sx.s23.s3.bte = bte; /* iptr->line is already set */ - jd->isleafmethod = false; + jd->isleafmethod = false; goto icmd_BUILTIN; } -#endif /* defined(USEBUILTINTABLE) */ /* main opcode switch *************************************/ diff --git a/src/vm/jit/x86_64/arch.h b/src/vm/jit/x86_64/arch.h index de8dac864..8206e3698 100644 --- a/src/vm/jit/x86_64/arch.h +++ b/src/vm/jit/x86_64/arch.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: arch.h 7601 2007-03-28 23:02:50Z michi $ + $Id: arch.h 7695 2007-04-12 19:49:34Z twisti $ */ @@ -37,8 +37,6 @@ #define U8_AVAILABLE 1 -/* #define USEBUILTINTABLE */ - #define SUPPORT_DIVISION 1 #define SUPPORT_LONG 1 -- 2.25.1