X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fppc-arch.c;h=a8df9622b5b6dd509b2eb80f918671f86f349a95;hb=1f763fa8eca17771d2c091094855fcb8b84d66da;hp=3d209e935afc2555128bd245a09f1e4c509af97b;hpb=02afc3779a467fd354d40db8b891f2d866f3d49a;p=sbcl.git diff --git a/src/runtime/ppc-arch.c b/src/runtime/ppc-arch.c index 3d209e9..a8df962 100644 --- a/src/runtime/ppc-arch.c +++ b/src/runtime/ppc-arch.c @@ -1,7 +1,7 @@ #include -#include "arch.h" #include "sbcl.h" +#include "arch.h" #include "globals.h" #include "validate.h" #include "os.h" @@ -31,16 +31,13 @@ #define PT_DSISR 42 #endif -void arch_init() -{ +void arch_init() { } os_vm_address_t arch_get_bad_addr(int sig, siginfo_t *code, os_context_t *context) { - unsigned long badinstr; unsigned int *pc = (unsigned int *)(*os_context_pc_addr(context)); - int instclass; os_vm_address_t addr; @@ -98,14 +95,6 @@ arch_install_breakpoint(void *pc) } void -get_spinlock(lispobj *word,int value) -{ - /* FIXME */ - *word=value; -} - - -void arch_remove_breakpoint(void *pc, unsigned long orig_inst) { *(unsigned long *)pc = orig_inst; @@ -133,7 +122,6 @@ arch_do_displaced_inst(os_context_t *context,unsigned int orig_inst) static void sigtrap_handler(int signal, siginfo_t *siginfo, os_context_t *context) { - int badinst; u32 code; sigset_t *mask; #ifdef LISP_FEATURE_LINUX @@ -155,7 +143,7 @@ sigtrap_handler(int signal, siginfo_t *siginfo, os_context_t *context) } if ((code >> 16) == ((3 << 10) | (6 << 5))) { /* twllei reg_ZERO,N will always trap if reg_ZERO = 0 */ - int trap = code & 0x1f, extra = (code >> 5) & 0x1f; + int trap = code & 0x1f; switch (trap) { case trap_Halt: @@ -197,12 +185,24 @@ sigtrap_handler(int signal, siginfo_t *siginfo, os_context_t *context) interrupt_handle_now(signal, code, context); break; } +#ifdef LISP_FEATURE_DARWIN + sigreturn(context); +#endif + return; } if (((code >> 26) == 3) && (((code >> 21) & 31) == 24)) { interrupt_internal_error(signal, code, context, 0); +#ifdef LISP_FEATURE_DARWIN + sigreturn(context); +#endif + return; } interrupt_handle_now(signal, code, context); +#ifdef LISP_FEATURE_DARWIN + /* Work around G5 bug */ + sigreturn(context); +#endif }