diff --git a/wip-duuqnd/user-side-compiler/backend/code-generator.lisp b/wip-duuqnd/user-side-compiler/backend/code-generator.lisp index 89b1cd3..4186b64 100644 --- a/wip-duuqnd/user-side-compiler/backend/code-generator.lisp +++ b/wip-duuqnd/user-side-compiler/backend/code-generator.lisp @@ -183,6 +183,14 @@ (emit-asm-instruction :opcode #x20 :operand (callee inst) :byte-length 3) (emit-store-result (output inst))) +(defmethod compile-ir ((inst ir-jump)) + (unless (eql (next (iblock inst)) + (first (destinations inst))) + (emit-asm-instruction :opcode #x4C + :operand (first (destinations inst)) + :byte-length 3)) + (setf *last-instruction* '(:jump))) + (defmethod compile-ir ((inst ir-test-equal)) (emit-load-data (first (inputs inst))) (if (eql (strategy (allocation-details (second (inputs inst))))