Merged revisions 7693-7700 via svnmerge from
authormichi <none@none>
Sun, 15 Apr 2007 00:38:00 +0000 (00:38 +0000)
committermichi <none@none>
Sun, 15 Apr 2007 00:38:00 +0000 (00:38 +0000)
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

17 files changed:
src/cacao/cacao.c
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/mips/codegen.c
src/vm/jit/mips/md-abi.c
src/vm/jit/powerpc/arch.h
src/vm/jit/powerpc64/arch.h
src/vm/jit/powerpc64/codegen.c
src/vm/jit/powerpc64/emit.c
src/vm/jit/powerpc64/patcher.c
src/vm/jit/s390/arch.h
src/vm/jit/sparc64/arch.h
src/vm/jit/stack.c
src/vm/jit/x86_64/arch.h

index 76c97004ffab3903214695b42411d514d288e3ea..223c083d872e7ec9f39248deee961bfb0bacc926 100644 (file)
@@ -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"))) {
index ce684456d91756da50fdc235d482bf77f32db2b0..ae3ea3714294b88339be0550093c71d34304811a 100644 (file)
@@ -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
 
index bbca00f95dc935ca86906d10cf57d7ad8d5bf922..70264ab5e13c953b476390e34b76d5974a5eb8e8 100644 (file)
    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 $
 
 */
 
 #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
 
index 979ad514e356f5fdc6165fe15256617b35d9973b..22cd6de2e36f26b7db00e103373aefe497bf641d 100644 (file)
@@ -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
 
index 583c008dacf5c0e2ae5d9759c06969aa252096d8..9173d190615774fcf1e3db8511967cd7479c4173 100644 (file)
 #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
 
index 6d8cfe45b8e9fc563445513d4d457942b3406f7f..002d468a02745d3d91fbaa09c752784d6cefa3fe 100644 (file)
@@ -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
index 1460dc51e007da11169c585b26d374e774a27e8a..89daefaba77e157dbc3d630996171af9b69a01b7 100644 (file)
@@ -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);
index a28ef716fae57a388be69f66a38c5a9f6dc8b10f..a14b272476bdf16a6eac669ada44cc393692397e 100644 (file)
@@ -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;
index d1cb3de5e98180de4c2c4fbf4a1a883271ea5eac..8ff6cd1c460f1af244ca55efc9a0522ca3be49a4 100644 (file)
@@ -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
 
index 48e93dee062506b65922da6a89ea2c5682eb5b12..a545e244bf47942d64fd826396893e8f37b8da5a 100644 (file)
@@ -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 $
 
 */
 
 #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
 
index 81add2a4971c9be90613b38870aabdb5341d292c..9cf23c42bce4dbe26c04dbcc0067b21eb82447f7 100644 (file)
@@ -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;
 }
 
 
index 43fd7ed74c0a8daacc877a58a85c23eb9690c5a3..d5ed21a84d7499eb95604640f87fbb7ae4a6c5e6 100644 (file)
@@ -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
        }
 }
 
index 3a8063f93f8da86d8d77abc4feda795b702f8f6c..831c076d0e49b19f7b5419ee2656aab9ccf5a12b 100644 (file)
@@ -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)))
index f8b13f1f49d4f2f5755c5c5eb5f194b2834d2af4..e5f96bcd9e45acee77dc0ed3e133926200874c03 100644 (file)
@@ -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
 
index 459ad892a8be55b2ef9dbb47c4fb658c7032f8f7..7cc3c511c7ea596ffdac4080599613d7fbd4453b 100644 (file)
@@ -37,8 +37,6 @@
 
 #define U8_AVAILABLE                     1
 
-/*  #define USEBUILTINTABLE */
-
 #define SUPPORT_DIVISION                 0
 #define SUPPORT_LONG                     1
 
index 541f8269cf69d0175d644742cbc8e55789fc500c..974c91630e4e9e8ddba388f8be1b0016988467ef 100644 (file)
@@ -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 *************************************/
 
index de8dac8649055b0ec91f8c848d630c3adf131929..8206e3698e1a0e78cc8c144a23563522417c1cb6 100644 (file)
@@ -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