X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fruntime%2Fsparc-arch.c;h=38f60e57ac79e4757c67d0fe9b40d40f8b6aba44;hb=2cb068e245e00505076e9c325424df2a1260bfb1;hp=f941eaef8633f709673784b22269ea9bdd083149;hpb=5c4c126f50e6fb8184bf9ae4411d17327c24cb91;p=sbcl.git diff --git a/src/runtime/sparc-arch.c b/src/runtime/sparc-arch.c index f941eae..38f60e5 100644 --- a/src/runtime/sparc-arch.c +++ b/src/runtime/sparc-arch.c @@ -52,7 +52,7 @@ os_vm_address_t arch_get_bad_addr(int sig, siginfo_t *code, os_context_t *contex if ((pc < READ_ONLY_SPACE_START || pc >= READ_ONLY_SPACE_START+READ_ONLY_SPACE_SIZE) && (pc < current_dynamic_space || - pc >= current_dynamic_space + DYNAMIC_SPACE_SIZE)) { + pc >= current_dynamic_space + dynamic_space_size)) { return NULL; } @@ -105,6 +105,11 @@ void arch_set_pseudo_atomic_interrupted(os_context_t *context) *os_context_register_addr(context,reg_ALLOC) |= 1; } +void arch_clear_pseudo_atomic_interrupted(os_context_t *context) +{ + *os_context_register_addr(context,reg_ALLOC) &= ~1; +} + unsigned int arch_install_breakpoint(void *pc) { unsigned int *ptr = (unsigned int *)pc; @@ -266,7 +271,7 @@ static void sigill_handler(int signal, siginfo_t *siginfo, void *void_context) to fixup up alloc-tn to remove the interrupted flag, skip over the trap instruction, and then handle the pending interrupt(s). */ - *os_context_register_addr(context, reg_ALLOC) &= ~7; + arch_clear_pseudo_atomic_interrupted(context); arch_skip_instruction(context); interrupt_handle_pending(context); } @@ -314,6 +319,8 @@ static void sigemt_handler(int signal, siginfo_t *siginfo, void *void_context) result = op1 - op2; else result = op1 + op2; + /* KLUDGE: this & ~7 is a little bit magical but basically + clears pseudo_atomic bits if any */ *os_context_register_addr(context, reg_ALLOC) = result & ~7; arch_skip_instruction(context); interrupt_handle_pending(context);