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 $
*/
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);
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 ==> ... */
var_to_reg_flt(s1, src, REG_FRESULT);
M_FLTMOVE(s1, REG_FRESULT);
-
goto nowperformreturn;
case ICMD_RETURN: /* ... ==> ... */
#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) {