Skip to content

Commit 86ea59e

Browse files
committed
define location-print-name function
it's not necessary for cross-compilation as such, but I'm spending a lot of time in the debugger, and the debugger wants to print things, so at least give the system a chance to print the things. also support constants in LOCATION-PRINT-NAME, because a named call (such as to %CHECK-BOUND) needs a constant location. The fact that we shouldn't have a named call to %CHECK-BOUND is, well, a symptom of our incremental backend development
1 parent a595989 commit 86ea59e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/compiler/rv32/vm.lisp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,5 +112,15 @@
112112
(defconstant lra-save-offset 1)
113113
(defconstant nfp-save-offset 2)
114114

115+
(defun location-print-name (tn)
116+
(declare (type tn tn))
117+
(let ((sb (sb-name (sc-sb (tn-sc tn))))
118+
(offset (tn-offset tn)))
119+
(ecase sb
120+
(registers (or (svref *register-names* offset)
121+
(format nil "x~D" offset)))
122+
(float-registers (format nil "f~D" offset))
123+
(constant (format nil "Const~D" offset)))))
124+
115125
(defun combination-implementation-style (node)
116126
(values :default nil))

0 commit comments

Comments
 (0)