X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fppc-arch.c;h=bf4b37fd661722b9c5a975771d8fef3bf8191422;hb=5563d2712045491695f68c018dbdd1233faca4e5;hp=7aa24efbba21967cafa4d54dafd551be1bd86996;hpb=b36697e233ff1ef1cc3ad2e687581520656d4755;p=sbcl.git diff --git a/src/runtime/ppc-arch.c b/src/runtime/ppc-arch.c index 7aa24ef..bf4b37f 100644 --- a/src/runtime/ppc-arch.c +++ b/src/runtime/ppc-arch.c @@ -59,7 +59,9 @@ arch_get_bad_addr(int sig, siginfo_t *code, os_context_t *context) void arch_skip_instruction(os_context_t *context) { - ((char*)*os_context_pc_addr(context)) +=4; + char** pcptr; + pcptr = (char**) os_context_pc_addr(context); + *pcptr += 4; } unsigned char * @@ -123,12 +125,9 @@ static void sigtrap_handler(int signal, siginfo_t *siginfo, os_context_t *context) { u32 code; - sigset_t *mask; #ifdef LISP_FEATURE_LINUX os_restore_fp_control(context); #endif - mask=(os_context_sigmask_addr(context)); - sigsetmask(mask); code=*((u32 *)(*os_context_pc_addr(context))); if (code == ((3 << 26) | (16 << 21) | (reg_ALLOC << 16))) { /* twlti reg_ALLOC,0 - check for deferred interrupt */ @@ -156,7 +155,8 @@ sigtrap_handler(int signal, siginfo_t *siginfo, os_context_t *context) break; case trap_PendingInterrupt: - /* when do we run this branch instead of the twlti code above? */ + /* This is supposed run after WITHOUT-INTERRUPTS if there + * were pending signals. */ arch_skip_instruction(context); interrupt_handle_pending(context); break; @@ -186,14 +186,14 @@ sigtrap_handler(int signal, siginfo_t *siginfo, os_context_t *context) break; } #ifdef LISP_FEATURE_DARWIN - sigreturn(context); + DARWIN_FIX_CONTEXT(context); #endif return; } if (((code >> 26) == 3) && (((code >> 21) & 31) == 24)) { interrupt_internal_error(signal, code, context, 0); #ifdef LISP_FEATURE_DARWIN - sigreturn(context); + DARWIN_FIX_CONTEXT(context); #endif return; } @@ -201,7 +201,7 @@ sigtrap_handler(int signal, siginfo_t *siginfo, os_context_t *context) interrupt_handle_now(signal, code, context); #ifdef LISP_FEATURE_DARWIN /* Work around G5 bug */ - sigreturn(context); + DARWIN_FIX_CONTEXT(context); #endif }