Skip to content

Commit 0af43b9

Browse files
committed
first trace file!
We need to emit labels that we have generated, otherwise the metadata isn't consistent and the compiler croaks. We also need EMIT-BLOCK-HEADER and EMIT-ERROR-BREAK functions for emittage, ERROR-TRAP and related variables, and the %TEST-HEADERS function for automatically-generated type tests. With this, we can compile src/code/scratch.lisp "successfully", and also successfully generate the trace file to prove it. (Said compilation, of course, produces no actual instructions, and the trace file reveals some issues with our current setup, but it's our first tangible output artifact. Onward!)
1 parent 84046e7 commit 0af43b9

File tree

5 files changed

+21
-4
lines changed

5 files changed

+21
-4
lines changed

src/compiler/rv32/call.lisp

+9-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050

5151
(define-vop (xep-allocate-frame)
5252
(:info start-lab)
53-
(:generator 1))
53+
(:generator 1
54+
(emit-label start-lab)))
5455

5556
(define-vop (xep-setup-sp)
5657
(:generator 1))
@@ -67,7 +68,13 @@
6768

6869
(define-vop (unknown-values-receiver)
6970
(:results (start :scs (any-reg)) (count :scs (any-reg))))
70-
71+
72+
(defun emit-block-header (start-label trampoline-label fall-thru-p align-p)
73+
(declare (ignore fall-thru-p alignp))
74+
(when trampoline-label
75+
(emit-label trampoline-label))
76+
(emit-label start-label))
77+
7178
(define-vop (call-local)
7279
(:args (fp) (nfp) (args :more t))
7380
(:results (values :more t))

src/compiler/rv32/macros.lisp

+7-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@
1010
;;;; files for more information.
1111

1212
(in-package "SB!VM")
13-
13+
14+
(defun emit-error-break (vop kind code values)
15+
(assemble ()
16+
(when vop (note-this-location vop :internal-error))
17+
(emit-internal-error kind code values)
18+
(emit-alignment word-shift)))
19+
1420
(defmacro define-full-reffer (name type offset lowtag scs eltype &optional translate)
1521
`(progn
1622
(define-vop (,name)

src/compiler/rv32/move.lisp

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
(in-package "SB!VM")
1313

14+
(defun load-immediate-word (y val))
15+
1416
(define-move-fun (load-immediate 1) (vop x y)
1517
((immediate) (any-reg descriptor-reg))
1618
(let ((val (tn-value x)))

src/compiler/rv32/parms.lisp

-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@
8080

8181
;;;; other miscellaneous constants
8282

83-
#+nil
8483
(defenum (:start 8)
8584
halt-trap
8685
pending-interrupt-trap

src/compiler/rv32/type-vops.lisp

+3
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@
1010
;;;; files for more information.
1111

1212
(in-package "SB!VM")
13+
14+
(defun %test-headers (value temp target not-p function-p headers
15+
&key (drop-through)))

0 commit comments

Comments
 (0)