From f6c2162b94e317898b3524a8a48bc650e731f8e6 Mon Sep 17 00:00:00 2001 From: toy <toy> Date: Mon, 4 Jun 2001 17:58:35 +0000 Subject: [PATCH] Add disassembler support for printing out notes about static-symbols (and NIL). Based on some hints from Tim Moore. --- compiler/x86/insts.lisp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/compiler/x86/insts.lisp b/compiler/x86/insts.lisp index cd5fd8259..cb8e2d549 100644 --- a/compiler/x86/insts.lisp +++ b/compiler/x86/insts.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/insts.lisp,v 1.21 2001/05/08 12:32:34 pw Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/insts.lisp,v 1.22 2001/06/04 17:58:35 toy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -431,10 +431,26 @@ dstate)) (disassem:maybe-note-assembler-routine offset nil - dstate))) + dstate) + (let ((offs (- offset disassem::nil-addr))) + (when (typep offs 'offset) + (disassem::maybe-note-nil-indexed-symbol-slot-ref offs + dstate))))) (princ offset stream)))))) (write-char #\] stream)) +(defun print-imm-data (value stream dstate) + (let ((offset (- value disassem::nil-addr))) + (if (zerop offset) + (format stream "#x~X" value) + (format stream "~A" value)) + (when (typep offset 'offset) + (or (disassem::maybe-note-nil-indexed-object offset dstate) + (disassem::maybe-note-assembler-routine value stream dstate) + (nth-value 1 + (disassem::note-code-constant-absolute offset + dstate)))))) + (defun print-reg/mem (value stream dstate) (declare (type (or list reg) value) (type stream stream) @@ -586,6 +602,7 @@ (disassem:read-suffix (width-bits (disassem:dstate-get-prop dstate 'width)) dstate)) + :printer #'print-imm-data ) (disassem:define-argument-type signed-imm-data -- GitLab