- sub $11,itmp3 /* calculate address of immediate */
- jmp L_call_jit_compile
-
-L_not_static_special:
- cmp $0xd0,%bl /* called with `call *REG_ITMP1' */
- jne L_not_virtual_interface
-
- sub $7,itmp3 /* calculate address of offset */
- mov (itmp3),itmp3l /* get offset (32-bit) */
- add itmp2,itmp3 /* add base address to get method addr*/
- jmp L_call_jit_compile
-
-L_not_virtual_interface: /* a call from asm_calljavamethod */
- xor itmp3,itmp3
-
-L_call_jit_compile:
- mov 0*8(sp),t0 /* restore register */
- mov itmp3,0*8(sp) /* save address for method pointer */
- mov itmp1,1*8(sp) /* save method pointer */
-
- SAVE_ARGUMENT_REGISTERS(3)
-
- mov sp,a0 /* create stackframe info */
- add $((3+ARG_CNT)*8),a0 /* pass sfi */
- xor a1,a1 /* if pv is NULL, use findmethod */
- mov sp,a2 /* pass java sp */
- add $((1+3+ARG_CNT)*8+sizestackframeinfo),a2
- /* pass ra to java function */
- mov ((3+ARG_CNT)*8+sizestackframeinfo)(sp),a3
- mov a3,a4 /* xpc is equal to ra */
- call stacktrace_create_extern_stackframeinfo
-
- mov 1*8(sp),a0 /* pass method pointer */
- call jit_compile
- mov v0,1*8(sp) /* save return value */
-
- mov sp,a0 /* remove stackframe info */
- add $((3+ARG_CNT)*8),a0 /* pass sfi */
- call stacktrace_remove_stackframeinfo
-
- mov 0*8(sp),itmp3 /* restore address for method pointer */
- mov 1*8(sp),v0 /* restore return value */
-
- RESTORE_ARGUMENT_REGISTERS(3)
-
- add $((3+ARG_CNT)*8+sizestackframeinfo),sp /* remove stack frame */
-
- test v0,v0 /* check for exception */
- je L_asm_call_jit_compiler_exception
-
- test itmp3,itmp3 /* is address == 0 (asm_calljavamethod*/
- je L_call_method
-
- mov v0,(itmp3) /* and now save the new pointer */
-
-L_call_method:
- jmp *v0 /* ...and now call the new method */
-
-L_asm_call_jit_compiler_exception:
-#if defined(USE_THREADS) && defined(NATIVE_THREADS)
- call builtin_asm_get_exceptionptrptr
- mov v0,itmp2 /* v0 == xptr */
-#else
- lea _no_threads_exceptionptr,itmp2
-#endif
- mov (itmp2),xptr /* get the exception pointer */
- movl $0,(itmp2) /* clear exception pointer */
-
- pop xpc /* delete return address */
- sub $5,xpc /* faulting address is ra - 5 */
- jmp asm_handle_exception