diff options
author | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-04 23:12:16 +0000 |
---|---|---|
committer | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-04 23:12:16 +0000 |
commit | 9463bbd33ea555b5276d010e6a3788e41786ce61 (patch) | |
tree | 1f29387249718cd32722242f7c6193731a127f13 /gcc/testsuite/gcc.target/i386/387-12.c | |
parent | dc343ad40ff20df43c5b0a9c4413f0c1889f2407 (diff) | |
download | gcc-9463bbd33ea555b5276d010e6a3788e41786ce61.tar.gz |
PR target/26915
* config/i386/i386.c (standard_80387_constant_p): Treat -0.0 and -1.0
as a valid 80387 constant.
(standard_80387_constant_opcode): Return "#" for -0.0 and -1.0.
* config/i386/i386.md (unnamed splitter): Split the load of
constant -0.0 or -1.0 into the load of 0.0 or 1.0, followed
by negation.
testsuite/ChangeLog:
PR target/26915
* gcc.target/i386/387-12.c: New test.
~
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118484 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/387-12.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/387-12.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/387-12.c b/gcc/testsuite/gcc.target/i386/387-12.c new file mode 100644 index 00000000000..c653974a2d3 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/387-12.c @@ -0,0 +1,17 @@ +/* PR target/26915 */ +/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ +/* { dg-require-effective-target ilp32 } */ +/* { dg-options "-O" } */ + +double testm0(void) +{ + return -0.0; +} + +double testm1(void) +{ + return -1.0; +} + +/* { dg-final { scan-assembler "fldz" } } */ +/* { dg-final { scan-assembler "fld1" } } */ |