Relax register constraints for tagging rule.
authorTaylor R Campbell <campbell@mumble.net>
Sat, 29 Dec 2018 21:57:47 +0000 (21:57 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Tue, 13 Aug 2019 14:37:02 +0000 (14:37 +0000)
No need to keep the source alive here -- use move-to-target and allow
any temporary register instead.

src/compiler/machines/x86-64/rules1.scm

index 5f6acf4d05971567feca9ccd14ae2f019a49a2b4..8dd0daddc7ca6403f6bca8173eb5c2c362f50909 100644 (file)
@@ -110,10 +110,10 @@ USA.
          (CONS-POINTER (MACHINE-CONSTANT (? type)) (REGISTER (? datum))))
   (if (zero? type)
       (assign-register->register target datum)
-      (let* ((datum (source-register-reference datum))
-            (target (target-register-reference target)))
-       (LAP (MOV Q ,target (&U ,(make-non-pointer-literal type 0)))
-            (OR Q ,target ,datum)))))
+      (let* ((target (standard-move-to-target! datum target))
+            (temp (temporary-register-reference)))
+       (LAP (MOV Q ,temp (&U ,(make-non-pointer-literal type 0)))
+            (OR Q ,target ,temp)))))
 
 #| This doesn't work because immediate operands aren't big enough to
    fit the type tag.