aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Earnshaw <rearnsha@arm.com>2005-05-11 10:13:23 +0000
committerRichard Earnshaw <rearnsha@gcc.gnu.org>2005-05-11 10:13:23 +0000
commit5a942c07c2080d0b155717dfeb1683078c493a21 (patch)
tree53ade54ea9f8265814f981af15d3a5315619df9c /gcc
parentc554294001d28360a26956e7508231fca94f3074 (diff)
downloadgcc-5a942c07c2080d0b155717dfeb1683078c493a21.zip
gcc-5a942c07c2080d0b155717dfeb1683078c493a21.tar.gz
gcc-5a942c07c2080d0b155717dfeb1683078c493a21.tar.bz2
arm.md (negsf2, negdf2): Permit these expands when compiling for VFP.
* arm.md (negsf2, negdf2): Permit these expands when compiling for VFP. * gcc.dg/arm-vfp1.c: Revert last change. From-SVN: r99569
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/arm/arm.md4
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/arm-vfp1.c9
4 files changed, 11 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d6dd1b7..0cc4dfb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2005-05-11 Richard Earnshaw <richard.earnshaw@arm.com>
+
+ * arm.md (negsf2, negdf2): Permit these expands when compiling for VFP.
+
2005-05-11 Richard Guenther <rguenth@gcc.gnu.org>
PR middle-end/19807
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index ee7a1d8..5c7da90 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -2969,14 +2969,14 @@
(define_expand "negsf2"
[(set (match_operand:SF 0 "s_register_operand" "")
(neg:SF (match_operand:SF 1 "s_register_operand" "")))]
- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_FPA"
+ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
""
)
(define_expand "negdf2"
[(set (match_operand:DF 0 "s_register_operand" "")
(neg:DF (match_operand:DF 1 "s_register_operand" "")))]
- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_FPA"
+ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
"")
;; abssi2 doesn't really clobber the condition codes if a different register
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 030b2fe..d2ee0ca 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2005-05-11 Richard Earnshaw <richard.earnshaw@arm.com>
+
+ * gcc.dg/arm-vfp1.c: Revert last change.
+
2005-05-11 Richard Guenther <rguenth@gcc.gnu.org>
PR middle-end/19807
diff --git a/gcc/testsuite/gcc.dg/arm-vfp1.c b/gcc/testsuite/gcc.dg/arm-vfp1.c
index 4cc90e0..5898e802 100644
--- a/gcc/testsuite/gcc.dg/arm-vfp1.c
+++ b/gcc/testsuite/gcc.dg/arm-vfp1.c
@@ -14,14 +14,7 @@ void test_sf() {
/* { dg-final { scan-assembler "fabss" } } */
f1 = fabsf (f1);
/* negsf2_vfp */
- /* There is no test for "fnegs" because the compiler will use an
- integer operation instead to implement this operation. Adding
- complexity to the operand (e.g., "-(f1 + f2)") doesn't change the
- situation, as the compiler still wants the result in an integer
- register before writing it back to memory. If we used an ABI that
- required passing floating-point values in VFP registers that
- would likely persuade the compiler to keep the value in the VFP
- registers. */
+ /* { dg-final { scan-assembler "fnegs" } } */
f1 = -f1;
/* addsf3_vfp */
/* { dg-final { scan-assembler "fadds" } } */