From: Thiemo Seufer Date: Mon, 12 Sep 2005 21:12:25 +0000 (+0000) Subject: 0.9.4.67: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=180b35f2868045afb6574f52b766ce3d7564e2e1;p=sbcl.git 0.9.4.67: Use snarf-error-junk as the only lisp function to parse internal error arguments. Improve comment. --- diff --git a/src/code/mips-vm.lisp b/src/code/mips-vm.lisp index d3dfa6c..a6dbef6 100644 --- a/src/code/mips-vm.lisp +++ b/src/code/mips-vm.lisp @@ -109,8 +109,11 @@ ;;; INTERNAL-ERROR-ARGUMENTS -- interface. ;;; ;;; Given the sigcontext, extract the internal error arguments from the -;;; instruction stream. -;;; +;;; instruction stream. This is e.g. +;;; 4 23 254 206 1 0 0 0 +;;; | ~~~~~~~~~~~~~~~~~~~~~~~~~ +;;; length data (everything is an octet) +;;; (pc + 4) (defun internal-error-args (context) (declare (type (alien (* os-context-t)) context)) (/show0 "entering INTERNAL-ERROR-ARGS, CONTEXT=..") @@ -118,23 +121,8 @@ (let ((pc (context-pc context)) (cause (context-bd-cause-int context))) (declare (type system-area-pointer pc)) - ;; KLUDGE: This exposure of the branch delay mechanism hurts. - (when (logbitp 31 cause) - (setf pc (sap+ pc 4))) - (args-for-unimp-inst pc))) - -(defun args-for-unimp-inst (pc) - (declare (type system-area-pointer pc)) - (let* ((length (sap-ref-8 pc 4)) - (vector (make-array length :element-type '(unsigned-byte 8)))) - (declare (type (unsigned-byte 8) length) - (type (simple-array (unsigned-byte 8) (*)) vector)) - (copy-ub8-from-system-area pc 5 vector 0 length) - (let* ((index 0) - (error-number (sb!c:read-var-integer vector index))) - (collect ((sc-offsets)) - (loop - (when (>= index length) - (return)) - (sc-offsets (sb!c:read-var-integer vector index))) - (values error-number (sc-offsets)))))) + (multiple-value-bind (error-number length sc-offsets) + ;; KLUDGE: This exposure of the branch delay mechanism hurts. + (snarf-error-junk pc (if (logbitp 31 cause) 8 4)) + (declare (ignore length)) + (values error-number sc-offsets)))) diff --git a/version.lisp-expr b/version.lisp-expr index 982568a..11eb1ac 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.66" +"0.9.4.67"