X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fdisassem.lisp;h=22e3f9a2225ce498e022d50e0e38b9e908ee9450;hb=3e3cd66f482339be3b2eab942e00147c3e343434;hp=a5165fe1bf0233c9754dac538eb9ba68b3c20e93;hpb=c2431e2d0d0222a3cf20cfdfa48201bdcc65cd76;p=sbcl.git diff --git a/src/compiler/disassem.lisp b/src/compiler/disassem.lisp index a5165fe..22e3f9a 100644 --- a/src/compiler/disassem.lisp +++ b/src/compiler/disassem.lisp @@ -46,7 +46,7 @@ ;;; the width of the column in which instruction-names are printed. A ;;; value of zero gives the effect of not aligning the arguments at ;;; all. -(defvar *disassem-opcode-column-width* 6) +(defvar *disassem-opcode-column-width* 0) (declaim (type text-width *disassem-opcode-column-width*)) ;;; the width of the column in which instruction-bytes are printed. A @@ -189,15 +189,33 @@ (type offset byte-offset) (optimize (speed 3) (safety 0))) (the dchunk - (if (eq byte-order :big-endian) - (+ (ash (sb!sys:sap-ref-8 sap byte-offset) 24) - (ash (sb!sys:sap-ref-8 sap (+ 1 byte-offset)) 16) - (ash (sb!sys:sap-ref-8 sap (+ 2 byte-offset)) 8) - (sb!sys:sap-ref-8 sap (+ 3 byte-offset))) - (+ (sb!sys:sap-ref-8 sap byte-offset) - (ash (sb!sys:sap-ref-8 sap (+ 1 byte-offset)) 8) - (ash (sb!sys:sap-ref-8 sap (+ 2 byte-offset)) 16) - (ash (sb!sys:sap-ref-8 sap (+ 3 byte-offset)) 24))))) + (ecase dchunk-bits + (32 (if (eq byte-order :big-endian) + (+ (ash (sb!sys:sap-ref-8 sap byte-offset) 24) + (ash (sb!sys:sap-ref-8 sap (+ 1 byte-offset)) 16) + (ash (sb!sys:sap-ref-8 sap (+ 2 byte-offset)) 8) + (sb!sys:sap-ref-8 sap (+ 3 byte-offset))) + (+ (sb!sys:sap-ref-8 sap byte-offset) + (ash (sb!sys:sap-ref-8 sap (+ 1 byte-offset)) 8) + (ash (sb!sys:sap-ref-8 sap (+ 2 byte-offset)) 16) + (ash (sb!sys:sap-ref-8 sap (+ 3 byte-offset)) 24)))) + (64 (if (eq byte-order :big-endian) + (+ (ash (sb!sys:sap-ref-8 sap byte-offset) 56) + (ash (sb!sys:sap-ref-8 sap (+ 1 byte-offset)) 48) + (ash (sb!sys:sap-ref-8 sap (+ 2 byte-offset)) 40) + (ash (sb!sys:sap-ref-8 sap (+ 3 byte-offset)) 32) + (ash (sb!sys:sap-ref-8 sap (+ 4 byte-offset)) 24) + (ash (sb!sys:sap-ref-8 sap (+ 5 byte-offset)) 16) + (ash (sb!sys:sap-ref-8 sap (+ 6 byte-offset)) 8) + (sb!sys:sap-ref-8 sap (+ 7 byte-offset))) + (+ (sb!sys:sap-ref-8 sap byte-offset) + (ash (sb!sys:sap-ref-8 sap (+ 1 byte-offset)) 8) + (ash (sb!sys:sap-ref-8 sap (+ 2 byte-offset)) 16) + (ash (sb!sys:sap-ref-8 sap (+ 3 byte-offset)) 24) + (ash (sb!sys:sap-ref-8 sap (+ 4 byte-offset)) 32) + (ash (sb!sys:sap-ref-8 sap (+ 5 byte-offset)) 40) + (ash (sb!sys:sap-ref-8 sap (+ 6 byte-offset)) 48) + (ash (sb!sys:sap-ref-8 sap (+ 7 byte-offset)) 56))))))) (defun dchunk-corrected-extract (from pos unit-bits byte-order) (declare (type dchunk from)) @@ -1578,7 +1596,7 @@ ;; offset of next position (next-offs 0 :type offset) ;; a sap pointing to our segment - (segment-sap (missing-arg) :type sb!sys:system-area-pointer) + (segment-sap nil :type (or null sb!sys:system-area-pointer)) ;; the current segment (segment nil :type (or null segment)) ;; what to align to in most cases @@ -1587,8 +1605,8 @@ :type (member :big-endian :little-endian)) ;; for user code to hang stuff off of (properties nil :type list) - ;; for user code to hang stuff off of, cleared each time before an - ;; instruction is processed + ;; for user code to hang stuff off of, cleared each time after a + ;; non-prefix instruction is processed (inst-properties nil :type list) (filtered-values (make-array max-filtered-value-index) :type filtered-value-vector)