From 10f38d4b50e9284b4a76dc672d99bb635e2280b1 Mon Sep 17 00:00:00 2001 From: gbeauche <> Date: Sun, 20 Feb 2005 11:39:12 +0000 Subject: [PATCH] NetBSD/ppc support --- BasiliskII/src/Unix/sigsegv.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/BasiliskII/src/Unix/sigsegv.cpp b/BasiliskII/src/Unix/sigsegv.cpp index 08bdf751..077865aa 100644 --- a/BasiliskII/src/Unix/sigsegv.cpp +++ b/BasiliskII/src/Unix/sigsegv.cpp @@ -272,6 +272,13 @@ static void powerpc_decode_instruction(instruction_t *instruction, unsigned int #define SIGSEGV_REGISTER_FILE (unsigned long *)SIGSEGV_CONTEXT_REGS #define SIGSEGV_SKIP_INSTRUCTION ix86_skip_instruction #endif +#if (defined(powerpc) || defined(__powerpc__)) +#include +#define SIGSEGV_CONTEXT_REGS (((ucontext_t *)scp)->uc_mcontext.__gregs) +#define SIGSEGV_FAULT_INSTRUCTION SIGSEGV_CONTEXT_REGS[_REG_PC] +#define SIGSEGV_REGISTER_FILE (unsigned long *)&SIGSEGV_CONTEXT_REGS[_REG_PC], (unsigned long *)&SIGSEGV_CONTEXT_REGS[_REG_R0] +#define SIGSEGV_SKIP_INSTRUCTION powerpc_skip_instruction +#endif #endif #if defined(__linux__) #if (defined(i386) || defined(__i386__))