95 pc = ((uint32_t *) ra) - 3;
103 if ((mcode >> 16) == 0x3c19) {
110 offset = (int32_t) (mcode << 16);
116 assert((mcode >> 16) != 0x6739);
118 offset += (int16_t) (mcode & 0x0000ffff);
123 offset = (int16_t) (mcode & 0x0000ffff);
127 if ((mcode >> 16) == 0xe9ce) {
130 pa = ((uint8_t *) pv) + offset;
132 else if ((mcode >> 16) == 0xe9cc) {
140 pa = ((uint8_t *) mptr) + offset;
145 vm_abort(
"md_jit_method_patch_address: unknown instruction %x",
170 uint32_t mcode = *((uint32_t*) xpc);
175 if (mcode == 0x00000000) {
218 #if defined(ENABLE_REPLACEMENT)
219 void md_patch_replacement_point(
u1 *
pc,
u1 *savedmcode,
bool revert)
225 *(
u4*)(pc) = *(
u4*)(savedmcode);
229 *(
u4*)(savedmcode) = *(
u4*)(pc);
235 *(
u4*)(pc) = (
u4) mcode;
intptr_t value
Value (numeric or address) passed with the trap.
#define M_INSTR_OP2_IMM_I(x)
Contains information about a decoded trap instruction.
void vm_abort(const char *text,...)
int type
Specific trap type (see md-trap.h).
#define M_INSTR_OP2_IMM_A(x)
#define M_INSTR_OP2_IMM_D(x)
void * md_jit_method_patch_address(void *pv, void *ra, void *mptr)
bool md_trap_decode(trapinfo_t *trp, int sig, void *xpc, executionstate_t *es)
Decode the trap instruction at the given PC.
uintptr_t intregs[INT_REG_CNT]
static void md_icacheflush(void *addr, int nbytes)