Changeset 6336


Ignore:
Timestamp:
Apr 22, 2007, 12:21:38 PM (15 years ago)
Author:
gb
Message:

Add delta to label gensyms, commented instruction addresses.
Use delta of x8664::fulltag-function on x8664.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/x8664-call/ccl/compiler/X86/x86-disassemble.lisp

    r6311 r6336  
    5858                             :adjustable t))
    5959  (symbolic-names ())
     60  (delta 0)
    6061)
    6162
     
    26052606  (let* ((label (label-x86-lap-expression-label exp))
    26062607         (name (x86-lap-label-name label))
    2607          (entry (x86-ds-entry-point ds)))
     2608         (entry (x86-ds-entry-point ds))
     2609         (delta (x86-ds-delta ds)))
    26082610    `(":^" , (if (typep name 'fixnum)
    2609             (format nil "L~d" (- name entry))
     2611            (format nil "L~d" (+ delta (- name entry)))
    26102612            name))))
    26112613
     
    26462648                                    ds)
    26472649  (let* ((addr (x86::x86-label-operand-label op))
    2648          (entrypoint (x86-ds-entry-point ds)))
    2649     (format nil "L~d" (- addr entrypoint))))
     2650         (entrypoint (x86-ds-entry-point ds))
     2651         (delta (x86-ds-delta ds)))
     2652    (format nil "L~d" (+ delta (- addr entrypoint)))))
    26502653
    26512654
     
    27042707(defun x86-print-disassembled-instruction (ds instruction seq)
    27052708  (let* ((addr (x86-di-address instruction))
    2706          (entry (x86-ds-entry-point ds)))
     2709         (entry (x86-ds-entry-point ds))
     2710         (delta (x86-ds-delta ds)))
    27072711    (when (x86-di-labeled instruction)
    2708       (format t "~&L~d~&" (- addr entry))
     2712      (format t "~&L~d~&" (+ delta (- addr entry)))
    27092713      (setq seq 0))
    27102714    (dolist (p (x86-di-prefixes instruction))
     
    27222726    (format t ")")
    27232727    (unless (zerop seq) ;(when (oddp seq)
    2724       (format t "~50t;[~d]" (- addr entry)))
     2728      (format t "~50t;[~d]" (+ delta (- addr entry))))
    27252729    (format t "~%")
    27262730    (1+ seq)))
     
    27372741              :code-pointer 0           ; for next-u32 below
    27382742              :symbolic-names symbolic-names
    2739               :pending-labels (list 7)))
     2743              :pending-labels (list 7)
     2744              :delta x8664::fulltag-function))
    27402745         (blocks (x86-ds-blocks ds)))
    27412746    (setf (x86-ds-code-limit ds)
Note: See TracChangeset for help on using the changeset viewer.