-L_asm_vm_call_method: /* required for PIC code */
- push %ebp
- mov %esp,%ebp /* save stackptr */
-
- push %ebx /* save registers */
- push %esi
- push %edi
-
- mov 4*4(%ebp),%eax /* pointer to arg block (4(push)+4(return)+4+4)*/
- mov 3*4(%ebp),%ecx /* arg count (4(push)+4(return)+4 */
-
- xor %esi,%esi /* clear stackframe size (MUST be */
- /* before args check, may be zero!!!) */
- test %ecx,%ecx /* maybe we have no args */
- jle calljava_copydone
-
- mov %ecx,%edx /* calculate stack size */
- mov %eax,%edi /* save pointer to arg block */
-
-calljava_calcstacksize:
- mov offvmargtype(%eax),%ebx
- test $1,%ebx /* two word type? */
- jz calljava_onewordtype
- add $4,%esi /* add 1 slot to stackframe size */
-
-calljava_onewordtype:
- add $4,%esi /* add 1 slot to stackframe size */
- sub $1,%edx
- test %edx,%edx /* any args left? */
- jz calljava_setstack
- add $sizevmarg,%eax /* goto next argument block */
- jmp calljava_calcstacksize
-
-calljava_setstack:
- mov %edi,%eax /* restore pointer to arg block */
- sub %esi,%esp /* create stackframe for arguments */
- mov %esp,%edi /* move stackpointer into temp variable */
-
-calljava_copyloop:
- mov offvmargdata(%eax),%edx /* copy 4 Byte of Argument */
- mov %edx,(%edi)
- add $4,%edi /* increase sp to next argument */
- mov offvmargtype(%eax),%ebx /* type -> ebx */
- test $1,%ebx /* two word type? */
- jz calljava_copynext
-
- mov offvmargdata+4(%eax),%edx /* copy upper 4 byte of 2 word type */
- mov %edx,(%edi)
- add $4,%edi /* increase sp to next argument */
-
-calljava_copynext:
- sub $1,%ecx /* are there any args left? */
- test %ecx,%ecx
- jle calljava_copydone
-
- add $sizevmarg,%eax /* goto next argument block */
- jmp calljava_copyloop
-
-calljava_copydone:
- mov 2*4(%ebp),itmp1 /* move function pointer to itmp1 */
-
- lea L_asm_call_jit_compiler,itmp3
- call *itmp3 /* call JIT compiler */
-
-L_asm_vm_call_method_return:
- add %esi,%esp /* remove arg stack frame */
- pop %edi /* restore registers */
- pop %esi
- pop %ebx
- leave
- ret
-
-calljava_xhandler2:
- push xptr /* pass exception pointer */
- call builtin_throw_exception
- add $4,sp
- xor v0,v0 /* return NULL */
- jmp L_asm_vm_call_method_return
-