[Openmcl-cvs-notifications] r14776 - 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 18:08:22 CDT 2011
Author: gb
Date: Mon May 2 18:08:22 2011
New Revision: 14776
Log:
Floating-point negation in the x86 backends.
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 18:08:22 2=
011
@@ -4136,6 +4136,28 @@
())
)
=
+(define-x8632-vinsn double-float-negate (((reg :double-float))
+ ((reg :double-float)))
+ (pxor (:@ (:^ :const) (:% x8632::fn)) (:%xmm reg))
+ (:uuo-section)
+ (:align 4)
+ :const
+ (:long 0)
+ (:long #x-80000000)
+ (:long 0)
+ (:long 0))
+
+(define-x8632-vinsn single-float-negate (((reg :single-float))
+ ((reg :single-float)))
+ (pxor (:@ (:^ :const) (:% x8632::fn)) (:%xmm reg))
+ (:uuo-section)
+ (:align 4)
+ :const
+ (:long #x80000000)
+ (:long 0)
+ (:long 0)
+ (:long 0))
+
(queue-fixup
(fixup-x86-vinsn-templates
*x8632-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 18:08:22 2=
011
@@ -4556,6 +4556,28 @@
()
()))
=
+(define-x8664-vinsn double-float-negate (((reg :double-float))
+ ((reg :double-float)))
+ (pxor (:@ (:^ :const) (:% x8664::fn)) (:%xmm reg))
+ (:uuo-section)
+ (:align 4)
+ :const
+ (:long 0)
+ (:long #x-80000000)
+ (:long 0)
+ (:long 0))
+
+(define-x8664-vinsn single-float-negate (((reg :single-float))
+ ((reg :single-float)))
+ (pxor (:@ (:^ :const) (:% x8664::fn)) (:%xmm reg))
+ (:uuo-section)
+ (:align 4)
+ :const
+ (:long #x80000000)
+ (:long 0)
+ (:long 0)
+ (:long 0))
+
(queue-fixup
(fixup-x86-vinsn-templates
*x8664-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 18:08:22 2011
@@ -7350,7 +7350,36 @@
(^))
=
(defx862 x862-minus1 minus1 (seg vreg xfer form)
- (x862-unary-builtin seg vreg xfer '%negate form))
+ (or (acode-optimize-minus1 seg vreg xfer form *x862-trust-declarations*)
+ (x862-unary-builtin seg vreg xfer '%negate form)))
+
+(defx862 x862-%double-float-negate %double-float-negate (seg vreg xfer for=
m)
+ (if (and vreg
+ (=3D (hard-regspec-class vreg) hard-reg-class-fpr)
+ (=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 () (r1 :double-float)
+ (setq r1 (x862-one-untargeted-reg-form seg form r1))
+ (! double-float-negate r1)
+ (ensuring-node-target (target vreg)
+ (x862-copy-register seg target r1))))
+ (^))
+
+(defx862 x862-%single-float-negate %single-float-negate (seg vreg xfer for=
m)
+ (if (and vreg
+ (=3D (hard-regspec-class vreg) hard-reg-class-fpr)
+ (=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 () (r1 :single-float)
+ (setq r1 (x862-one-untargeted-reg-form seg form r1))
+ (! single-float-negate r1)
+ (ensuring-node-target (target vreg)
+ (x862-copy-register seg target r1))))
+ (^))
=
;;; Return T if form is declare to be something that couldn't be a fixnum.
(defun x862-explicit-non-fixnum-type-p (form)
More information about the Openmcl-cvs-notifications
mailing list