#include "threads/thread.hpp"
-#include "vm/builtin.h"
+#include "vm/jit/builtin.hpp"
#include "vm/global.h"
-#include "vm/signallocal.h"
+#include "vm/signallocal.hpp"
#include "vm/jit/asmpart.h"
#include "vm/jit/executionstate.h"
intptr_t val;
int type;
void *p;
- java_object_t *o;
_uc = (ucontext_t *) _p;
_mc = _uc->uc_mcontext;
/* Set registers. */
if (type == TRAP_COMPILER) {
- if (p == NULL) {
- o = builtin_retrieve_exception();
-
+ if (p == NULL) {
_ss->__esp = (uintptr_t) sp; /* Remove RA from stack. */
-
- _ss->__eax = (uintptr_t) o;
- _ss->__ecx = (uintptr_t) xpc; /* REG_ITMP2_XPC */
- _ss->__eip = (uintptr_t) asm_handle_exception;
}
- else {
- _ss->__eip = (uintptr_t) p;
- }
- }
- else {
- _ss->__eax = (uintptr_t) p;
- _ss->__ecx = (uintptr_t) xpc; /* REG_ITMP2_XPC */
- _ss->__eip = (uintptr_t) asm_handle_exception;
}
}
u1 *xpc;
int type;
intptr_t val;
- void *p;
_uc = (ucontext_t *) _p;
/* Handle the trap. */
- p = trap_handle(type, val, pv, sp, ra, xpc, _p);
-
- /* Set registers. */
-
- _ss->__eax = (uintptr_t) p;
- _ss->__ecx = (uintptr_t) xpc; /* REG_ITMP2_XPC */
- _ss->__eip = (uintptr_t) asm_handle_exception;
+ trap_handle(type, val, pv, sp, ra, xpc, _p);
}
u1 *xpc;
int type;
intptr_t val;
- void *p;
_uc = (ucontext_t *) _p;
/* Handle the trap. */
- p = trap_handle(type, val, pv, sp, ra, xpc, _p);
-
- /* Set registers. */
-
- if (p != NULL) {
- _ss->__eax = (uintptr_t) p;
- _ss->__ecx = (uintptr_t) xpc; /* REG_ITMP2_XPC */
- _ss->__eip = (uintptr_t) asm_handle_exception;
- }
+ trap_handle(type, val, pv, sp, ra, xpc, _p);
}
/* md_executionstate_read ******************************************************