From 762431b0f0a6ead18a93a05c0f3269dca5b8fef1 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Fri, 29 Jul 2022 17:52:54 -0700 Subject: Insert an exit op at the end of the program. --- csc/encoding.csc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'csc/encoding.csc') diff --git a/csc/encoding.csc b/csc/encoding.csc index 7da5370..f6a003d 100644 --- a/csc/encoding.csc +++ b/csc/encoding.csc @@ -164,8 +164,9 @@ (arg->le-bytes w word) (arg->le-bytes w (list 'local ptr)) (arg->le-bytes w offset)) - (('exit) - (make-opcode w 13 #f #f)) + (('exit code) + (make-opcode w 13 (is-const? code) #f) + (arg->le-bytes w code)) (_ (error "invalid opcode" opcode)))) -- cgit v1.3.1