Changeset 13001


Ignore:
Timestamp:
Oct 12, 2009, 10:36:15 PM (10 years ago)
Author:
rme
Message:

New function X86-PRINT-BARE-DISASSEMBLED-INSTRUCTION, which factors
out from X86-PRINT-DISASSEMBLED-INSTRUCTION the printing of the
prefixes, mnemonic, and operands of a disassembled instruction.

File:
1 edited

Legend:

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

    r12846 r13001  
    27582758      (out stream expr))))
    27592759
     2760(defun x86-print-bare-disassembled-instruction (ds instruction)
     2761  (dolist (p (x86-di-prefixes instruction))
     2762    (format t "~&  (~a)~%" p))
     2763  (format t "  (~a" (x86-di-mnemonic instruction))
     2764  (let* ((op0 (x86-di-op0 instruction))
     2765         (op1 (x86-di-op1 instruction))
     2766         (op2 (x86-di-op2 instruction)))
     2767    (when op0
     2768      (write-x86-lap-operand t op0 ds)
     2769      (when op1
     2770        (write-x86-lap-operand t op1 ds)
     2771        (when op2
     2772          (write-x86-lap-operand t op2 ds)))))
     2773  (format t ")"))
     2774
    27602775(defvar *previous-source-note*)
    27612776
     
    27772792      (setq seq 0))
    27782793    (format t "~&  [~D]~8T" pc)
    2779     (dolist (p (x86-di-prefixes instruction))
    2780       (format t "~&  (~a)~%" p))
    2781     (format t "  (~a" (x86-di-mnemonic instruction))
    2782     (let* ((op0 (x86-di-op0 instruction))
    2783            (op1 (x86-di-op1 instruction))
    2784            (op2 (x86-di-op2 instruction)))
    2785       (when op0
    2786         (write-x86-lap-operand t op0 ds)
    2787         (when op1
    2788         (write-x86-lap-operand t op1 ds)
    2789           (when op2
    2790             (write-x86-lap-operand t op2 ds)))))
    2791     (format t ")")
     2794    (x86-print-bare-disassembled-instruction ds instruction)
    27922795    (format t "~%")
    27932796    (1+ seq)))
Note: See TracChangeset for help on using the changeset viewer.