57 *((uint16_t*) pr->
mpc) = (uint16_t) pr->
mcode;
65 assert((((uintptr_t) p) & (4-1)) == 0);
72 assert((int8_t*) addr + nbytes -
sizeof(int32_t) >= (int8_t*) check_loc);
85 uint16_t mcode = *((uint16_t*) pc);
88 return (mcode == 0x0b0f);
100 uint32_t *p = (uint32_t*) (((uintptr_t) pc) & ~3);
102 assert((((uintptr_t) pc) & 3) < 2);
103 if (((uintptr_t) pc) & 1)
104 *p = (*p & 0x000000ff) | 0x001f0f00;
106 *p = (*p & 0xff000000) | 0x00001f0f;
138 uintptr_t* datap = (uintptr_t*) pr->
datap;
147 *datap = (uintptr_t) c;
171 uintptr_t* datap = (uintptr_t*) pr->
datap;
180 *datap = (uintptr_t) c->
vftbl;
204 uint8_t*
ra = (uint8_t*) pr->
mpc;
243 uintptr_t* datap = (uintptr_t*) pr->
datap;
244 uint8_t*
ra = (uint8_t*) pr->
mpc;
260 *datap = (uintptr_t) fi->value;
286 uint8_t*
pc = (uint8_t*) pr->
mpc;
324 uint8_t*
pc = (uint8_t*) pr->
mpc;
364 uintptr_t* datap = (uintptr_t*) pr->
datap;
398 uint8_t*
pc = (uint8_t*) pr->
mpc;
437 uint8_t*
pc = (uint8_t*) pr->
mpc;
452 int disp =
PATCH_ALIGNMENT((uintptr_t) (pc + 3 + 7), 3,
sizeof(int32_t));
482 uint8_t*
pc = (uint8_t*) pr->
mpc;
497 int disp =
PATCH_ALIGNMENT((uintptr_t) (pc + 7 + 7 + 6 + 8), 3,
sizeof(int32_t));
525 uint8_t*
pc = (uint8_t*) pr->
mpc;
540 int disp =
PATCH_ALIGNMENT((uintptr_t) (pc + 7 + 7 + 6), 3,
sizeof(int32_t));
bool patcher_invokestatic_special(patchref_t *pr)
bool patcher_get_putstatic(patchref_t *pr)
static void checked_icache_flush(void *addr, int nbytes, int32_t *check_loc)
bool patcher_resolve_classref_to_classinfo(patchref_t *pr)
bool patcher_invokeinterface(patchref_t *pr)
#define PATCHER_CALL_SIZE
static void md_dcacheflush(void *addr, int nbytes)
void patcher_patch_code(patchref_t *pr)
bool patcher_invokevirtual(patchref_t *pr)
bool patcher_resolve_classref_to_flags(patchref_t *pr)
bool patcher_checkcast_interface(patchref_t *pr)
static int32_t * patch_checked_location(int32_t *p, int32_t val)
bool initialize_class(classinfo *c)
bool patcher_putfieldconst(patchref_t *pr)
bool patcher_get_putfield(patchref_t *pr)
fieldinfo * resolve_field_eager(unresolved_field *ref)
methodinfo * resolve_method_eager(unresolved_method *ref)
static void patch_out_mfence(void *pc)
Overwrites the MFENCE instruction at the indicated address with a 3-byte NOP.
classinfo * resolve_classref_eager(constant_classref *ref)
static void md_icacheflush(void *addr, int nbytes)
bool patcher_is_valid_trap_instruction_at(void *pc)
Check if the trap instruction at the given PC is valid.
#define PATCH_ALIGNMENT(addr, offset, size)
bool patcher_resolve_classref_to_vftbl(patchref_t *pr)
bool patcher_instanceof_interface(patchref_t *pr)