Changes: Edwin Steiner
- $Id: asmpart.S 7407 2007-02-26 19:12:03Z michi $
+ $Id: asmpart.S 7486 2007-03-08 13:50:07Z twisti $
*/
.globl asm_vm_call_method_float
.globl asm_vm_call_method_double
.globl asm_vm_call_method_exception_handler
+ .globl asm_vm_call_method_end
.globl asm_call_jit_compiler
.globl asm_getclassvalues_atomic
-asm_handle_nat_exception:
- .long 0
asm_abstractmethoderror:
.long 0
asm_replacement_out:
L_no_args:
lr s3, sp
+ lhi s4, 0
j L_copy_done
L_handle_i0:
ld fa1, offvmargdata(itmp1)
j L_register_copy
+asm_vm_call_method_end:
+ nop
/****************** function asm_call_jit_compiler *****************************
* *
lm %r2,%r5,96(sp) /* restore volatile int arg regs */
ld %f0,96+16(sp) /* restore volatile float arg regs */
ld %f2,96+24(sp) /* restore volatile float arg regs */
- l %r14,96+32(sp) /* restore return address */
- ahi sp, ACJC_STACKFRAME /* remove stack frame */
ltr pv,pv
je L_asm_call_jit_compiler_exception
+ l %r14,96+32(sp) /* restore return address */
+ ahi sp, ACJC_STACKFRAME /* remove stack frame */
+
jit_code_entry: /* label to set breakpoint on */
br pv /* call the method, it will return to the caller */
L_asm_call_jit_compiler_exception:
-#if 0
- call exceptions_get_and_clear_exception@PLT
- pop xpc /* delete return address */
- sub $3,xpc /* faulting address is ra - 3 */
- jmp L_asm_handle_exception
-#endif
- .long 0
+ bras itmp2, L_bras_acjce
+ .long exceptions_get_and_clear_exception
+L_bras_acjce:
+ l itmp2, 0(itmp2)
+ basr %r14, itmp2
+ lr xptr, %r2
+ l xpc,96+32(sp) /* restore return address */
+ ahi sp, ACJC_STACKFRAME /* remove stack frame */
+ j L_asm_handle_nat_exception
#if 0
* *
*******************************************************************************/
-asm_handle_nat_exception:
- add $8,sp /* clear return address of native stub*/
#endif
-
+
+asm_handle_nat_exception:
+L_asm_handle_nat_exception:
+ /* TODO really nothing here ? */
asm_handle_exception:
L_asm_handle_exception: /* required for PIC code */
br itmp3 /* return */
L_asm_patcher_wrapper_exception:
- .long 0
-#if 0
- mov itmp3,xptr /* get exception */
- pop xpc /* get and remove return address */
- jmp L_asm_handle_exception
-#endif
+ lr xptr,itmp3 /* get exception */
+ l xpc, apw_sfs + (5 * 4)(sp) /* load return address to JIT from stack */
+ ahi sp, apw_sfs + (6 * 4) /* remove stack frame, and stack frame by patcher stub */
+ j L_asm_handle_exception
#if 0
.long _crit_end
.long _crit_restart
#endif
- .quad 0
+ .long 0
/* Disable exec-stacks, required for Gentoo ***********************************/