1.0.30.3: deal with load-time-value constants more aggressively
[sbcl.git] / src / compiler / x86 / move.lisp
index 2c198a9..344c572 100644 (file)
   (:note "fixnum untagging")
   (:generator 1
     (move y x)
-    (inst sar y 2)))
+    (inst sar y n-fixnum-tag-bits)))
 (define-move-vop move-to-word/fixnum :move
   (any-reg descriptor-reg) (signed-reg unsigned-reg))
 
   (:results (y :scs (signed-reg unsigned-reg)))
   (:note "constant load")
   (:generator 1
-    (inst mov y (tn-value x))))
+    (cond ((sb!c::tn-leaf x)
+           (inst mov y (tn-value x)))
+          (t
+           (inst mov y x)
+           (inst sar y n-fixnum-tag-bits)))))
 (define-move-vop move-to-word-c :move
   (constant) (signed-reg unsigned-reg))