X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Falpha-arch.c;h=2f1c55943d2a916f348a0dd678f3c15d464ca021;hb=f0cb0cf9c0fe1b6fce5d10dbd34a0b7b249c4ae8;hp=5c71fa7441d8ae95047fddc801284b8446c83d82;hpb=5f4fe75b7ee2b33e263097415240d198b6275de3;p=sbcl.git diff --git a/src/runtime/alpha-arch.c b/src/runtime/alpha-arch.c index 5c71fa7..2f1c559 100644 --- a/src/runtime/alpha-arch.c +++ b/src/runtime/alpha-arch.c @@ -87,7 +87,10 @@ arch_skip_instruction(os_context_t *context) /* This may be complete rubbish, as (at least for traps) pc points * _after_ the instruction that caused us to be here anyway. */ - ((char*)*os_context_pc_addr(context)) +=4; } + char **pcptr; + pcptr = (char **) os_context_pc_addr(context); + *pcptr += 4; +} unsigned char * arch_internal_error_arguments(os_context_t *context) @@ -98,7 +101,18 @@ arch_internal_error_arguments(os_context_t *context) boolean arch_pseudo_atomic_atomic(os_context_t *context) { - return ((*os_context_register_addr(context,reg_ALLOC)) & 1); + /* FIXME: this foreign_function_call_active test is dubious at + * best. If a foreign call is made in a pseudo atomic section + * (?) or more likely a pseudo atomic section is in a foreign + * call then an interrupt is executed immediately. Maybe it + * has to do with C code not maintaining pseudo atomic + * properly. MG - 2005-08-10 + * + * The foreign_function_call_active used to live at each call-site + * to arch_pseudo_atomic_atomic, but this seems clearer. + * --NS 2007-05-15 */ + return (!foreign_function_call_active) + && ((*os_context_register_addr(context,reg_ALLOC)) & 1); } void arch_set_pseudo_atomic_interrupted(os_context_t *context) @@ -292,13 +306,19 @@ arch_handle_fun_end_breakpoint(os_context_t *context) (int)handle_fun_end_breakpoint(context); } +void +arch_handle_single_step_trap(os_context_t *context, int trap) +{ + unsigned int code = *((u32 *) (*os_context_pc_addr(context))); + int register_offset = code >> 5 & 0x1f; + handle_single_step_trap(context, trap, register_offset); + arch_skip_instruction(context); +} + static void sigtrap_handler(int signal, siginfo_t *siginfo, os_context_t *context) { unsigned int code; -#ifdef LISP_FEATURE_LINUX - os_restore_fp_control(context); -#endif /* this is different from how CMUCL does it. CMUCL used "call_pal * PAL_gentrap", which doesn't do anything on Linux (unless NL0