[cmucl-commit] [git] CMU Common Lisp branch master updated. snapshot-2014-08-10-gab44683

Raymond Toy rtoy at common-lisp.net
Sat Aug 16 03:06:46 UTC 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMU Common Lisp".

The branch, master has been updated
       via  ab446830b129ca3607c4342c24849ca8554db7ce (commit)
      from  375ce218ab639fbc0b433942dbb7398a0bcd0177 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ab446830b129ca3607c4342c24849ca8554db7ce
Author: Raymond Toy <toy.raymond at gmail.com>
Date:   Fri Aug 15 20:06:40 2014 -0700

    Micro optimize float bits getters.
    
    When the float is in a register, we don't have to store it to memory
    to get at the parts. SSE2 has instructions to move from an XMM
    register to a general purpose register.

diff --git a/src/compiler/x86/float-sse2.lisp b/src/compiler/x86/float-sse2.lisp
index 76bcc31..876b19d 100644
--- a/src/compiler/x86/float-sse2.lisp
+++ b/src/compiler/x86/float-sse2.lisp
@@ -1199,7 +1199,6 @@
   (:args (float :scs (single-reg descriptor-reg)
                 :load-if (not (sc-is float single-stack))))
   (:results (bits :scs (signed-reg)))
-  (:temporary (:sc signed-stack :from :argument :to :result) stack-temp)
   (:arg-types single-float)
   (:result-types signed-num)
   (:translate single-float-bits)
@@ -1210,8 +1209,7 @@
       (signed-reg
        (sc-case float
          (single-reg
-	  (inst movss stack-temp float)
-	  (inst mov bits stack-temp))
+	  (inst movd bits float))
          (single-stack
           (move bits float))
          (descriptor-reg
@@ -1226,7 +1224,7 @@
   (:args (float :scs (double-reg descriptor-reg)
                 :load-if (not (sc-is float double-stack))))
   (:results (hi-bits :scs (signed-reg)))
-  (:temporary (:sc double-stack) temp)
+  (:temporary (:sc double-reg) temp)
   (:arg-types double-float)
   (:result-types signed-num)
   (:translate double-float-high-bits)
@@ -1235,11 +1233,9 @@
   (:generator 5
      (sc-case float
        (double-reg
-	(let ((where (make-ea :dword :base ebp-tn
-			      :disp (- (* (+ 2 (tn-offset temp))
-					  word-bytes)))))
-	  (inst movsd where float))
-        (loadw hi-bits ebp-tn (- (1+ (tn-offset temp)))))
+	(inst movq temp float)
+	(inst psrlq temp 32)
+	(inst movd hi-bits temp))
        (double-stack
         (loadw hi-bits ebp-tn (- (1+ (tn-offset float)))))
        (descriptor-reg
@@ -1250,7 +1246,6 @@
   (:args (float :scs (double-reg descriptor-reg)
                 :load-if (not (sc-is float double-stack))))
   (:results (lo-bits :scs (unsigned-reg)))
-  (:temporary (:sc double-stack) temp)
   (:arg-types double-float)
   (:result-types unsigned-num)
   (:translate double-float-low-bits)
@@ -1259,11 +1254,7 @@
   (:generator 5
      (sc-case float
        (double-reg
-	(let ((where (make-ea :dword :base ebp-tn
-			      :disp (- (* (+ 2 (tn-offset temp))
-					  word-bytes)))))
-	  (inst movsd where float))
-	(loadw lo-bits ebp-tn (- (+ 2 (tn-offset temp)))))
+	(inst movd lo-bits float))
        (double-stack
         (loadw lo-bits ebp-tn (- (+ 2 (tn-offset float)))))
        (descriptor-reg
@@ -1278,19 +1269,17 @@
 	    (lo-bits :scs (unsigned-reg)))
   (:arg-types double-float)
   (:result-types signed-num unsigned-num)
-  (:temporary (:sc double-stack) temp)
+  (:temporary (:sc double-reg) temp)
   (:translate kernel::double-float-bits)
   (:policy :fast-safe)
   (:vop-var vop)
   (:generator 5
     (sc-case float
       (double-reg
-	(let ((where (make-ea :dword :base ebp-tn
-			      :disp (- (* (+ 2 (tn-offset temp))
-					  word-bytes)))))
-	  (inst movsd where float))
-	(loadw hi-bits ebp-tn (- (+ 1 (tn-offset temp))))
-	(loadw lo-bits ebp-tn (- (+ 2 (tn-offset temp)))))
+        (inst movq temp float)
+	(inst movd lo-bits temp)
+	(inst psrlq temp 32)
+	(inst movd hi-bits temp))
       (double-stack
        (loadw hi-bits ebp-tn (- (+ 1 (tn-offset float))))
        (loadw lo-bits ebp-tn (- (+ 2 (tn-offset float)))))
@@ -1299,6 +1288,7 @@
 	   vm:other-pointer-type)
        (loadw lo-bits float vm:double-float-value-slot
 	       vm:other-pointer-type)))))
+
 
 ;;;; Float mode hackery:
 

-----------------------------------------------------------------------

Summary of changes:
 src/compiler/x86/float-sse2.lisp |   34 ++++++++++++----------------------
 1 file changed, 12 insertions(+), 22 deletions(-)


hooks/post-receive
-- 
CMU Common Lisp


More information about the cmucl-commit mailing list