diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d6dd1b7d8fe..0cc4dfb2220 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2005-05-11 Richard Earnshaw + + * arm.md (negsf2, negdf2): Permit these expands when compiling for VFP. + 2005-05-11 Richard Guenther PR middle-end/19807 diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index ee7a1d8ff32..5c7da904a88 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 030b2feebed..d2ee0cadcc9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2005-05-11 Richard Earnshaw + + * gcc.dg/arm-vfp1.c: Revert last change. + 2005-05-11 Richard Guenther PR middle-end/19807 diff --git a/gcc/testsuite/gcc.dg/arm-vfp1.c b/gcc/testsuite/gcc.dg/arm-vfp1.c index 4cc90e043c0..5898e8027e6 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" } } */