From 4899d888aa18b46a53fec9b592cdf954a74930f0 Mon Sep 17 00:00:00 2001 From: John Lorentzson Date: Thu, 3 Jul 2025 10:28:58 +0200 Subject: [PATCH] Add COMPILE-IR method for IR-RETURN --- wip-duuqnd/user-side-compiler/backend/code-generator.lisp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wip-duuqnd/user-side-compiler/backend/code-generator.lisp b/wip-duuqnd/user-side-compiler/backend/code-generator.lisp index eda09c5..ffb272c 100644 --- a/wip-duuqnd/user-side-compiler/backend/code-generator.lisp +++ b/wip-duuqnd/user-side-compiler/backend/code-generator.lisp @@ -117,6 +117,9 @@ (defmethod compile-ir ((inst ir-inst)) (warn "Skipped compiling ~A; no COMPILE-IR method" inst)) +(defmethod compile-ir ((inst ir-return)) + (emit-asm-instruction :opcode #x60 :byte-length 1)) + (defmethod compile-ir ((inst ir-plus)) (unless (= (length (inputs inst)) 2) (error "During the final code generation step, IR-PLUS must have exactly 2 operands."))