Index: /trunk/source/compiler/X86/X8632/x8632-vinsns.lisp
===================================================================
--- /trunk/source/compiler/X86/X8632/x8632-vinsns.lisp	(revision 14775)
+++ /trunk/source/compiler/X86/X8632/x8632-vinsns.lisp	(revision 14776)
@@ -4137,4 +4137,26 @@
 )
 
+(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
Index: /trunk/source/compiler/X86/X8664/x8664-vinsns.lisp
===================================================================
--- /trunk/source/compiler/X86/X8664/x8664-vinsns.lisp	(revision 14775)
+++ /trunk/source/compiler/X86/X8664/x8664-vinsns.lisp	(revision 14776)
@@ -4557,4 +4557,26 @@
                                      ()))
 
+(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
Index: /trunk/source/compiler/X86/x862.lisp
===================================================================
--- /trunk/source/compiler/X86/x862.lisp	(revision 14775)
+++ /trunk/source/compiler/X86/x862.lisp	(revision 14776)
@@ -7351,5 +7351,34 @@
 
 (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 form)
+  (if (and vreg
+           (= (hard-regspec-class vreg) hard-reg-class-fpr)
+           (= (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 form)
+  (if (and vreg
+           (= (hard-regspec-class vreg) hard-reg-class-fpr)
+           (= (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.
