X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fx86-64-darwin-os.c;h=6378d7b018d918d37617158b00980c5a2a656c5a;hb=bf40ae88bc289fd765a33861cc4bc0853ed483ba;hp=86d4687e0dee1c76562615b2c902615ddbfda09e;hpb=f60e9933a652a3b6ff5d3176f85a41833c1bc338;p=sbcl.git diff --git a/src/runtime/x86-64-darwin-os.c b/src/runtime/x86-64-darwin-os.c index 86d4687..6378d7b 100644 --- a/src/runtime/x86-64-darwin-os.c +++ b/src/runtime/x86-64-darwin-os.c @@ -65,8 +65,6 @@ pthread_mutex_t mach_exception_lock = PTHREAD_MUTEX_INITIALIZER; #ifdef LISP_FEATURE_MACH_EXCEPTION_HANDLER -kern_return_t mach_thread_init(mach_port_t thread_exception_port); - void sigill_handler(int signal, siginfo_t *siginfo, os_context_t *context); void sigtrap_handler(int signal, siginfo_t *siginfo, os_context_t *context); void memory_fault_handler(int signal, siginfo_t *siginfo, @@ -249,8 +247,8 @@ void signal_emulation_wrapper(x86_thread_state64_t *thread_state, os_invalidate((os_vm_address_t)regs, sizeof(darwin_mcontext)); /* Trap to restore the signal context. */ - asm volatile ("mov %0, %%rax; mov %1, %%rbx; .quad 0xffffffffffff0b0f" - : : "r" (thread_state), "r" (float_state)); + asm volatile (".quad 0xffffffffffff0b0f" + : : "a" (thread_state), "b" (float_state)); } #if defined DUMP_CONTEXT @@ -327,9 +325,10 @@ catch_exception_raise(mach_port_t exception_port, os_vm_address_t addr; - struct thread *th = (struct thread*) exception_port; + struct thread *th; FSHOW((stderr,"/entering catch_exception_raise with exception: %d\n", exception)); + th = *(struct thread**)exception_port; switch (exception) { @@ -348,8 +347,6 @@ catch_exception_raise(mach_port_t exception_port, (thread_state_t)&exception_state, &exception_state_count); addr = (void*)exception_state.faultvaddr; - - /* note the os_context hackery here. When the signal handler returns, * it won't go back to what it was doing ... */ if(addr >= CONTROL_STACK_GUARD_PAGE(th) &&