#include "vm/jit/powerpc/md.h"
#include "vm/jit/powerpc/linux/md-abi.h"
-#include "threads/thread.h"
+#include "threads/thread.hpp"
-#include "vm/builtin.h"
-#include "vm/exceptions.h"
+#include "vm/jit/builtin.hpp"
#include "vm/signallocal.h"
-#include "vm/stringlocal.h"
+#include "vm/os.hpp"
#include "vm/jit/asmpart.h"
#include "vm/jit/executionstate.h"
# include "vm/jit/optimizing/profile.h"
#endif
-#include "vm/jit/stacktrace.h"
#include "vm/jit/trap.h"
-#include "vmcore/system.h"
-
/* md_signal_handler_sigsegv ***************************************************
* the _mc->fpregs[i] can cause invalid conversions. */
assert(sizeof(_mc->fpregs.fpregs) == sizeof(es->fltregs));
- system_memcpy(&es->fltregs, &_mc->fpregs.fpregs, sizeof(_mc->fpregs.fpregs));
+ os_memcpy(&es->fltregs, &_mc->fpregs.fpregs, sizeof(_mc->fpregs.fpregs));
}
* the _mc->fpregs[i] can cause invalid conversions. */
assert(sizeof(_mc->fpregs.fpregs) == sizeof(es->fltregs));
- system_memcpy(&_mc->fpregs.fpregs, &es->fltregs, sizeof(_mc->fpregs.fpregs));
+ os_memcpy(&_mc->fpregs.fpregs, &es->fltregs, sizeof(_mc->fpregs.fpregs));
/* write special registers */
_gregs[PT_NIP] = (ptrint) es->pc;
}
-/* 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 md_critical_section_restart(ucontext_t *_uc)
-{
- mcontext_t *_mc;
- unsigned long *_gregs;
- u1 *pc;
- u1 *npc;
-
-#if defined(__UCLIBC__)
- _mc = &(_uc->uc_mcontext);
- _gregs = _mc->regs->gpr;
-#else
- _mc = _uc->uc_mcontext.uc_regs;
- _gregs = _mc->gregs;
-#endif
-
- pc = (u1 *) _gregs[PT_NIP];
-
- npc = critical_find_restart_point(pc);
-
- if (npc != NULL)
- _gregs[PT_NIP] = (ptrint) npc;
-}
-#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