0.9.9.19:
[sbcl.git] / src / compiler / x86-64 / macros.lisp
index ef889ec..eeb35c1 100644 (file)
   (once-only ((n-dst dst)
               (n-src src))
     `(unless (location= ,n-dst ,n-src)
-       (inst mov ,n-dst ,n-src))))
+       (sc-case ,n-dst
+         (single-reg
+          (inst movss ,n-dst ,n-src))
+         (double-reg
+          (inst movsd ,n-dst ,n-src))
+         (t
+          (inst mov ,n-dst ,n-src))))))
 
 (defmacro make-ea-for-object-slot (ptr slot lowtag)
   `(make-ea :qword :base ,ptr :disp (- (* ,slot n-word-bytes) ,lowtag)))
   (declare (ignore temp))
   `(store-symbol-value ,reg ,symbol))
 
+(defmacro load-binding-stack-pointer (reg)
+  #!+sb-thread
+  `(inst mov ,reg (make-ea :qword :base thread-base-tn
+                   :disp (* 8 thread-binding-stack-pointer-slot)))
+  #!-sb-thread
+  `(load-symbol-value ,reg *binding-stack-pointer*))
+
+(defmacro store-binding-stack-pointer (reg)
+  #!+sb-thread
+  `(inst mov (make-ea :qword :base thread-base-tn
+              :disp (* 8 thread-binding-stack-pointer-slot))
+    ,reg)
+  #!-sb-thread
+  `(store-symbol-value ,reg *binding-stack-pointer*))
+
 (defmacro load-type (target source &optional (offset 0))
   #!+sb-doc
   "Loads the type bits of a pointer into target independent of