Skip to content

Commit

Permalink
define location-print-name function
Browse files Browse the repository at this point in the history
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
  • Loading branch information
csrhodes committed Aug 13, 2018
1 parent a595989 commit 86ea59e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/compiler/rv32/vm.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,15 @@
(defconstant lra-save-offset 1)
(defconstant nfp-save-offset 2)

(defun location-print-name (tn)
(declare (type tn tn))
(let ((sb (sb-name (sc-sb (tn-sc tn))))
(offset (tn-offset tn)))
(ecase sb
(registers (or (svref *register-names* offset)
(format nil "x~D" offset)))
(float-registers (format nil "f~D" offset))
(constant (format nil "Const~D" offset)))))

(defun combination-implementation-style (node)
(values :default nil))

0 comments on commit 86ea59e

Please sign in to comment.