X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fdisassem.lisp;h=bc0f42835be9ac994989eeee6d5187e9aff75eaa;hb=5cf3c4259d529e180d75d4d140f344e600d2b06b;hp=a5165fe1bf0233c9754dac538eb9ba68b3c20e93;hpb=c2431e2d0d0222a3cf20cfdfa48201bdcc65cd76;p=sbcl.git diff --git a/src/compiler/disassem.lisp b/src/compiler/disassem.lisp index a5165fe..bc0f428 100644 --- a/src/compiler/disassem.lisp +++ b/src/compiler/disassem.lisp @@ -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))