1.0.32.12: Fix slot-value on specialized parameters in SVUC methods
[sbcl.git] / src / compiler / x86 / move.lisp
index fa79459..344c572 100644 (file)
   (:vop-var vop)
   (:save-p :compute-only)
   (:generator 666
-    (error-call vop object-not-type-error x type)))
+    (error-call vop 'object-not-type-error x type)))
 \f
 ;;;; moves and coercions
 
   (: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))
 
       ;; The assembly routines test the sign flag from this one, so if
       ;; you change stuff here, make sure the sign flag doesn't get
       ;; overwritten before the CALL!
-      (inst test x #xe0000000)
+      (inst test x #.(ash lowtag-mask (- n-word-bits n-fixnum-tag-bits 1)))
       ;; Faster but bigger then SHL Y 2. The cost of doing this speculatively
       ;; is noise compared to bignum consing if that is needed.
       (inst lea y (make-ea :dword :index x :scale 4))