Changeset 15788


Ignore:
Timestamp:
Mar 30, 2013, 10:05:09 PM (8 years ago)
Author:
rme
Message:

Try to de-uglify x86 disassembly when *disassemble-verbose* is t.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/X86/x86-disassemble.lisp

    r15006 r15788  
    28482848        (when op2
    28492849          (write-x86-lap-operand t op2 ds)))))
    2850   (format t ")~vt;~8<[~D]~>" (+ 40 tab-stop) pc) 
    2851   (format t "~%"))
     2850  (let ((comment-start-offset 40))
     2851    (format t ")~vt;~8<[~D]~>" (+ comment-start-offset tab-stop) pc)
     2852    (when *disassemble-verbose*
     2853      (let* ((istart (x86-di-start instruction))
     2854             (iend (x86-di-end instruction))
     2855             (nbytes (- iend istart))
     2856             (code-vector (x86-ds-code-vector ds))
     2857             (byteidx istart))
     2858        (dotimes (i (min nbytes 4))
     2859          (format t " ~(~2,'0x~)" (aref code-vector byteidx))
     2860          (incf byteidx))
     2861        (format t "~%")
     2862        (decf nbytes 4)
     2863        (while (plusp nbytes)
     2864          (format t "~vt;~8<~>" (+ comment-start-offset tab-stop))
     2865          (dotimes (i (min nbytes 4))
     2866            (format t " ~(~2,'0x~)" (aref code-vector byteidx))
     2867            (incf byteidx))
     2868          (format t "~%")
     2869          (decf nbytes 4))))
     2870    (format t "~&")))
    28522871
    28532872(defun x86-print-disassembled-instruction (ds instruction seq function)
     
    28682887      (setq seq 0))
    28692888    (format t "~&")
    2870     (let* ((istart (x86-di-start instruction))
    2871            (iend (x86-di-end instruction))
    2872            (nbytes (- iend istart))
    2873            (code-vector (x86-ds-code-vector ds))
    2874            (byteidx istart)
    2875            (tab-stop (if *disassemble-verbose* 22 9)))
    2876       (when *disassemble-verbose*
    2877         (dotimes (i (min nbytes 4))
    2878           (format t " ~(~2,'0x~)" (aref code-vector byteidx))
    2879           (incf byteidx))
    2880         (decf nbytes 4))
    2881       (x86-print-di-lap ds instruction tab-stop pc)
    2882       (when *disassemble-verbose*
    2883         (while (plusp nbytes)
    2884           (format t "~8t")
    2885           (dotimes (i (min nbytes 4))
    2886             (format t " ~(~2,'0x~)" (aref code-vector byteidx))
    2887             (incf byteidx))
    2888           (format t "~%")
    2889           (decf nbytes 4))))
     2889    (let ((tab-stop 4))
     2890      (x86-print-di-lap ds instruction tab-stop pc))
    28902891    (1+ seq)))
    28912892
Note: See TracChangeset for help on using the changeset viewer.