Add macro for iterating over ASM-OBJECTs

This commit is contained in:
John Lorentzson 2025-07-03 16:57:33 +02:00
parent 0117df02f8
commit f9a69e2da9

View file

@ -214,6 +214,12 @@
(emit-cmp :address (data-reference (second (inputs inst))))) (emit-cmp :address (data-reference (second (inputs inst)))))
(emit-store-bool (output inst))) (emit-store-bool (output inst)))
(defmacro do-asm-objects ((asm-obj start-asm-obj) &body body)
`(loop :for ,asm-obj := ,start-asm-obj :then (next ,asm-obj)
:until (null ,asm-obj)
:do (progn
,@body)))
(defun link-compute-addresses (start-instruction origin-address) (defun link-compute-addresses (start-instruction origin-address)
"First linking pass, computes the addresses of all labels." "First linking pass, computes the addresses of all labels."
(let ((address origin-address)) (let ((address origin-address))