X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fppc-arch.c;h=9c20cc01983ab9ef4ddadaea20e4eb8a84e855a1;hb=f73c1f391342c797b8daebe4e8c27e5923341b6d;hp=eac4013f9d5d20ec350510ea4b4f4f1dd56de33b;hpb=c1b4849c95bad4f3535fba2b9307fd37e15bcf6d;p=sbcl.git diff --git a/src/runtime/ppc-arch.c b/src/runtime/ppc-arch.c index eac4013..9c20cc0 100644 --- a/src/runtime/ppc-arch.c +++ b/src/runtime/ppc-arch.c @@ -1,12 +1,3 @@ -/* - - $Header$ - - This code was written as part of the CMU Common Lisp project at - Carnegie Mellon University, and has been placed in the public domain. - -*/ - #include #include "arch.h" @@ -40,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; @@ -58,7 +46,7 @@ arch_get_bad_addr(int sig, siginfo_t *code, os_context_t *context) if ((((unsigned long)pc) & 3) != 0 || ((pc < READ_ONLY_SPACE_START || pc >= READ_ONLY_SPACE_START+READ_ONLY_SPACE_SIZE) && - ((lispobj *)pc < current_dynamic_space && + ((lispobj *)pc < current_dynamic_space || (lispobj *)pc >= current_dynamic_space + DYNAMIC_SPACE_SIZE))) return 0; @@ -134,9 +122,11 @@ 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 + os_restore_fp_control(context); +#endif mask=(os_context_sigmask_addr(context)); sigsetmask(mask); code=*((u32 *)(*os_context_pc_addr(context))); @@ -153,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: