]> git.eshelyaron.com Git - emacs.git/commitdiff
emit reloc index
authorAndrea Corallo <andrea_corallo@yahoo.it>
Sun, 18 Aug 2019 19:39:09 +0000 (21:39 +0200)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:37:39 +0000 (11:37 +0100)
lisp/emacs-lisp/comp.el

index a453acc329ce3c2bb7b017cdc1420c12e4f8a7f7..11803a3ea5fd1fa59900961b5ee4b7e38b12e5e0 100644 (file)
@@ -378,10 +378,10 @@ If DST-N is specified use it otherwise assume it to be the current slot."
 
 (defun comp-emit-set-const (val)
   "Set constant VAL to current slot."
-  (comp-add-const-to-relocs val)
-  (setf (comp-slot) (make-comp-mvar :slot (comp-sp)
-                                    :constant val))
-  (comp-emit (list 'setimm (comp-slot) val)))
+  (let ((rel-idx (comp-add-const-to-relocs val)))
+    (setf (comp-slot) (make-comp-mvar :slot (comp-sp)
+                                      :constant val))
+    (comp-emit `(setimm ,(comp-slot) ,rel-idx . ,val))))
 
 (defun comp-mark-block-closed ()
   "Mark current basic block as closed."