* src/vm/jit/alpha/codegen.c (codegen_emit): ICMD_BUILTIN no longer checks for
authorMichael Starzinger <michi@complang.tuwien.ac.at>
Mon, 10 Sep 2007 22:45:35 +0000 (00:45 +0200)
committerMichael Starzinger <michi@complang.tuwien.ac.at>
Mon, 10 Sep 2007 22:45:35 +0000 (00:45 +0200)
exceptions, this is done by the stub itself. Stubs are called now.

* src/vm/jit/m68k/codegen.c: Likewise.
* src/vm/jit/mips/codegen.c: Likewise.
* src/vm/jit/powerpc64/codegen.c: Likewise.
* src/vm/jit/s390/codegen.c: Likewise.
* src/vm/jit/sparc64/codegen.c: Likewise.

--HG--
branch : michi

src/vm/jit/alpha/codegen.c
src/vm/jit/m68k/codegen.c
src/vm/jit/mips/codegen.c
src/vm/jit/powerpc64/codegen.c
src/vm/jit/s390/codegen.c
src/vm/jit/sparc64/codegen.c

index a5fe6b0adae9245b8ae4837c81af0549ddac7a3b..0647ee9250761cb55454e4fbbb13e56dce0f843d 100644 (file)
@@ -2614,8 +2614,6 @@ gen_method:
                                REPLACEMENT_POINT_FORGC_BUILTIN_RETURN(cd, iptr);
                                disp = (s4) (cd->mcodeptr - cd->mcodebase);
                                M_LDA(REG_PV, REG_RA, -disp);
-
-                               emit_exception_check(cd, iptr);
                                break;
 
                        case ICMD_INVOKESPECIAL:
index b8c1ce7c96ba297cc45f6b36e82a58f16ffa065a..3b8787dea4422a9b3372cce207c6b04985efbe77 100644 (file)
@@ -1692,13 +1692,15 @@ bool codegen_emit(jitdata *jd)
 
                        /* arguments in place now */
                        switch(iptr->opc)       {
-                               case ICMD_BUILTIN: 
-                                       disp = (ptrint) bte->fp;
+                               case ICMD_BUILTIN:
+                                       if (bte->stub == NULL)
+                                               disp = (ptrint) bte->fp;
+                                       else
+                                               disp = (ptrint) bte->stub;
                                        d = md->returntype.type;
                                        M_JSR_IMM(disp);
 
                                        REPLACEMENT_POINT_INVOKE_RETURN(cd, iptr);
-                                       emit_exception_check(cd, iptr);
                                        break;
 
                                case ICMD_INVOKESPECIAL: 
index f75e067bdd2cd5ff5b7a4d545aab31247fb25cf1..772ac7363e768ed88b7bff01cac9bb8194d295b8 100644 (file)
@@ -3099,7 +3099,10 @@ gen_method:
 
                        switch (iptr->opc) {
                        case ICMD_BUILTIN:
-                               disp = dseg_add_functionptr(cd, bte->fp);
+                               if (bte->stub == NULL)
+                                       disp = dseg_add_functionptr(cd, bte->fp);
+                               else
+                                       disp = dseg_add_functionptr(cd, bte->stub);
 
                                M_ALD(REG_ITMP3, REG_PV, disp);  /* built-in-function pointer */
 
@@ -3113,8 +3116,6 @@ gen_method:
                                REPLACEMENT_POINT_INVOKE_RETURN(cd, iptr);
                                disp = (s4) (cd->mcodeptr - cd->mcodebase);
                                M_LDA(REG_PV, REG_RA, -disp);
-
-                               emit_exception_check(cd, iptr);
                                break;
 
                        case ICMD_INVOKESPECIAL:
index bbf41ebf172d7dc606a38dd419f525fca105a32a..7946a17dab7c73c49b82f860a9556d9f9712de3d 100644 (file)
@@ -2177,20 +2177,23 @@ gen_method:
 
                        switch (iptr->opc) {
                        case ICMD_BUILTIN:
-                               disp = dseg_add_functionptr(cd, bte->fp);
-                               M_ALD(REG_PV, REG_PV, disp);
-                               M_ALD(REG_PV, REG_PV, 0);       /* TOC */
+                               if (bte->stub == NULL) {
+                                       disp = dseg_add_functionptr(cd, bte->fp);
+                                       M_ALD(REG_PV, REG_PV, disp);
+                                       M_ALD(REG_PV, REG_PV, 0);       /* TOC */
+                               }
+                               else {
+                                       disp = dseg_add_functionptr(cd, bte->stub);
+                                       M_ALD(REG_PV, REG_PV, disp);
+                               }
 
                                /* generate the actual call */
-                               REPLACEMENT_POINT_INVOKE_RETURN(cd, iptr);
                                M_MTCTR(REG_PV);
                                M_JSR;
                                REPLACEMENT_POINT_INVOKE_RETURN(cd, iptr);
                                disp = (s4) (cd->mcodeptr - cd->mcodebase);
                                M_MFLR(REG_ITMP1);
                                M_LDA(REG_PV, REG_ITMP1, -disp);
-
-                               emit_exception_check(cd, iptr);
                                break;
 
 
index f0d58322159b637f24048b5d72128bc2819a04f7..3abba49920d7ac4e68f811e8bea60c406c9b60c3 100644 (file)
@@ -2837,7 +2837,10 @@ gen_method:
 
                        switch (iptr->opc) {
                        case ICMD_BUILTIN:
-                               disp = dseg_add_functionptr(cd, bte->fp);
+                               if (bte->stub == NULL)
+                                       disp = dseg_add_functionptr(cd, bte->fp);
+                               else
+                                       disp = dseg_add_functionptr(cd, bte->stub);
 
                                M_ASUB_IMM(96, REG_SP); /* register save area as required by C abi */   
                                if (N_VALID_DSEG_DISP(disp)) {
@@ -2930,7 +2933,6 @@ gen_method:
                        switch (iptr->opc) {
                                case ICMD_BUILTIN:
                                        M_AADD_IMM(96, REG_SP); /* remove C abi register save area */
-                                       emit_exception_check(cd, iptr); /* check for exception */
                                        break;
                        }
 
index df1293732b22c93d94375f7e40d3bdea6064ae5d..e968ffb49d7e1dec66e3e82882a544aa74c69067 100644 (file)
@@ -2547,7 +2547,6 @@ gen_method:
                            /* REG_RA holds the value of the jmp instruction, therefore +8 */
                            M_LDA(REG_ZERO, REG_RA_CALLER, -disp + 8); 
 
-                               emit_exception_check(cd, iptr);
                                if (md->returntype.type == TYPE_FLT) {
                                        /* special handling for float return value in %f0 */
                                        M_FMOV_INTERN(0,1);