From: stassats <sta...@us...> - 2014-11-04 17:33:10
|
The branch "master" has been updated in SBCL: via a89fe4e3177eb7c547c2490ea7a25be4cea31dd5 (commit) from abfd4b58c46f9c4d1bea75de30a16e12a07ac7f5 (commit) - Log ----------------------------------------------------------------- commit a89fe4e3177eb7c547c2490ea7a25be4cea31dd5 Author: Stas Boukarev <sta...@gm...> Date: Tue Nov 4 07:52:05 2014 +0300 arm-arch.c: Remove #if 0 code. It makes things hard to read and to grep. --- src/runtime/arm-arch.c | 179 ------------------------------------------------ 1 files changed, 0 insertions(+), 179 deletions(-) diff --git a/src/runtime/arm-arch.c b/src/runtime/arm-arch.c index d4fdfbc..bf5bc10 100644 --- a/src/runtime/arm-arch.c +++ b/src/runtime/arm-arch.c @@ -99,45 +99,6 @@ void arch_do_displaced_inst(os_context_t *context, unsigned int orig_inst) /* FIXME: Implement. */ } -#if 0 -static int pseudo_atomic_trap_p(os_context_t *context) -{ - unsigned int* pc; - unsigned int badinst; - int result; - - - pc = (unsigned int*) *os_context_pc_addr(context); - badinst = *pc; - result = 0; - - /* Check to see if the current instruction is a pseudo-atomic-trap */ - if (((badinst >> 30) == 2) && (((badinst >> 19) & 0x3f) == 0x3a) - && (((badinst >> 13) & 1) == 1) && ((badinst & 0x7f) == PSEUDO_ATOMIC_TRAP)) - { - unsigned int previnst; - previnst = pc[-1]; - /* - * Check to see if the previous instruction was an andcc alloc-tn, - * 3, zero-tn instruction. - */ - if (((previnst >> 30) == 2) && (((previnst >> 19) & 0x3f) == 0x11) - && (((previnst >> 14) & 0x1f) == reg_ALLOC) - && (((previnst >> 25) & 0x1f) == reg_ZERO) - && (((previnst >> 13) & 1) == 1) - && ((previnst & 0x1fff) == 3)) - { - result = 1; - } - else - { - fprintf(stderr, "Oops! Got a PSEUDO-ATOMIC-TRAP without a preceeding andcc!\n"); - } - } - return result; -} -#endif - void arch_handle_breakpoint(os_context_t *context) { @@ -150,19 +111,6 @@ arch_handle_fun_end_breakpoint(os_context_t *context) *os_context_pc_addr(context) = (int) handle_fun_end_breakpoint(context); } -#if 0 -void -arch_handle_after_breakpoint(os_context_t *context) -{ - *skipped_break_addr = trap_Breakpoint; - os_flush_icache(skipped_break_addr, sizeof(unsigned int)); - skipped_break_addr = NULL; - *(unsigned long *) os_context_pc_addr(context) = displaced_after_inst; - /* context->sigmask = orig_sigmask; */ - os_flush_icache((os_vm_address_t) os_context_pc_addr(context), sizeof(unsigned int)); -} -#endif - void arch_handle_single_step_trap(os_context_t *context, int trap) { @@ -176,129 +124,6 @@ arch_handle_single_step_trap(os_context_t *context, int trap) arch_skip_instruction(context); } -#if 0 -static void sigill_handler(int signal, siginfo_t *siginfo, - os_context_t *context) -{ - if ((siginfo->si_code) == ILL_ILLOPC -#ifdef LISP_FEATURE_LINUX - || (linux_sparc_siginfo_bug && (siginfo->si_code == 2)) -#endif - ) { - int trap; - unsigned int inst; - unsigned int* pc = (unsigned int*) siginfo->si_addr; - - inst = *pc; - trap = inst & 0x1f; - handle_trap(context,trap); - } - else if ((siginfo->si_code) == ILL_ILLTRP -#ifdef LISP_FEATURE_LINUX - || (linux_sparc_siginfo_bug && (siginfo->si_code) == 192) -#endif - ) { - if (pseudo_atomic_trap_p(context)) { - /* A trap instruction from a pseudo-atomic. We just need - to fixup up alloc-tn to remove the interrupted flag, - skip over the trap instruction, and then handle the - pending interrupt(s). */ - arch_clear_pseudo_atomic_interrupted(context); - arch_skip_instruction(context); - interrupt_handle_pending(context); - } - else { - interrupt_internal_error(context, 0); - } - } - else { - interrupt_handle_now(signal, siginfo, context); - } -} - -static void sigemt_handler(int signal, siginfo_t *siginfo, - os_context_t *context) -{ - unsigned int badinst; - boolean subtract, immed; - int rd, rs1, op1, rs2, op2, result; - - badinst = *(unsigned int *)os_context_pc_addr(context); - if ((badinst >> 30) != 2 || ((badinst >> 20) & 0x1f) != 0x11) { - /* It wasn't a tagged add. Pass the signal into lisp. */ - interrupt_handle_now(signal, siginfo, context); - return; - } - - fprintf(stderr, "SIGEMT trap handler with tagged op instruction!\n"); - - /* Extract the parts of the inst. */ - subtract = badinst & (1<<19); - rs1 = (badinst>>14) & 0x1f; - op1 = *os_context_register_addr(context, rs1); - - /* If the first arg is $ALLOC then it is really a signal-pending note */ - /* for the pseudo-atomic noise. */ - if (rs1 == reg_ALLOC) { - /* Perform the op anyway. */ - op2 = badinst & 0x1fff; - if (op2 & (1<<12)) - op2 |= -1<<13; - if (subtract) - 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); - return; - } - - if ((op1 & 3) != 0) { - /* The first arg wan't a fixnum. */ - interrupt_internal_error(context, 0); - return; - } - - if (immed = badinst & (1<<13)) { - op2 = badinst & 0x1fff; - if (op2 & (1<<12)) - op2 |= -1<<13; - } - else { - rs2 = badinst & 0x1f; - op2 = *os_context_register_addr(context, rs2); - } - - if ((op2 & 3) != 0) { - /* The second arg wan't a fixnum. */ - interrupt_internal_error(context, 0); - return; - } - - rd = (badinst>>25) & 0x1f; - if (rd != 0) { - /* Don't bother computing the result unless we are going to use it. */ - if (subtract) - result = (op1>>2) - (op2>>2); - else - result = (op1>>2) + (op2>>2); - - dynamic_space_free_pointer = - (lispobj *) *os_context_register_addr(context, reg_ALLOC); - - *os_context_register_addr(context, rd) = alloc_number(result); - - *os_context_register_addr(context, reg_ALLOC) = - (unsigned long) dynamic_space_free_pointer; - } - - arch_skip_instruction(context); -} -#endif - static void sigtrap_handler(int signal, siginfo_t *siginfo, os_context_t *context) { @@ -327,10 +152,6 @@ sigtrap_handler(int signal, siginfo_t *siginfo, os_context_t *context) void arch_install_interrupt_handlers() { -#if 0 - undoably_install_low_level_interrupt_handler(SIGILL , sigill_handler); - undoably_install_low_level_interrupt_handler(SIGEMT, sigemt_handler); -#endif undoably_install_low_level_interrupt_handler(SIGTRAP, sigtrap_handler); } ----------------------------------------------------------------------- hooks/post-receive -- SBCL |