92 bool invokeinterface =
false;
95 pc = ((uint32_t *) ra) - 3;
100 if (mcode == 0xd503201f)
104 base = (mcode >> 5) & 0x1f;
108 msb10 = (mcode >> 22) & 0x3ff;
109 msb11 = (mcode >> 21) & 0x7ff;
111 if (msb10 == 0x3e5) {
112 disp = (mcode >> 10) & 0xfff;
114 }
else if (msb11 == 0x7c2) {
115 disp = (mcode >> 12) & 0xff;
116 if ((mcode >> 12) & 0x100)
118 }
else if (msb11 == 0x7c3) {
120 if (((pc[0] >> 21) & 0x7ff) == 0x7c3)
121 invokeinterface =
true;
131 if (disp == 0 && (msb11 == 0x7c2 || msb11 == 0x7c3)) {
132 uint32_t subcode = pc[0];
133 u1 high = (subcode >> 24) & 0xff;
134 if (high == 0xD1 && msb11 == 0x7c2) {
136 int32_t offset = (subcode >> 10) & 0xfff;
138 }
else if (high == 0x92 && msb11 == 0x7c3) {
139 int32_t offset = (subcode >> 5) & 0xffff;
141 }
else if (invokeinterface) {
142 uint32_t *movncode = ((uint32_t *) ra) - 4;
144 high = (mcode >> 24) & 0xff;
146 int32_t offset = (mcode >> 5) & 0xffff;
148 }
else if (high == 0xd2) {
149 int32_t offset = (mcode >> 5) & 0xffff;
160 pa = ((uint8_t *) pv) + disp;
171 pa = ((uint8_t *) mptr) + disp;
175 vm_abort_disassemble(pc, 2,
"md_jit_method_patch_address: unsupported base register %x", mcode);
195 uint32_t mcode = *((uint32_t*) xpc);
200 if ((mcode & 0xFF000000) == 0xE7000000) {
201 trp->
type = (mcode >> 8) & 0xff;
202 u1 reg = mcode & 0xff;
212 u2 reg = (mcode >> 5) & 0x1f;
213 uintptr_t addr = es->
intregs[reg];
238 #if defined(ENABLE_REPLACEMENT)
239 void md_patch_replacement_point(
u1 *
pc,
u1 *savedmcode,
bool revert)
241 os::abort(
"md_patch_replacement_point: NOT IMPLEMENTED!");
intptr_t value
Value (numeric or address) passed with the trap.
Contains information about a decoded trap instruction.
int type
Specific trap type (see md-trap.h).
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,...)