mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-27 02:49:42 +00:00
Fixes for NetBSD 2.0
This commit is contained in:
parent
64ff64d500
commit
09d6712bdb
@ -226,7 +226,7 @@ static void powerpc_decode_instruction(instruction_t *instruction, unsigned int
|
||||
|
||||
#if HAVE_SIGINFO_T
|
||||
// Generic extended signal handler
|
||||
#if defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
#if defined(__FreeBSD__)
|
||||
#define SIGSEGV_ALL_SIGNALS FAULT_HANDLER(SIGBUS)
|
||||
#else
|
||||
#define SIGSEGV_ALL_SIGNALS FAULT_HANDLER(SIGSEGV)
|
||||
@ -264,6 +264,15 @@ static void powerpc_decode_instruction(instruction_t *instruction, unsigned int
|
||||
#define SIGSEGV_SKIP_INSTRUCTION ix86_skip_instruction
|
||||
#endif
|
||||
#endif
|
||||
#if defined(__NetBSD__)
|
||||
#if (defined(i386) || defined(__i386__))
|
||||
#include <sys/ucontext.h>
|
||||
#define SIGSEGV_CONTEXT_REGS (((ucontext_t *)scp)->uc_mcontext.__gregs)
|
||||
#define SIGSEGV_FAULT_INSTRUCTION SIGSEGV_CONTEXT_REGS[_REG_EIP]
|
||||
#define SIGSEGV_REGISTER_FILE (unsigned long *)SIGSEGV_CONTEXT_REGS
|
||||
#define SIGSEGV_SKIP_INSTRUCTION ix86_skip_instruction
|
||||
#endif
|
||||
#endif
|
||||
#if defined(__linux__)
|
||||
#if (defined(i386) || defined(__i386__))
|
||||
#include <sys/ucontext.h>
|
||||
@ -684,7 +693,22 @@ enum {
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
#if defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
#if defined(__NetBSD__)
|
||||
enum {
|
||||
#if (defined(i386) || defined(__i386__))
|
||||
X86_REG_EIP = _REG_EIP,
|
||||
X86_REG_EAX = _REG_EAX,
|
||||
X86_REG_ECX = _REG_ECX,
|
||||
X86_REG_EDX = _REG_EDX,
|
||||
X86_REG_EBX = _REG_EBX,
|
||||
X86_REG_ESP = _REG_ESP,
|
||||
X86_REG_EBP = _REG_EBP,
|
||||
X86_REG_ESI = _REG_ESI,
|
||||
X86_REG_EDI = _REG_EDI
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
#if defined(__FreeBSD__)
|
||||
enum {
|
||||
#if (defined(i386) || defined(__i386__))
|
||||
X86_REG_EIP = 10,
|
||||
|
Loading…
Reference in New Issue
Block a user