91 pc = ((uint8_t *) ra) - 3;
105 offset = *((int32_t *) (pc - 4));
111 else if (mcode == 0xd3) {
122 offset = *((int32_t *) (pc - 4));
126 pa = ((uint8_t *) mptr) + offset;
131 vm_abort(
"md_jit_method_patch_address: unknown instruction %x", mcode);
153 uint8_t*
xpc = (uint8_t*) _xpc;
157 threads_check_stackoverflow(
sp);
185 if ((opc == 0x8b) && (mod == 0) && (rm == 4)) {
215 #if defined(ENABLE_REPLACEMENT)
216 void md_patch_replacement_point(
u1 *
pc,
u1 *savedmcode,
bool revert)
222 *(
u2*)(pc) = *(
u2*)(savedmcode);
226 *(
u2*)(savedmcode) = *(
u2*)(pc);
232 *(
u2*)(pc) = (
u2) mcode;
intptr_t value
Value (numeric or address) passed with the trap.
#define M_ALD_MEM_GET_OPC(p)
#define M_ALD_MEM_GET_REG(p)
Contains information about a decoded trap instruction.
alloc::set< EdgeType >::type mod
#define M_ALD_MEM_GET_DISP(p)
void vm_abort(const char *text,...)
int type
Specific trap type (see md-trap.h).
void * md_jit_method_patch_address(void *pv, void *ra, void *mptr)
#define M_ALD_MEM_GET_MOD(p)
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]
bool patcher_is_valid_trap_instruction_at(void *pc)
Check if the trap instruction at the given PC is valid.
#define M_ALD_MEM_GET_RM(p)