asm_patcher_wrapper.
* src/vm/jit/alpha/codegen.c (codegen): Likewise.
(createnativestub): Likewise.
* src/vm/jit/alpha/asmpart.S (asm_wrapper_patcher): Likewise.
* src/vm/jit/i386/codegen.c (codegen): Likewise.
(createnativestub): Likewise.
* src/vm/jit/i386/asmpart.S (asm_wrapper_patcher): Likewise.
* src/vm/jit/mips/codegen.c (codegen): Likewise.
(createnativestub): Likewise.
* src/vm/jit/mips/asmpart.S (asm_wrapper_patcher): Likewise.
* src/vm/jit/powerpc/codegen.c (codegen): Likewise.
(createnativestub): Likewise.
* src/vm/jit/powerpc/asmpart.S (asm_wrapper_patcher): Likewise.
* src/vm/jit/powerpc64/codegen.c (codegen): Likewise.
(createnativestub): Likewise.
* src/vm/jit/powerpc64/asmpart.S (asm_wrapper_patcher): Likewise.
* src/vm/jit/x86_64/codegen.c (codegen): Likewise.
(createnativestub): Likewise.
* src/vm/jit/x86_64/asmpart.S (asm_wrapper_patcher): Likewise.
Christian Thalinger
Edwin Steiner
- $Id: asmpart.S 5094 2006-07-10 13:51:38Z twisti $
+ $Id: asmpart.S 5145 2006-07-17 11:48:38Z twisti $
*/
.globl asm_abstractmethoderror
- .globl asm_wrapper_patcher
+ .globl asm_patcher_wrapper
.globl asm_replacement_out
.globl asm_replacement_in
.end asm_abstractmethoderror
-/* asm_wrapper_patcher *********************************************************
+/* asm_patcher_wrapper *********************************************************
XXX
*******************************************************************************/
- .ent asm_wrapper_patcher
+ .ent asm_patcher_wrapper
-asm_wrapper_patcher:
+asm_patcher_wrapper:
lda sp,-((2+12+27+4)*8)(sp) /* create stack frame */
SAVE_RETURN_REGISTERS(0) /* save 1 int/1 float return registers */
stq ra,(2+12+27+2)*8(sp) /* save method return address (for leafs) */
stq pv,(2+12+27+3)*8(sp) /* save pv of calling java function */
- br ra,L_asm_wrapper_patcher_load_gp
-L_asm_wrapper_patcher_load_gp:
+ br ra,L_asm_patcher_wrapper_load_gp
+L_asm_patcher_wrapper_load_gp:
ldgp gp,0(ra) /* load gp (it's not set correctly in jit) */
lda a0,(2+12+27+4)*8(sp) /* pass SP of patcher stub */
ldq pv,(2+12+27+3)*8(sp) /* restore pv of calling java function */
ldq itmp3,(0+2+12+27+4)*8(sp) /* get return value */
- bne itmp3,L_asm_wrapper_patcher_exception
+ bne itmp3,L_asm_patcher_wrapper_exception
ldq itmp3,(5+2+12+27+4)*8(sp) /* get RA to JIT */
lda sp,(6+2+12+27+4)*8(sp) /* remove stack frame */
jmp zero,(itmp3) /* jump to new patched code */
-L_asm_wrapper_patcher_exception:
+L_asm_patcher_wrapper_exception:
mov itmp3,xptr /* get exception */
ldq xpc,(5+2+12+27+4)*8(sp) /* RA is xpc */
lda sp,(6+2+12+27+4)*8(sp) /* remove stack frame */
br L_asm_handle_exception
- .end asm_wrapper_patcher
+ .end asm_patcher_wrapper
/* asm_replacement_out *********************************************************
Christian Ullrich
Edwin Steiner
- $Id: codegen.c 5125 2006-07-12 22:12:47Z twisti $
+ $Id: codegen.c 5145 2006-07-17 11:48:38Z twisti $
*/
M_ALD(REG_ITMP3, REG_PV, disp);
M_AST(REG_ITMP3, REG_SP, 0 * 8);
- disp = dseg_addaddress(cd, asm_wrapper_patcher);
+ disp = dseg_addaddress(cd, asm_patcher_wrapper);
M_ALD(REG_ITMP3, REG_PV, disp);
M_JMP(REG_ZERO, REG_ITMP3);
}
M_ALD(REG_ITMP3, REG_PV, disp);
M_AST(REG_ITMP3, REG_SP, 0 * 8);
- disp = dseg_addaddress(cd, asm_wrapper_patcher);
+ disp = dseg_addaddress(cd, asm_patcher_wrapper);
M_ALD(REG_ITMP3, REG_PV, disp);
M_JMP(REG_ZERO, REG_ITMP3);
}
Changes: Christian Thalinger
Edwin Steiner
- $Id: asmpart.h 5053 2006-06-28 19:11:20Z twisti $
+ $Id: asmpart.h 5145 2006-07-17 11:48:38Z twisti $
*/
void asm_abstractmethoderror(void);
/* wrapper for code patching functions */
-void asm_wrapper_patcher(void);
+void asm_patcher_wrapper(void);
/* functions for on-stack replacement */
void asm_replacement_out(void);
Changes: Joseph Wenninger
Edwin Steiner
- $Id: asmpart.S 5109 2006-07-11 19:17:23Z twisti $
+ $Id: asmpart.S 5145 2006-07-17 11:48:38Z twisti $
*/
.globl asm_abstractmethoderror
- .globl asm_wrapper_patcher
+ .globl asm_patcher_wrapper
.globl asm_replacement_out
.globl asm_replacement_in
jmp L_asm_handle_exception
-/* asm_wrapper_patcher *********************************************************
+/* asm_patcher_wrapper *********************************************************
XXX
*******************************************************************************/
-asm_wrapper_patcher:
+asm_patcher_wrapper:
sub $((2+4)*4),sp /* create stack frame */
mov itmp1,(0+4)*4(sp) /* save itmp1 and itmp2 */
add $((6+2+4)*4),sp /* remove stack frame, keep RA */
test itmp3,itmp3 /* exception thrown? */
- jne L_asm_wrapper_patcher_exception
+ jne L_asm_patcher_wrapper_exception
ret /* jump to new patched code */
-L_asm_wrapper_patcher_exception:
+L_asm_patcher_wrapper_exception:
mov itmp3,xptr /* get exception */
pop xpc /* get and remove return address */
jmp L_asm_handle_exception
Christian Ullrich
Edwin Steiner
- $Id: codegen.c 5124 2006-07-12 21:59:24Z twisti $
+ $Id: codegen.c 5145 2006-07-17 11:48:38Z twisti $
*/
M_PUSH_IMM(pref->ref);
M_PUSH_IMM(pref->patcher);
- M_MOV_IMM(asm_wrapper_patcher, REG_ITMP3);
+ M_MOV_IMM(asm_patcher_wrapper, REG_ITMP3);
M_JMP(REG_ITMP3);
}
}
M_PUSH_IMM(pref->ref);
M_PUSH_IMM(pref->patcher);
- M_MOV_IMM(asm_wrapper_patcher, REG_ITMP3);
+ M_MOV_IMM(asm_patcher_wrapper, REG_ITMP3);
M_JMP(REG_ITMP3);
}
}
codegen_finish(jd);
- return jd->code->entrypoint;
+ return code->entrypoint;
}
Changes: Christian Thalinger
Edwin Steiner
- $Id: asmpart.S 5063 2006-07-02 10:42:03Z twisti $
+ $Id: asmpart.S 5145 2006-07-17 11:48:38Z twisti $
*/
.globl asm_abstractmethoderror
- .globl asm_wrapper_patcher
+ .globl asm_patcher_wrapper
.globl asm_replacement_out
.globl asm_replacement_in
b asm_handle_nat_exception
-/* asm_wrapper_patcher *********************************************************
+/* asm_patcher_wrapper *********************************************************
XXX
*******************************************************************************/
- .ent asm_wrapper_patcher
+ .ent asm_patcher_wrapper
-asm_wrapper_patcher:
+asm_patcher_wrapper:
aaddiu sp,sp,-((2+16+22+4)*8+sizestackframeinfo) /* create stack frame */
SAVE_RETURN_REGISTERS(0) /* save 1 int/1 float return registers */
ald pv,(2+16+22+3)*8(sp) /* restore pv of calling java function */
ald itmp3,((0+2+16+22+4)*8+sizestackframeinfo)(sp) /* get return value*/
- beqz itmp3,L_asm_wrapper_patcher_exception
+ beqz itmp3,L_asm_patcher_wrapper_exception
ald itmp3,((5+2+16+22+4)*8+sizestackframeinfo)(sp) /* get RA to JIT */
aaddiu sp,sp,((6+2+16+22+4)*8+sizestackframeinfo) /* remove stack frame */
jr itmp3 /* jump to new patched code */
-L_asm_wrapper_patcher_exception:
+L_asm_patcher_wrapper_exception:
ald xpc,((5+2+16+22+4)*8+sizestackframeinfo)(sp) /* RA to JIT is xpc */
aaddiu sp,sp,((6+2+16+22+4)*8+sizestackframeinfo) /* remove stack frame */
sd zero,0(v0) /* clear the exception pointer */
b asm_handle_exception
- .end asm_wrapper_patcher
+ .end asm_patcher_wrapper
/* asm_replacement_out *********************************************************
This module generates MIPS machine code for a sequence of
intermediate code commands (ICMDs).
- $Id: codegen.c 5127 2006-07-13 10:26:38Z twisti $
+ $Id: codegen.c 5145 2006-07-17 11:48:38Z twisti $
*/
M_ALD(REG_ITMP3, REG_PV, disp);
M_AST(REG_ITMP3, REG_SP, 0 * 8);
- disp = dseg_addaddress(cd, asm_wrapper_patcher);
+ disp = dseg_addaddress(cd, asm_patcher_wrapper);
M_ALD(REG_ITMP3, REG_PV, disp);
M_JMP(REG_ITMP3);
M_NOP;
M_ALD(REG_ITMP3, REG_PV, disp);
M_AST(REG_ITMP3, REG_SP, 0 * 8);
- disp = dseg_addaddress(cd, asm_wrapper_patcher);
+ disp = dseg_addaddress(cd, asm_patcher_wrapper);
M_ALD(REG_ITMP3, REG_PV, disp);
M_JMP(REG_ITMP3);
M_NOP;
codegen_finish(jd);
- return jd->code->entrypoint;
+ return code->entrypoint;
}
Changes: Christian Thalinger
Edwin Steiner
- $Id: asmpart.S 5084 2006-07-06 22:52:23Z twisti $
+ $Id: asmpart.S 5145 2006-07-17 11:48:38Z twisti $
*/
.globl asm_abstractmethoderror
- .globl asm_wrapper_patcher
+ .globl asm_patcher_wrapper
.globl asm_replacement_out
.globl asm_replacement_in
b L_asm_handle_nat_exception
-/* asm_wrapper_patcher *********************************************************
+/* asm_patcher_wrapper *********************************************************
XXX
*******************************************************************************/
-asm_wrapper_patcher:
+asm_patcher_wrapper:
mflr r0 /* get Java return address (leaf) */
stw r0,6*4(sp) /* store it in the stub stackframe */
/* keep stack 16-bytes aligned: 6+1+37 = 44 */
mtlr r0
mr. itmp3,itmp3 /* check for an exception */
- bne L_asm_wrapper_patcher_exception
+ bne L_asm_patcher_wrapper_exception
/* get return address (into JIT code) */
lwz itmp3,(5+LA_WORD_SIZE+5+58)*4(sp)
mtctr itmp3
bctr /* jump to new patched code */
-L_asm_wrapper_patcher_exception:
+L_asm_patcher_wrapper_exception:
mr xptr,itmp3 /* get exception */
lwz xpc,(5+LA_WORD_SIZE+5+58)*4(sp)
addi sp,sp,(8+LA_WORD_SIZE+5+58)*4
Christian Ullrich
Edwin Steiner
- $Id: codegen.c 5129 2006-07-13 11:54:16Z twisti $
+ $Id: codegen.c 5145 2006-07-17 11:48:38Z twisti $
*/
M_ALD(REG_ITMP3, REG_PV, disp);
M_AST_INTERN(REG_ITMP3, REG_SP, 0 * 4);
- disp = dseg_addaddress(cd, asm_wrapper_patcher);
+ disp = dseg_addaddress(cd, asm_patcher_wrapper);
M_ALD(REG_ITMP3, REG_PV, disp);
M_MTCTR(REG_ITMP3);
M_RTS;
M_ALD(REG_ITMP3, REG_PV, disp);
M_AST(REG_ITMP3, REG_SP, 0 * 4);
- disp = dseg_addaddress(cd, asm_wrapper_patcher);
+ disp = dseg_addaddress(cd, asm_patcher_wrapper);
M_ALD(REG_ITMP3, REG_PV, disp);
M_MTCTR(REG_ITMP3);
M_RTS;
codegen_finish(jd);
- return jd->code->entrypoint;
+ return code->entrypoint;
}
Changes: Christian Thalinger
Edwin Steiner
- $Id: asmpart.S 5081 2006-07-06 13:59:01Z tbfg $
+ $Id: asmpart.S 5145 2006-07-17 11:48:38Z twisti $
*/
.globl asm_abstractmethoderror
- .globl asm_wrapper_patcher
+ .globl asm_patcher_wrapper
.globl asm_replacement_out
.globl asm_replacement_in
b L_asm_handle_nat_exception
-/* asm_wrapper_patcher *********************************************************
+/* asm_patcher_wrapper *********************************************************
XXX
*******************************************************************************/
-asm_wrapper_patcher:
+asm_patcher_wrapper:
mflr r0 /* get Java return address (leaf) */
stw r0,6*4(sp) /* store it in the stub stackframe */
/* keep stack 16-bytes aligned: 6+1+37 = 44 */
mtlr r0
mr. itmp3,itmp3 /* check for an exception */
- bne L_asm_wrapper_patcher_exception
+ bne L_asm_patcher_wrapper_exception
/* get return address (into JIT code) */
lwz itmp3,(5+LA_WORD_SIZE+5+58)*4(sp)
mtctr itmp3
bctr /* jump to new patched code */
-L_asm_wrapper_patcher_exception:
+L_asm_patcher_wrapper_exception:
mr xptr,itmp3 /* get exception */
lwz xpc,(5+LA_WORD_SIZE+5+58)*4(sp)
addi sp,sp,(8+LA_WORD_SIZE+5+58)*4
Christian Ullrich
Edwin Steiner
- $Id: codegen.c 5082 2006-07-06 14:10:23Z tbfg $
+ $Id: codegen.c 5145 2006-07-17 11:48:38Z twisti $
*/
M_ALD(REG_ITMP3, REG_PV, disp);
M_AST_INTERN(REG_ITMP3, REG_SP, 0 * 4);
- disp = dseg_addaddress(cd, asm_wrapper_patcher);
+ disp = dseg_addaddress(cd, asm_patcher_wrapper);
M_ALD(REG_ITMP3, REG_PV, disp);
M_MTCTR(REG_ITMP3);
M_RTS;
M_ALD(REG_ITMP3, REG_PV, disp);
M_AST(REG_ITMP3, REG_SP, 0 * 4);
- disp = dseg_addaddress(cd, asm_wrapper_patcher);
+ disp = dseg_addaddress(cd, asm_patcher_wrapper);
M_ALD(REG_ITMP3, REG_PV, disp);
M_MTCTR(REG_ITMP3);
M_RTS;
codegen_finish(jd);
- return jd->code->entrypoint;
+ return code->entrypoint;
}
Changes: Edwin Steiner
- $Id: asmpart.S 5142 2006-07-17 09:47:02Z twisti $
+ $Id: asmpart.S 5145 2006-07-17 11:48:38Z twisti $
*/
.globl asm_abstractmethoderror
- .globl asm_wrapper_patcher
+ .globl asm_patcher_wrapper
.globl asm_replacement_out
.globl asm_replacement_in
jmp L_asm_handle_exception
-/* asm_wrapper_patcher *********************************************************
+/* asm_patcher_wrapper *********************************************************
XXX
*******************************************************************************/
-asm_wrapper_patcher:
+asm_patcher_wrapper:
push bp /* save base pointer */
mov sp,bp /* move actual sp to bp */
sub $((3+ARG_CNT+TMP_CNT)*8+sizestackframeinfo),sp
add $(5*8),sp /* remove patcher stackframe, keep RA */
test itmp3,itmp3 /* exception thrown? */
- jne L_asm_wrapper_patcher_exception
+ jne L_asm_patcher_wrapper_exception
ret /* call new patched code */
-L_asm_wrapper_patcher_exception:
+L_asm_patcher_wrapper_exception:
mov itmp3,xptr /* get exception */
pop xpc /* get and remove return address */
jmp L_asm_handle_exception
Changes: Christian Ullrich
Edwin Steiner
- $Id: codegen.c 5123 2006-07-12 21:45:34Z twisti $
+ $Id: codegen.c 5145 2006-07-17 11:48:38Z twisti $
*/
M_MOV_IMM(pref->patcher, REG_ITMP3);
M_PUSH(REG_ITMP3);
- M_MOV_IMM(asm_wrapper_patcher, REG_ITMP3);
+ M_MOV_IMM(asm_patcher_wrapper, REG_ITMP3);
M_JMP(REG_ITMP3);
}
}
M_MOV_IMM(pref->patcher, REG_ITMP3);
M_PUSH(REG_ITMP3);
- M_MOV_IMM(asm_wrapper_patcher, REG_ITMP3);
+ M_MOV_IMM(asm_patcher_wrapper, REG_ITMP3);
M_JMP(REG_ITMP3);
}
}
codegen_finish(jd);
- return jd->code->entrypoint;
+ return code->entrypoint;
}