#include "vm/jit/i386/codegen.h"
#include "vm/jit/i386/md.h"
-#include "threads/thread.h"
+#include "threads/thread.hpp"
-#include "vm/builtin.h"
+#include "vm/jit/builtin.hpp"
#include "vm/global.h"
-#include "vm/signallocal.h"
-#include "vm/stringlocal.h"
+#include "vm/signallocal.hpp"
#include "vm/jit/asmpart.h"
#include "vm/jit/executionstate.h"
-#include "vm/jit/stacktrace.h"
+#include "vm/jit/stacktrace.hpp"
#include "vm/jit/trap.h"
#include "vm/jit/i386/codegen.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 ******************************************************
}
-/* md_critical_section_restart *************************************************
-
- Search the critical sections tree for a matching section and set
- the PC to the restart point, if necessary.
-
-*******************************************************************************/
-
-#if defined(ENABLE_THREADS)
-void thread_restartcriticalsection(ucontext_t *_uc)
-{
- mcontext_t _mc;
- i386_thread_state_t *_ss;
- u1 *pc;
- void *rpc;
-
- _mc = _uc->uc_mcontext;
- _ss = &_mc->__ss;
-
- pc = (u1 *) _ss->__eip;
-
- rpc = critical_find_restart_point(pc);
-
- if (rpc != NULL)
- _ss->__eip = (ptrint) rpc;
-}
-#endif
-
-
/*
* These are local overrides for various environment variables in Emacs.
* Please do not remove this and leave it at the end of the file, where