X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86%2Fmacros.lisp;h=df6f8560c882443693cb5c677d8d4a939ac002ed;hb=23a229276c2447a658b7a30217ec774067c27d5e;hp=bfdb6c881c8bda636da954b4a7301a6ab74e5edd;hpb=a6b91f356da1b5ae2987f79db9bd137970512959;p=sbcl.git diff --git a/src/compiler/x86/macros.lisp b/src/compiler/x86/macros.lisp index bfdb6c8..df6f856 100644 --- a/src/compiler/x86/macros.lisp +++ b/src/compiler/x86/macros.lisp @@ -296,7 +296,7 @@ ;;;; error code (defun emit-error-break (vop kind code values) (assemble () - #-darwin + #!-darwin (inst int 3) ; i386 breakpoint instruction ;; CLH 20060314 ;; On Darwin, we need to use #x0b0f instead of int3 in order @@ -304,14 +304,18 @@ ;; doesn't seem to be reliably firing SIGTRAP ;; handlers. Hopefully this will be fixed by Apple at a ;; later date. - #+darwin + #!+darwin (inst word #x0b0f) + ;; The return PC points here; note the location for the debugger. (when vop (note-this-location vop :internal-error)) (inst byte kind) ; e.g. trap_xyyy (with-adjustable-vector (vector) ; interr arguments (write-var-integer code vector) (dolist (tn values) + ;; classic CMU CL comment: + ;; zzzzz jrd here. tn-offset is zero for constant + ;; tns. (write-var-integer (make-sc-offset (sc-number (tn-sc tn)) (or (tn-offset tn) 0)) vector)) @@ -319,41 +323,6 @@ (dotimes (i (length vector)) (inst byte (aref vector i)))))) -#+nil -(eval-when (#-sb-xc :compile-toplevel :load-toplevel :execute) - (defun emit-error-break (vop kind code values) - (let ((vector (gensym))) - `((progn - #-darwin (inst int 3) ; i386 breakpoint instruction - ;; CLH 20060314 - ;; On Darwin, we need to use #x0b0f instead of int3 in order - ;; to generate a SIGILL instead of a SIGTRAP as darwin/x86 - ;; doesn't seem to be reliably firing SIGTRAP - ;; handlers. Hopefully this will be fixed by Apple at a - ;; later date. - #+darwin (inst word #x0b0f)) - ;; The return PC points here; note the location for the debugger. - (let ((vop ,vop)) - (when vop - (note-this-location vop :internal-error))) - (inst byte ,kind) ; eg trap_Xyyy - (with-adjustable-vector (,vector) ; interr arguments - (write-var-integer (error-number-or-lose ',code) ,vector) - ,@(mapcar (lambda (tn) - `(let ((tn ,tn)) - ;; classic CMU CL comment: - ;; zzzzz jrd here. tn-offset is zero for constant - ;; tns. - (write-var-integer (make-sc-offset (sc-number - (tn-sc tn)) - (or (tn-offset tn) - 0)) - ,vector))) - values) - (inst byte (length ,vector)) - (dotimes (i (length ,vector)) - (inst byte (aref ,vector i)))))))) - (defun error-call (vop error-code &rest values) #!+sb-doc "Cause an error. ERROR-CODE is the error to cause." @@ -382,8 +351,8 @@ ;;; does not matter whether a signal occurs during construction of a ;;; dynamic-extent object, as the half-finished construction of the ;;; object will not cause any difficulty. We can therefore elide -(defmacro maybe-pseudo-atomic (really-p &body forms) - `(if ,really-p +(defmacro maybe-pseudo-atomic (not-really-p &body forms) + `(if ,not-really-p (progn ,@forms) (pseudo-atomic ,@forms)))