From 768ebe5c796d85d0262260c9a0b1f7aec28b8844 Mon Sep 17 00:00:00 2001 From: bd Date: Wed, 16 Apr 2025 16:37:18 -0400 Subject: Let displacement for JAL+JMP be the absolute file position of label --- src/emit.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/emit.lisp') diff --git a/src/emit.lisp b/src/emit.lisp index 78a41ed..f73d9be 100644 --- a/src/emit.lisp +++ b/src/emit.lisp @@ -68,9 +68,9 @@ concatenated with TYPE." (util:format-as-binary val 5) (error (format nil "~a is not a valid register id!~%" val)))) -(defun l (l s) +(defun l (l &optional (pos 0)) (let ((d (util:get-label l))) - (- d s))) + (- d pos))) (defun var (s) (let ((pos (util:get-variable s))) -- cgit v1.2.3