* ICMD_ATHROW, ICMD_ARETURN: Added patcher stub call.
authortwisti <none@none>
Fri, 21 Oct 2005 13:16:35 +0000 (13:16 +0000)
committertwisti <none@none>
Fri, 21 Oct 2005 13:16:35 +0000 (13:16 +0000)
src/vm/jit/alpha/codegen.c

index a62f35be90378c150f5f20f2faa5fc399423fbc9..c9369ea9a9ce908422f825695204c680cb4d2ea2 100644 (file)
@@ -31,7 +31,7 @@
             Christian Thalinger
             Christian Ullrich
 
-   $Id: codegen.c 3425 2005-10-12 15:33:35Z twisti $
+   $Id: codegen.c 3480 2005-10-21 13:16:35Z twisti $
 
 */
 
@@ -2306,6 +2306,16 @@ void codegen(methodinfo *m, codegendata *cd, registerdata *rd)
 
                        var_to_reg_int(s1, src, REG_ITMP1);
                        M_INTMOVE(s1, REG_ITMP1_XPTR);
+
+                       if (iptr->val.a) {
+                               codegen_addpatchref(cd, mcodeptr,
+                                                                       PATCHER_athrow_areturn,
+                                                                       (unresolved_class *) iptr->val.a, 0);
+
+                               if (opt_showdisassemble)
+                                       M_NOP;
+                       }
+
                        disp = dseg_addaddress(cd, asm_handle_exception);
                        M_ALD(REG_ITMP2, REG_PV, disp);
                        M_JMP(REG_ITMP2_XPC, REG_ITMP2);
@@ -2861,11 +2871,24 @@ void codegen(methodinfo *m, codegendata *cd, registerdata *rd)
 
                case ICMD_IRETURN:      /* ..., retvalue ==> ...                      */
                case ICMD_LRETURN:
-               case ICMD_ARETURN:
 
                        var_to_reg_int(s1, src, REG_RESULT);
                        M_INTMOVE(s1, REG_RESULT);
+                       goto nowperformreturn;
 
+               case ICMD_ARETURN:      /* ..., retvalue ==> ...                      */
+
+                       var_to_reg_int(s1, src, REG_RESULT);
+                       M_INTMOVE(s1, REG_RESULT);
+
+                       if (iptr->val.a) {
+                               codegen_addpatchref(cd, mcodeptr,
+                                                                       PATCHER_athrow_areturn,
+                                                                       (unresolved_class *) iptr->val.a, 0);
+
+                               if (opt_showdisassemble)
+                                       M_NOP;
+                       }
                        goto nowperformreturn;
 
                case ICMD_FRETURN:      /* ..., retvalue ==> ...                      */
@@ -2873,7 +2896,6 @@ void codegen(methodinfo *m, codegendata *cd, registerdata *rd)
 
                        var_to_reg_flt(s1, src, REG_FRESULT);
                        M_FLTMOVE(s1, REG_FRESULT);
-
                        goto nowperformreturn;
 
                case ICMD_RETURN:       /* ...  ==> ...                               */
@@ -2912,8 +2934,6 @@ nowperformreturn:
 
 #if defined(USE_THREADS)
                        if (checksync && (m->flags & ACC_SYNCHRONIZED)) {
-                               s4 disp;
-
                                M_ALD(rd->argintregs[0], REG_SP, rd->memuse * 8);
 
                                switch (iptr->opc) {