From 40b6c8b10330df5f1a3cc17e309857a7465ebc3f Mon Sep 17 00:00:00 2001 From: Thiemo Seufer Date: Thu, 15 Sep 2005 17:42:36 +0000 Subject: [PATCH] 0.9.4.70: Use subcodes of mips break instructions with a major code of 0, for triggering SIGTRAP, since other major codes are reserved for various purposes (Code 0 is supposed to be used for the debugger). --- src/compiler/mips/insts.lisp | 16 ++++++++++------ src/compiler/mips/macros.lisp | 4 ++-- src/compiler/mips/system.lisp | 4 ++-- src/runtime/mips-arch.c | 4 ++-- src/runtime/mips-assem.S | 10 +++++----- version.lisp-expr | 2 +- 6 files changed, 22 insertions(+), 18 deletions(-) diff --git a/src/compiler/mips/insts.lisp b/src/compiler/mips/insts.lisp index 2f53b2e59..dec4636a0 100644 --- a/src/compiler/mips/insts.lisp +++ b/src/compiler/mips/insts.lisp @@ -1063,22 +1063,26 @@ (declare (ignore inst)) (flet ((nt (x) (if stream (sb!disassem:note x dstate)))) (case (break-code chunk dstate) + (#.halt-trap + (nt "Halt trap")) + (#.pending-interrupt-trap + (nt "Pending interrupt trap")) (#.error-trap (nt "Error trap") (sb!disassem:handle-break-args #'snarf-error-junk stream dstate)) (#.cerror-trap (nt "Cerror trap") (sb!disassem:handle-break-args #'snarf-error-junk stream dstate)) - (#.object-not-list-trap - (nt "Object not list trap")) (#.breakpoint-trap (nt "Breakpoint trap")) - (#.pending-interrupt-trap - (nt "Pending interrupt trap")) - (#.halt-trap - (nt "Halt trap")) (#.fun-end-breakpoint-trap (nt "Function end breakpoint trap")) + (#.after-breakpoint-trap + (nt "After breakpoint trap")) + (#.pseudo-atomic-trap + (nt "Pseudo atomic trap")) + (#.object-not-list-trap + (nt "Object not list trap")) (#.object-not-instance-trap (nt "Object not instance trap")) ))) diff --git a/src/compiler/mips/macros.lisp b/src/compiler/mips/macros.lisp index 89190ad8b..0bcc9c327 100644 --- a/src/compiler/mips/macros.lisp +++ b/src/compiler/mips/macros.lisp @@ -190,7 +190,7 @@ `((let ((vop ,vop)) (when vop (note-this-location vop :internal-error))) - (inst break ,kind) + (inst break 0 ,kind) (with-adjustable-vector (,vector) (write-var-integer (error-number-or-lose ',code) ,vector) ,@(mapcar #'(lambda (tn) @@ -257,7 +257,7 @@ (let ((label (gen-label))) (inst bgez ,flag-tn label) (inst addu alloc-tn (1- ,extra)) - (inst break 16) + (inst break 0 16) (emit-label label))))) ;;;; memory accessor vop generators diff --git a/src/compiler/mips/system.lisp b/src/compiler/mips/system.lisp index 087e6eaae..93ff2a42d 100644 --- a/src/compiler/mips/system.lisp +++ b/src/compiler/mips/system.lisp @@ -240,12 +240,12 @@ (:policy :fast-safe) (:translate sb!unix::receive-pending-interrupt) (:generator 1 - (inst break pending-interrupt-trap))) + (inst break 0 pending-interrupt-trap))) (define-vop (halt) (:generator 1 - (inst break halt-trap))) + (inst break 0 halt-trap))) ;;;; Dynamic vop count collection support diff --git a/src/runtime/mips-arch.c b/src/runtime/mips-arch.c index 125e16331..2774fa253 100644 --- a/src/runtime/mips-arch.c +++ b/src/runtime/mips-arch.c @@ -248,7 +248,7 @@ arch_install_breakpoint(void *pc) ptr++; result = (unsigned long)insn; - *ptr = (trap_Breakpoint << 16) | 0xd; + *ptr = (trap_Breakpoint << 6) | 0xd; os_flush_icache((os_vm_address_t)ptr, INSN_LEN); return result; @@ -299,7 +299,7 @@ static void sigtrap_handler(int signal, siginfo_t *info, void *void_context) { os_context_t *context = arch_os_get_context(&void_context); - unsigned int code = (os_context_insn(context) >> 16) & 0x1f; + unsigned int code = (os_context_insn(context) >> 6) & 0xfffff; switch (code) { case trap_Halt: diff --git a/src/runtime/mips-assem.S b/src/runtime/mips-assem.S index 58804157f..f9ca519bd 100644 --- a/src/runtime/mips-assem.S +++ b/src/runtime/mips-assem.S @@ -138,7 +138,7 @@ symbol: .set noreorder bgez reg_NL4, 1f subu reg_ALLOC, 1 - break 0x10 + break 0x0, 0x10 1: .set reorder /* Pass in args */ @@ -194,7 +194,7 @@ lra: .word RETURN_PC_HEADER_WIDETAG .set noreorder bgez reg_NL4, 1f subu reg_ALLOC, 1 - break 0x10 + break 0x0, 0x10 1: .set reorder /* Pass one return value back to C land. For a 64bit value, we may @@ -272,7 +272,7 @@ lra: .word RETURN_PC_HEADER_WIDETAG .set noreorder bgez reg_NL4, 1f subu reg_ALLOC, 1 - break 0x10 + break 0x0, 0x10 1: .set reorder /* Into C land we go. */ @@ -333,7 +333,7 @@ lra: .word RETURN_PC_HEADER_WIDETAG .set noreorder bgez reg_NL4, 1f subu reg_ALLOC, 1 - break 0x10 + break 0x0, 0x10 1: .set reorder /* Reset the lisp stack. */ @@ -366,7 +366,7 @@ lra: .word RETURN_PC_HEADER_WIDETAG addiu reg_CODE, - 24 + FUN_POINTER_LOWTAG .set noreorder b 1f - break trap_Cerror + break 0x0, trap_Cerror /* Error data length. */ .byte 4 /* Error number. */ diff --git a/version.lisp-expr b/version.lisp-expr index fa79712d9..e4e6bfb87 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.9.4.69" +"0.9.4.70" -- 2.11.4.GIT