67 void*
xpc = (
u1 *) _mc->psw.addr;
81 void*
xpc = siginfo->si_addr;
99 void*
xpc = siginfo->si_addr;
107 (_mc->gregs[r1] == 0xFFFFFFFF) &&
108 (_mc->gregs[r1 + 1] == 0x80000000) &&
109 (_mc->gregs[r2] == 0xFFFFFFFF)
113 u1 *
pc = (
u1 *)_mc->psw.addr;
117 _mc->gregs[r1 + 1] = 0x80000000;
136 #if defined(ENABLE_THREADS)
152 pc = (
u1 *) _mc->psw.addr;
175 es->
pc = (
u1 *) _mc->psw.addr;
182 es->
intregs[i] = _mc->gregs[i];
188 assert(
sizeof(_mc->fpregs.fprs) ==
sizeof(es->
fltregs));
210 _mc->gregs[i] = es->
intregs[i];
216 assert(
sizeof(_mc->fpregs.fprs) ==
sizeof(es->
fltregs));
295 pa = ((uint8_t *) pv) + offset;
311 pa = (uint8_t *)mptr + offset;
316 vm_abort(
"md_jit_method_patch_address");
356 }
else if (es->
intregs[base] == 0) {
403 #if defined(ENABLE_REPLACEMENT)
404 void md_patch_replacement_point(
u1 *
pc,
u1 *savedmcode,
bool revert)
431 sp = *(uint8_t **)(regs +
REG_SP);
448 if (handler == NULL) {
456 framesize = *(int32_t *)(pv +
FrameSize);
458 intsave = *(int32_t *)(pv +
IntSave);
459 if (intsave > out[0]) {
463 fltsave = *(int32_t *)(pv +
FltSave);
464 if (fltsave > out[1]) {
470 savearea = (int64_t *)(sp + framesize - 8);
474 ra = *(uint8_t **)(sp + framesize - 8);
478 for (i = 0; i < intsave; ++
i) {
481 regs[reg] = *(int32_t *)(savearea);
484 for (i = 0; i < fltsave; ++
i) {
487 fregs[reg] = *savearea;
501 }
while (handler == NULL);
508 *(uint8_t **)(regs +
REG_PV) = pv - 0XFFC;
512 out[2] = (loops == 1);
intptr_t value
Value (numeric or address) passed with the trap.
static uint8_t N_RX_GET_OPC(uint8_t *instrp)
void md_signal_handler_sigsegv(int sig, siginfo_t *siginfo, void *_p)
NullPointerException signal handler for hardware null pointer check.
Contains information about a decoded trap instruction.
static uint8_t N_ILL_GET_TYPE(uint8_t *instrp)
void md_signal_handler_sigill(int sig, siginfo_t *siginfo, void *_p)
Illegal Instruction signal handler for hardware exception checks.
static int16_t N_RI_GET_IMM(uint8_t *instrp)
struct sigcontext uc_mcontext
const s4 abi_registers_integer_saved[]
static uint16_t N_RX_GET_DISP(uint8_t *instrp)
#define exceptions_handle_exception
void md_signal_handler_sigfpe(int sig, siginfo_t *siginfo, void *_p)
void vm_abort(const char *text,...)
void md_signal_handler_sigusr2(int sig, siginfo_t *siginfo, void *_p)
const s4 abi_registers_float_saved[]
static uint8_t N_RX_GET_BASE(uint8_t *instrp)
int type
Specific trap type (see md-trap.h).
static void * memcpy(void *dest, const void *src, size_t n)
void md_executionstate_write(executionstate_t *es, void *context)
static uint8_t N_RR_GET_REG1(uint8_t *instrp)
void md_handle_exception(int32_t *regs, int64_t *fregs, int32_t *out)
void * md_jit_method_patch_address(void *pv, void *ra, void *mptr)
void md_executionstate_read(executionstate_t *es, void *context)
bool md_trap_decode(trapinfo_t *trp, int sig, void *xpc, executionstate_t *es)
Decode the trap instruction at the given PC.
void trap_handle(int sig, void *xpc, void *context)
Handles the signal which is generated by trap instructions, caught by a signal handler and calls the ...
static uint8_t N_RR_GET_OPC(uint8_t *instrp)
uintptr_t intregs[INT_REG_CNT]
static uint8_t N_ILL_GET_REG(uint8_t *instrp)
static uint8_t N_RR_GET_REG2(uint8_t *instrp)
static uint8_t N_RX_GET_INDEX(uint8_t *instrp)
double fltregs[FLT_REG_CNT]