98 pc = ((uint32_t *) ra) - 3;
106 assert(pc[1] == 0xe1a0e00f );
107 assert(pc[2] == 0xe1a0f00c );
111 assert ((mcode & 0xff70f000) == 0xe510c000);
115 disp = (int32_t) (mcode & 0x0fff);
126 if ((mcode & 0xffffff00) == 0xe24cca00)
127 disp += (int32_t) ((mcode & 0x00ff) << 12);
131 pa = ((uint8_t *) pv) - disp;
144 pa = ((uint8_t *) mptr) + disp;
159 if ((mcode & 0xffffff00) == 0xe28bca00) {
162 assert(mptr != NULL);
163 disp += (int32_t) ((mcode & 0x00ff) << 12);
164 pa = ((uint8_t *) mptr) + disp;
169 else if ((mcode & 0xffffff00) == 0xe24cca00 && disp == 0) {
172 disp += (int32_t) ((mcode & 0x00ff) << 12);
173 pa = ((uint8_t *) pv) - disp;
213 uint32_t mcode = *((uint32_t*) xpc);
219 trp->
type = (mcode >> 8) & 0x0fff;
231 uintptr_t addr = es->
intregs[(mcode >> 16) & 0x0f];
250 #if defined(ENABLE_REPLACEMENT)
251 void md_patch_replacement_point(
u1 *
pc,
u1 *savedmcode,
bool revert)
253 vm_abort(
"md_patch_replacement_point: IMPLEMENT ME!");
intptr_t value
Value (numeric or address) passed with the trap.
Contains information about a decoded trap instruction.
void vm_abort(const char *text,...)
int type
Specific trap type (see md-trap.h).
#define M_MEM_GET_Rbase(mcode)
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]
void vm_abort_disassemble(void *pc, int count, const char *text,...)
bool patcher_is_valid_trap_instruction_at(void *pc)
Check if the trap instruction at the given PC is valid.