X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fppc-arch.c;h=5e6b8851ecffa9527553ac38808ef6623cd2e10a;hb=1db4f16ef02f5b4d699d78541edb19ad8f3defc8;hp=e2d5c67c945e368c5f853ad3ca52f6653381dbfd;hpb=b5c69cfe906a31ae57bb0f18c67af9d2eaa1dfef;p=sbcl.git diff --git a/src/runtime/ppc-arch.c b/src/runtime/ppc-arch.c index e2d5c67..5e6b885 100644 --- a/src/runtime/ppc-arch.c +++ b/src/runtime/ppc-arch.c @@ -21,6 +21,7 @@ #include "interrupt.h" #include "interr.h" #include "breakpoint.h" +#include "alloc.h" #if defined(LISP_FEATURE_GENCGC) #include "gencgc-alloc-region.h" @@ -422,9 +423,10 @@ arch_handle_single_step_trap(os_context_t *context, int trap) } static void -sigtrap_handler(int signal, siginfo_t *siginfo, os_context_t *context) +sigtrap_handler(int signal, siginfo_t *siginfo, void *void_context) { unsigned int code; + os_context_t *context = void_context; #ifdef LISP_FEATURE_LINUX os_restore_fp_control(context); @@ -444,9 +446,6 @@ sigtrap_handler(int signal, siginfo_t *siginfo, os_context_t *context) if (allocation_trap_p(context)) { handle_allocation_trap(context); arch_skip_instruction(context); -#ifdef LISP_FEATURE_DARWIN - DARWIN_FIX_CONTEXT(context); -#endif return; } #endif @@ -455,32 +454,21 @@ sigtrap_handler(int signal, siginfo_t *siginfo, os_context_t *context) /* twllei reg_ZERO,N will always trap if reg_ZERO = 0 */ int trap = code & 0x1f; handle_trap(context,trap); - -#ifdef LISP_FEATURE_DARWIN - DARWIN_FIX_CONTEXT(context); -#endif return; } if (((code >> 26) == 3) && (((code >> 21) & 31) == 24)) { interrupt_internal_error(context, 0); -#ifdef LISP_FEATURE_DARWIN - DARWIN_FIX_CONTEXT(context); -#endif return; } - interrupt_handle_now(signal, code, context); -#ifdef LISP_FEATURE_DARWIN - /* Work around G5 bug */ - DARWIN_FIX_CONTEXT(context); -#endif + interrupt_handle_now(signal, (siginfo_t *)code, context); } void arch_install_interrupt_handlers() { - undoably_install_low_level_interrupt_handler(SIGILL,sigtrap_handler); - undoably_install_low_level_interrupt_handler(SIGTRAP,sigtrap_handler); + undoably_install_low_level_interrupt_handler(SIGILL, sigtrap_handler); + undoably_install_low_level_interrupt_handler(SIGTRAP, sigtrap_handler); } void