(md_cacheflush, md_icacheflush, md_dcacheflush): New method.
* src/vm/jit/mips/codegen.c: Use new exception stubs.
* src/vm/jit/mips/codegen.h (gen_nullptr_check, gen_bound_check)
(gen_div_check): Use new add reference functions.
* src/vm/jit/mips/patcher.c: Replaced cacheflush with md_icacheflush
or md_dcacheflush.
* src/vm/jit/mips/asmpart.S: (asm_calljavafunction): Removed.
(asm_calljavafunction2): Renamed to asm_vm_call_method. Pointer to
vm_arg block is now in a2. Use new defines.
Changes: Christian Thalinger
- $Id: asmpart.S 4440 2006-02-05 12:03:43Z twisti $
+ $Id: asmpart.S 4640 2006-03-16 17:24:18Z twisti $
*/
.set noat
-/* exported functions and variables *******************************************/
+/* export functions ***********************************************************/
- .globl asm_calljavafunction
- .globl asm_calljavafunction_int
-
- .globl asm_calljavafunction2
- .globl asm_calljavafunction2int
- .globl asm_calljavafunction2long
- .globl asm_calljavafunction2float
- .globl asm_calljavafunction2double
+ .globl asm_vm_call_method
+ .globl asm_vm_call_method_int
+ .globl asm_vm_call_method_long
+ .globl asm_vm_call_method_float
+ .globl asm_vm_call_method_double
.globl asm_call_jit_compiler
.globl asm_handle_exception
* *
*******************************************************************************/
- .ent asm_calljavafunction
-
- .align 3
-
- .dword 0 /* catch type all */
- .dword calljava_xhandler /* handler pc */
- .dword calljava_xhandler /* end pc */
- .dword asm_calljavafunction /* start pc */
- .word 1 /* extable size */
- .word 0 /* 4-byte ALIGNMENT PADDING */
- .dword 0 /* line number table start */
- .dword 0 /* line number table size */
- .word 0 /* 4-byte ALIGNMENT PADDING */
- .word 0 /* fltsave */
- .word 0 /* intsave */
- .word 0 /* isleaf */
- .word 0 /* IsSync */
- .word 0 /* frame size */
- .dword 0 /* method pointer (pointer to name) */
-
-asm_calljavafunction:
-asm_calljavafunction_int:
- .set noreorder /* XXX we need to recompute pv */
-
- aaddiu sp,sp,-10*8 /* allocate stack space */
- ast ra,0(sp) /* save return address */
-
- bal call_java_pc
- ast pv,3*8(sp) /* procedure vector (delay slot) */
-call_java_pc:
- aaddiu pv,ra,-4*4
-
- sdc1 fss0,4*8(sp) /* save non JavaABI saved flt registers */
- sdc1 fss1,5*8(sp)
- sdc1 fss2,6*8(sp)
- sdc1 fss3,7*8(sp)
- sdc1 fss4,8*8(sp)
- sdc1 fss5,9*8(sp)
-
- move itmp1,a0 /* pass method pointer via tmp1 */
-
- move a0,a1 /* pass the remaining parameters */
- move a1,a2
- move a2,a3
- move a3,a4
-
- ala mptr,asm_call_jit_compiler/* fake virtual function call (2 instr) */
- ast mptr,1*8(sp) /* store function address */
- move mptr,sp /* set method pointer */
-
- ald pv,1*8(mptr) /* method call as in Java */
- jalr pv /* call JIT compiler */
- nop
-L_asm_calljavafunction_recompute:
-/* aaddiu pv,ra,(asm_calljavafunction - L_asm_calljavafunction_recompute)*/
- aaddiu pv,ra,-22*4
-
- .set reorder /* XXX we need to recompute pv */
-
-calljava_return:
- ald ra,0(sp) /* restore return address */
- ald pv,3*8(sp) /* restore procedure vector */
-
- ldc1 fss0,4*8(sp) /* restore non JavaABI saved flt regs */
- ldc1 fss1,5*8(sp)
- ldc1 fss2,6*8(sp)
- ldc1 fss3,7*8(sp)
- ldc1 fss4,8*8(sp)
- ldc1 fss5,9*8(sp)
-
- aaddiu sp,sp,10*8 /* free stack space */
- j ra /* return */
-
-calljava_xhandler:
- move a0,itmp1
- jal builtin_throw_exception
- move v0,zero /* clear return value for exception */
- b calljava_return
-
- .end asm_calljavafunction
-
-
- .ent asm_calljavafunction2
+ .ent asm_vm_call_method
.align 3
.dword 0 /* catch type all */
.dword calljava_xhandler2 /* handler pc */
.dword calljava_xhandler2 /* end pc */
- .dword asm_calljavafunction2 /* start pc */
+ .dword asm_vm_call_method /* start pc */
.word 1 /* extable size */
.word 0 /* 4-byte ALIGNMENT PADDING */
.dword 0 /* line number table start */
.word 0 /* frame size */
.dword 0 /* method pointer (pointer to name) */
-asm_calljavafunction2:
-asm_calljavafunction2int:
-asm_calljavafunction2long:
-asm_calljavafunction2float:
-asm_calljavafunction2double:
+asm_vm_call_method:
+asm_vm_call_method_int:
+asm_vm_call_method_long:
+asm_vm_call_method_float:
+asm_vm_call_method_double:
.set noreorder /* XXX we need to recompute pv */
aaddiu sp,sp,-12*8 /* allocate stack space (only 11 needed)*/
ast ra,0(sp) /* save return address */
- bal call_java_pc2
+ bal L_asm_vm_call_method_compute_pv
ast pv,1*8(sp) /* procedure vector */
-call_java_pc2:
+L_asm_vm_call_method_compute_pv:
aaddiu pv,ra,-4*4
ast s7,3*8(sp)
ast a0,4*8(sp) /* save method pointer for compiler */
- move t0,a3
+ move t0,a2
move s7,a1
blez s7,calljava_argsloaded
nop
- ald a0,offjniitem(t0)
- ldc1 fa0,offjniitem(t0)
+ ald a0,offvmargdata(t0)
+ ldc1 fa0,offvmargdata(t0)
daddi s7,s7,-1
blez s7,calljava_argsloaded
nop
- ald a1,offjniitem+sizejniblock*1(t0)
- ldc1 fa1,offjniitem+sizejniblock*1(t0)
+ ald a1,offvmargdata+sizevmarg*1(t0)
+ ldc1 fa1,offvmargdata+sizevmarg*1(t0)
daddi s7,s7,-1
blez s7,calljava_argsloaded
nop
- ald a2,offjniitem+sizejniblock*2(t0)
- ldc1 fa2,offjniitem+sizejniblock*2(t0)
+ ald a2,offvmargdata+sizevmarg*2(t0)
+ ldc1 fa2,offvmargdata+sizevmarg*2(t0)
daddi s7,s7,-1
blez s7,calljava_argsloaded
nop
- ald a3,offjniitem+sizejniblock*3(t0)
- ldc1 fa3,offjniitem+sizejniblock*3(t0)
+ ald a3,offvmargdata+sizevmarg*3(t0)
+ ldc1 fa3,offvmargdata+sizevmarg*3(t0)
daddi s7,s7,-1
blez s7,calljava_argsloaded
nop
- ald a4,offjniitem+sizejniblock*4(t0)
- ldc1 fa4,offjniitem+sizejniblock*4(t0)
+ ald a4,offvmargdata+sizevmarg*4(t0)
+ ldc1 fa4,offvmargdata+sizevmarg*4(t0)
daddi s7,s7,-1
blez s7,calljava_argsloaded
nop
- ald a5,offjniitem+sizejniblock*5(t0)
- ldc1 fa5,offjniitem+sizejniblock*5(t0)
+ ald a5,offvmargdata+sizevmarg*5(t0)
+ ldc1 fa5,offvmargdata+sizevmarg*5(t0)
daddi s7,s7,-1
blez s7,calljava_argsloaded
nop
- ald a6,offjniitem+sizejniblock*6(t0)
- ldc1 fa6,offjniitem+sizejniblock*6(t0)
+ ald a6,offvmargdata+sizevmarg*6(t0)
+ ldc1 fa6,offvmargdata+sizevmarg*6(t0)
daddi s7,s7,-1
blez s7,calljava_argsloaded
nop
- ald a7,offjniitem+sizejniblock*7(t0)
- ldc1 fa7,offjniitem+sizejniblock*7(t0)
+ ald a7,offvmargdata+sizevmarg*7(t0)
+ ldc1 fa7,offvmargdata+sizevmarg*7(t0)
daddi s7,s7,-1
calljava_argsloaded:
aaddu t2,t2,t8
calljava_copyloop:
- ald t3,offjniitem+sizejniblock*8(t0)
+ ald t3,offvmargdata+sizevmarg*8(t0)
ast t3,0(t2)
ala t1,1(t1)
- ala t0,sizejniblock(t0)
+ ala t0,sizevmarg(t0)
ala t2,8(t2)
bnez t1,calljava_copyloop
nop
ald pv,1*8(mptr) /* method call as in Java */
jalr pv /* call JIT compiler */
nop
-L_asm_calljavafunction2_recompute:
-/* aaddiu pv,ra,(asm_calljavafunction2 - L_asm_calljavafunction2_recompute)*/
+L_asm_vm_call_method_recompute_pv:
+/* aaddiu pv,ra,(asm_vm_call_method - L_asm_vm_call_method_recompute_pv)*/
aaddiu pv,ra,-76*4 /* recompute procedure vector */
.set reorder /* XXX we need to recompute pv */
jal builtin_throw_exception
b calljava_return2
- .end asm_calljavafunction2
+ .end asm_vm_call_method
/****************** function asm_call_jit_compiler *****************************
This module generates MIPS machine code for a sequence of
intermediate code commands (ICMDs).
- $Id: codegen.c 4598 2006-03-14 22:16:47Z edwin $
+ $Id: codegen.c 4640 2006-03-16 17:24:18Z twisti $
*/
} else {
M_BEQZ(rd->argintregs[0], 0);
- codegen_addxnullrefs(cd, mcodeptr);
+ codegen_add_nullpointerexception_ref(cd, mcodeptr);
p = dseg_addaddress(cd, BUILTIN_monitorenter);
M_ALD(REG_ITMP3, REG_PV, p);
M_JSR(REG_RA, REG_ITMP3);
var_to_reg_int(s1, src, REG_ITMP1);
M_BEQZ(s1, 0);
- codegen_addxnullrefs(cd, mcodeptr);
+ codegen_add_nullpointerexception_ref(cd, mcodeptr);
M_NOP;
break;
M_NOP;
M_BEQZ(REG_RESULT, 0);
- codegen_addxstorerefs(cd, mcodeptr);
+ codegen_add_arraystoreexception_ref(cd, mcodeptr);
M_NOP;
var_to_reg_int(s1, src->prev->prev, REG_ITMP1);
if (iptr->op1 == true) {
M_BEQZ(REG_RESULT, 0);
- codegen_addxexceptionrefs(cd, mcodeptr);
+ codegen_add_fillinstacktrace_ref(cd, mcodeptr);
M_NOP;
}
break;
case ICMD_INVOKESPECIAL:
M_BEQZ(rd->argintregs[0], 0);
- codegen_addxnullrefs(cd, mcodeptr);
+ codegen_add_nullpointerexception_ref(cd, mcodeptr);
M_NOP;
/* fall through */
M_ILD(REG_ITMP3, REG_ITMP2, OFFSET(vftbl_t, interfacetablelength));
M_IADD_IMM(REG_ITMP3, -superindex, REG_ITMP3);
M_BLEZ(REG_ITMP3, 0);
- codegen_addxcastrefs(cd, mcodeptr);
+ codegen_add_classcastexception_ref(cd, mcodeptr);
M_NOP;
M_ALD(REG_ITMP3, REG_ITMP2,
OFFSET(vftbl_t, interfacetable[0]) -
superindex * sizeof(methodptr*));
M_BEQZ(REG_ITMP3, 0);
- codegen_addxcastrefs(cd, mcodeptr);
+ codegen_add_classcastexception_ref(cd, mcodeptr);
M_NOP;
if (!super) {
/* } */
M_CMPULT(REG_ITMP3, REG_ITMP2, REG_ITMP3);
M_BNEZ(REG_ITMP3, 0);
- codegen_addxcastrefs(cd, mcodeptr);
+ codegen_add_classcastexception_ref(cd, mcodeptr);
M_NOP;
}
d = reg_of_var(rd, iptr->dst, s1);
M_NOP;
M_BEQZ(REG_RESULT, 0);
- codegen_addxcastrefs(cd, mcodeptr);
+ codegen_add_classcastexception_ref(cd, mcodeptr);
M_NOP;
var_to_reg_int(s1, src, REG_ITMP1);
/* check for exception before result assignment */
M_BEQZ(REG_RESULT, 0);
- codegen_addxexceptionrefs(cd, mcodeptr);
+ codegen_add_fillinstacktrace_ref(cd, mcodeptr);
M_NOP;
d = reg_of_var(rd, iptr->dst, REG_RESULT);
dseg_createlinenumbertable(cd);
+#if 0
{
s4 *xcodeptr;
branchref *bref;
M_NOP;
}
}
+#endif
+
- /* generate patcher stub call code */
+ /* generate exception and patcher stubs */
{
- patchref *pref;
- u8 mcode;
- s4 *tmpmcodeptr;
+ exceptionref *eref;
+ patchref *pref;
+ u8 mcode;
+ s4 *savedmcodeptr;
+ s4 *tmpmcodeptr;
+
+ savedmcodeptr = NULL;
+
+ /* generate exception stubs */
+
+ for (eref = cd->exceptionrefs; eref != NULL; eref = eref->next) {
+ gen_resolvebranch((u1 *) cd->mcodebase + eref->branchpos,
+ eref->branchpos,
+ (u1 *) mcodeptr - cd->mcodebase);
+
+ MCODECHECK(100);
+
+ /* Check if the exception is an
+ ArrayIndexOutOfBoundsException. If so, move index register
+ into REG_ITMP1. */
+
+ if (eref->reg != -1)
+ M_MOV(eref->reg, REG_ITMP1);
+
+ /* calcuate exception address */
+
+ M_LDA(REG_ITMP2_XPC, REG_PV, eref->branchpos - 4);
+
+ /* move function to call into REG_ITMP3 */
+
+ disp = dseg_addaddress(cd, eref->function);
+ M_ALD(REG_ITMP3, REG_PV, disp);
+
+ if (savedmcodeptr != NULL) {
+ M_BR(savedmcodeptr - mcodeptr);
+ M_NOP;
+
+ } else {
+ savedmcodeptr = mcodeptr;
+
+ M_MOV(REG_PV, rd->argintregs[0]);
+ M_MOV(REG_SP, rd->argintregs[1]);
+
+ if (m->isleafmethod)
+ M_MOV(REG_RA, rd->argintregs[2]);
+ else
+ M_ALD(rd->argintregs[2],
+ REG_SP, parentargs_base * 8 - SIZEOF_VOID_P);
+
+ M_MOV(REG_ITMP2_XPC, rd->argintregs[3]);
+ M_MOV(REG_ITMP1, rd->argintregs[4]);
+
+ M_ASUB_IMM(REG_SP, 2 * 8, REG_SP);
+ M_AST(REG_ITMP2_XPC, REG_SP, 0 * 8);
+
+ if (m->isleafmethod)
+ M_AST(REG_RA, REG_SP, 1 * 8);
+
+ M_JSR(REG_RA, REG_ITMP3);
+ M_NOP;
+ M_MOV(REG_RESULT, REG_ITMP1_XPTR);
+
+ if (m->isleafmethod)
+ M_ALD(REG_RA, REG_SP, 1 * 8);
+
+ M_ALD(REG_ITMP2_XPC, REG_SP, 0 * 8);
+ M_AADD_IMM(REG_SP, 2 * 8, REG_SP);
+
+ a = dseg_addaddress(cd, asm_handle_exception);
+ M_ALD(REG_ITMP3, REG_PV, a);
+ M_JMP(REG_ITMP3);
+ M_NOP;
+ }
+ }
+
+
+ /* generate code patching stub call code */
for (pref = cd->patchrefs; pref != NULL; pref = pref->next) {
/* check code segment size */
MCODECHECK(100);
- /* Get machine code which is patched back in later. The call is */
- /* 2 instruction words long. */
+ /* Get machine code which is patched back in later. The
+ call is 2 instruction words long. */
- xcodeptr = (s4 *) (cd->mcodebase + pref->branchpos);
+ tmpmcodeptr = (s4 *) (cd->mcodebase + pref->branchpos);
- /* We need to split this, because an unaligned 8 byte read causes */
- /* a SIGSEGV. */
+ /* We need to split this, because an unaligned 8 byte read
+ causes a SIGSEGV. */
- mcode = ((u8) xcodeptr[1] << 32) + (u4) xcodeptr[0];
+ mcode = ((u8) tmpmcodeptr[1] << 32) + (u4) tmpmcodeptr[0];
- /* patch in the call to call the following code (done at compile */
- /* time) */
+ /* Patch in the call to call the following code (done at
+ compile time). */
- tmpmcodeptr = mcodeptr; /* save current mcodeptr */
- mcodeptr = xcodeptr; /* set mcodeptr to patch position */
+ savedmcodeptr = mcodeptr; /* save current mcodeptr */
+ mcodeptr = tmpmcodeptr; /* set mcodeptr to patch position */
- disp = (s4) (tmpmcodeptr - (xcodeptr + 1));
+ disp = (s4) (savedmcodeptr - (tmpmcodeptr + 1));
if ((disp < (s4) 0xffff8000) || (disp > (s4) 0x00007fff)) {
*exceptionptr =
M_BR(disp);
M_NOP;
- mcodeptr = tmpmcodeptr; /* restore the current mcodeptr */
+ mcodeptr = savedmcodeptr; /* restore the current mcodeptr */
/* create stack frame */
M_NOP;
}
}
- }
codegen_finish(m, cd, (s4) ((u1 *) mcodeptr - cd->mcodebase));
{
patchref *pref;
- s4 *xcodeptr;
- s8 mcode;
+ u8 mcode;
+ s4 *savedmcodeptr;
s4 *tmpmcodeptr;
for (pref = cd->patchrefs; pref != NULL; pref = pref->next) {
- /* Get machine code which is patched back in later. The call is */
- /* 2 instruction words long. */
+ /* Get machine code which is patched back in later. The
+ call is 2 instruction words long. */
- xcodeptr = (s4 *) (cd->mcodebase + pref->branchpos);
+ tmpmcodeptr = (s4 *) (cd->mcodebase + pref->branchpos);
- /* We need to split this, because an unaligned 8 byte read causes */
- /* a SIGSEGV. */
+ /* We need to split this, because an unaligned 8 byte read
+ causes a SIGSEGV. */
- mcode = ((u8) xcodeptr[1] << 32) + (u4) xcodeptr[0];
+ mcode = ((u8) tmpmcodeptr[1] << 32) + (u4) tmpmcodeptr[0];
- /* patch in the call to call the following code (done at compile */
- /* time) */
+ /* Patch in the call to call the following code (done at
+ compile time). */
- tmpmcodeptr = mcodeptr; /* save current mcodeptr */
- mcodeptr = xcodeptr; /* set mcodeptr to patch position */
+ savedmcodeptr = mcodeptr; /* save current mcodeptr */
+ mcodeptr = tmpmcodeptr; /* set mcodeptr to patch position */
- M_BRS(tmpmcodeptr - (xcodeptr + 1));
+ M_BRS(savedmcodeptr - (tmpmcodeptr + 1));
M_NOP; /* branch delay slot */
- mcodeptr = tmpmcodeptr; /* restore the current mcodeptr */
+ mcodeptr = savedmcodeptr; /* restore the current mcodeptr */
/* create stack frame */
Authors: Andreas Krall
- $Id: codegen.h 4357 2006-01-22 23:33:38Z twisti $
+ $Id: codegen.h 4640 2006-03-16 17:24:18Z twisti $
*/
/* additional functions and macros to generate code ***************************/
-/* gen_nullptr_check(objreg) */
-
#define gen_nullptr_check(objreg) \
if (checknull) { \
- M_BEQZ((objreg), 0); \
- codegen_addxnullrefs(cd, mcodeptr); \
+ M_BEQZ(objreg, 0); \
+ codegen_add_nullpointerexception_ref(cd, mcodeptr); \
M_NOP; \
}
M_ILD(REG_ITMP3, s1, OFFSET(java_arrayheader, size)); \
M_CMPULT(s2, REG_ITMP3, REG_ITMP3); \
M_BEQZ(REG_ITMP3, 0); \
- codegen_addxboundrefs(cd, mcodeptr, s2); \
+ codegen_add_arrayindexoutofboundsexception_ref(cd, mcodeptr, s2); \
M_NOP; \
}
#define gen_div_check(r) \
- M_BEQZ((r), 0); \
- codegen_addxdivrefs(cd, mcodeptr); \
- M_NOP;
+ do { \
+ M_BEQZ((r), 0); \
+ codegen_add_arithmeticexception_ref(cd, mcodeptr); \
+ M_NOP; \
+ } while (0)
/* MCODECHECK(icnt) */
Changes:
- $Id: md.c 4498 2006-02-12 23:43:09Z twisti $
+ $Id: md.c 4640 2006-03-16 17:24:18Z twisti $
*/
#include "config.h"
#include <assert.h>
-#include <sys/mman.h>
#include <unistd.h>
+#include <sys/cachectl.h>
+#include <sys/mman.h>
#include "vm/types.h"
}
+/* md_cacheflush ***************************************************************
+
+ Calls the system's function to flush the instruction and data
+ cache.
+
+*******************************************************************************/
+
+void md_cacheflush(u1 *addr, s4 nbytes)
+{
+ cacheflush(addr, nbytes, BCACHE);
+}
+
+
+/* md_icacheflush **************************************************************
+
+ Calls the system's function to flush the instruction cache.
+
+*******************************************************************************/
+
+void md_icacheflush(u1 *addr, s4 nbytes)
+{
+ cacheflush(addr, nbytes, ICACHE);
+}
+
+
+/* md_dcacheflush **************************************************************
+
+ Calls the system's function to flush the data cache.
+
+*******************************************************************************/
+
+void md_dcacheflush(u1 *addr, s4 nbytes)
+{
+ cacheflush(addr, nbytes, DCACHE);
+}
+
+
/*
* These are local overrides for various environment variables in Emacs.
* Please do not remove this and leave it at the end of the file, where
Changes:
- $Id: patcher.c 4530 2006-02-21 09:11:53Z twisti $
+ $Id: patcher.c 4640 2006-03-16 17:24:18Z twisti $
*/
#include "config.h"
-
-#include <sys/cachectl.h>
-
#include "vm/types.h"
#include "mm/memory.h"
/* synchronize instruction cache */
- cacheflush(ra, 2 * 4, ICACHE);
+ md_icacheflush(ra, 2 * 4);
/* patch the field value's address */
/* synchronize data cache */
- cacheflush(pv + disp, SIZEOF_VOID_P, DCACHE);
+ md_dcacheflush(pv + disp, SIZEOF_VOID_P);
PATCHER_MARK_PATCHED_MONITOREXIT;
if (opt_showdisassemble) {
#if SIZEOF_VOID_P == 4
if (fi->type == TYPE_LNG) {
- cacheflush(ra - 2 * 4, 4 * 4, ICACHE);
+ md_icacheflush(ra - 2 * 4, 4 * 4);
} else
#endif
- cacheflush(ra - 2 * 4, 3 * 4, ICACHE);
+ md_icacheflush(ra - 2 * 4, 3 * 4);
} else {
- cacheflush(ra, 2 * 4, ICACHE);
+ md_icacheflush(ra, 2 * 4);
}
PATCHER_MARK_PATCHED_MONITOREXIT;
/* synchronize instruction cache */
- cacheflush(ra, 2 * 4, ICACHE);
+ md_icacheflush(ra, 2 * 4);
/* patch the classinfo pointer */
/* synchronize data cache */
- cacheflush(pv + disp, SIZEOF_VOID_P * 1, DCACHE);
+ md_dcacheflush(pv + disp, SIZEOF_VOID_P);
PATCHER_MARK_PATCHED_MONITOREXIT;
/* synchronize instruction cache */
- cacheflush(ra, 2 * 4, ICACHE);
+ md_icacheflush(ra, 2 * 4);
/* patch the classinfo pointer */
/* synchronize data cache */
- cacheflush(pv + disp, SIZEOF_VOID_P, DCACHE);
+ md_dcacheflush(pv + disp, SIZEOF_VOID_P);
PATCHER_MARK_PATCHED_MONITOREXIT;
/* synchronize instruction cache */
- cacheflush(ra, 2 * 4, ICACHE);
+ md_icacheflush(ra, 2 * 4);
/* patch the classinfo pointer */
/* synchronize data cache */
- cacheflush(pv + disp, SIZEOF_VOID_P * 1, DCACHE);
+ md_dcacheflush(pv + disp, SIZEOF_VOID_P);
PATCHER_MARK_PATCHED_MONITOREXIT;
/* synchronize instruction cache */
- cacheflush(ra, 2 * 4, ICACHE);
+ md_icacheflush(ra, 2 * 4);
/* patch stubroutine */
/* synchronize data cache */
- cacheflush(pv + disp, SIZEOF_VOID_P, DCACHE);
+ md_dcacheflush(pv + disp, SIZEOF_VOID_P);
PATCHER_MARK_PATCHED_MONITOREXIT;
/* synchronize instruction cache */
if (opt_showdisassemble)
- cacheflush(ra - 2 * 4, 4 * 4, ICACHE);
+ md_icacheflush(ra - 2 * 4, 4 * 4);
else
- cacheflush(ra, 2 * 4, ICACHE);
+ md_icacheflush(ra, 2 * 4);
PATCHER_MARK_PATCHED_MONITOREXIT;
/* synchronize instruction cache */
if (opt_showdisassemble)
- cacheflush(ra - 2 * 4, 5 * 4, ICACHE);
+ md_icacheflush(ra - 2 * 4, 5 * 4);
else
- cacheflush(ra, 3 * 4, ICACHE);
+ md_icacheflush(ra, 3 * 4);
PATCHER_MARK_PATCHED_MONITOREXIT;
/* synchronize instruction cache */
- cacheflush(ra, 2 * 4, ICACHE);
+ md_icacheflush(ra, 2 * 4);
/* patch class flags */
/* synchronize data cache */
- cacheflush(pv + disp, sizeof(s4), DCACHE);
+ md_dcacheflush(pv + disp, sizeof(s4));
PATCHER_MARK_PATCHED_MONITOREXIT;
/* synchronize instruction cache */
if (opt_showdisassemble)
- cacheflush(ra - 2 * 4, 8 * 4, ICACHE);
+ md_icacheflush(ra - 2 * 4, 8 * 4);
else
- cacheflush(ra, 6 * 4, ICACHE);
+ md_icacheflush(ra, 6 * 4);
PATCHER_MARK_PATCHED_MONITOREXIT;
/* synchronize instruction cache */
- cacheflush(ra, 2 * 4, ICACHE);
+ md_icacheflush(ra, 2 * 4);
/* patch super class' vftbl */
/* synchronize data cache */
- cacheflush(pv + disp, SIZEOF_VOID_P, DCACHE);
+ md_dcacheflush(pv + disp, SIZEOF_VOID_P);
PATCHER_MARK_PATCHED_MONITOREXIT;
/* synchronize instruction cache */
- cacheflush(ra, 2 * 4, ICACHE);
+ md_icacheflush(ra, 2 * 4);
PATCHER_MARK_PATCHED_MONITOREXIT;
/* synchronize instruction cache */
- cacheflush(ra, 2 * 4, ICACHE);
+ md_icacheflush(ra, 2 * 4);
PATCHER_MARK_PATCHED_MONITOREXIT;
/* synchronize instruction cache */
- cacheflush(ra, 2 * 4, ICACHE);
+ md_icacheflush(ra, 2 * 4);
/* patch native function pointer */
/* synchronize data cache */
- cacheflush(pv + disp, SIZEOF_VOID_P, DCACHE);
+ md_dcacheflush(pv + disp, SIZEOF_VOID_P);
PATCHER_MARK_PATCHED_MONITOREXIT;