[Openmcl-cvs-notifications] r14777 - in /trunk/source/compiler/X86: X8632/x8632-vinsns.lisp X8664/x8664-vinsns.lisp x862.lisp

gb at clozure.com gb at clozure.com
Mon May 2 19:23:45 CDT 2011


Author: gb
Date: Mon May  2 19:23:45 2011
New Revision: 14777

Log:
Floating-point negation in the x86 backends; this time, don't depend on
4 bit alignment (we can't get that on x8632.)

Modified:
    trunk/source/compiler/X86/X8632/x8632-vinsns.lisp
    trunk/source/compiler/X86/X8664/x8664-vinsns.lisp
    trunk/source/compiler/X86/x862.lisp

Modified: trunk/source/compiler/X86/X8632/x8632-vinsns.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/compiler/X86/X8632/x8632-vinsns.lisp (original)
+++ trunk/source/compiler/X86/X8632/x8632-vinsns.lisp Mon May  2 19:23:45 2=
011
@@ -4137,26 +4137,24 @@
 )
 =

 (define-x8632-vinsn double-float-negate (((reg :double-float))
-                                         ((reg :double-float)))
-  (pxor (:@ (:^ :const) (:% x8632::fn)) (:%xmm reg))
+                                         ((reg :double-float)
+                                          (tmp :double-float)))
+  (movsd (:@ (:^ :const) (:% x8632::fn)) (:%xmm tmp))
+  (pxor (:%xmm tmp) (:%xmm reg))
+
   (:uuo-section)
-  (:align 4)
   :const
   (:long 0)
-  (:long #x-80000000)
-  (:long 0)
-  (:long 0))
+  (:long #x-80000000))
 =

 (define-x8632-vinsn single-float-negate (((reg :single-float))
-                                         ((reg :single-float)))
-  (pxor (:@ (:^ :const) (:% x8632::fn)) (:%xmm reg))
+                                         ((reg :single-float)
+                                          (tmp :single-float)))
+  (movss (:@ (:^ :const) (:% x8632::fn)) (:%xmm tmp))
+  (pxor (:%xmm tmp) (:%xmm reg))
   (:uuo-section)
-  (:align 4)
   :const
-  (:long #x80000000)
-  (:long 0)
-  (:long 0)
-  (:long 0))
+  (:long #x80000000))
 =

 (queue-fixup
  (fixup-x86-vinsn-templates

Modified: trunk/source/compiler/X86/X8664/x8664-vinsns.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/compiler/X86/X8664/x8664-vinsns.lisp (original)
+++ trunk/source/compiler/X86/X8664/x8664-vinsns.lisp Mon May  2 19:23:45 2=
011
@@ -4557,26 +4557,23 @@
                                      ()))
 =

 (define-x8664-vinsn double-float-negate (((reg :double-float))
-                                         ((reg :double-float)))
-  (pxor (:@ (:^ :const) (:% x8664::fn)) (:%xmm reg))
+                                         ((reg :double-float)
+                                          (tmp :double-float)))
+  (movsd (:@ (:^ :const) (:% x8664::fn)) (:%xmm tmp)) =

+  (pxor (:%xmm tmp) (:%xmm reg))
   (:uuo-section)
-  (:align 4)
   :const
   (:long 0)
-  (:long #x-80000000)
-  (:long 0)
-  (:long 0))
+  (:long #x-80000000))
 =

 (define-x8664-vinsn single-float-negate (((reg :single-float))
-                                         ((reg :single-float)))
-  (pxor (:@ (:^ :const) (:% x8664::fn)) (:%xmm reg))
+                                         ((reg :single-float)
+                                          (tmp :single-float)))
+  (movss (:@ (:^ :const) (:% x8664::fn)) (:%xmm tmp)) =

+  (pxor (:%xmm tmp) (:%xmm reg))
   (:uuo-section)
-  (:align 4)
   :const
-  (:long #x80000000)
-  (:long 0)
-  (:long 0)
-  (:long 0))
+  (:long #x80000000))
 =

 (queue-fixup
  (fixup-x86-vinsn-templates

Modified: trunk/source/compiler/X86/x862.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/compiler/X86/x862.lisp (original)
+++ trunk/source/compiler/X86/x862.lisp Mon May  2 19:23:45 2011
@@ -7359,10 +7359,12 @@
            (=3D (get-regspec-mode vreg) hard-reg-class-fpr-mode-double))
     (progn
       (x862-one-targeted-reg-form seg form vreg)
-      (! double-float-negate vreg))
+      (with-fp-target (vreg) (r2 :double-float)
+        (! double-float-negate vreg r2)))
     (with-fp-target () (r1 :double-float)
       (setq r1 (x862-one-untargeted-reg-form seg form r1))
-      (! double-float-negate r1)
+      (with-fp-target (r1) (r2 :double-float)
+        (! double-float-negate r1 r2))
       (ensuring-node-target (target vreg)
         (x862-copy-register seg target r1))))
   (^))
@@ -7373,10 +7375,12 @@
            (=3D (get-regspec-mode vreg) hard-reg-class-fpr-mode-single))
     (progn
       (x862-one-targeted-reg-form seg form vreg)
-      (! single-float-negate vreg))
+      (with-fp-target (vreg) (r2 :single-float)
+        (! single-float-negate vreg r2)))
     (with-fp-target () (r1 :single-float)
       (setq r1 (x862-one-untargeted-reg-form seg form r1))
-      (! single-float-negate r1)
+      (with-fp-target (r1) (r2 :single-float)
+        (! single-float-negate r1 r2))
       (ensuring-node-target (target vreg)
         (x862-copy-register seg target r1))))
   (^))



More information about the Openmcl-cvs-notifications mailing list