diff options
author | Michael Meissner <meissner@linux.vnet.ibm.com> | 2012-04-12 17:10:27 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 2012-04-12 17:10:27 +0000 |
commit | c3f8384f9474f4f354226523e33a47bc6a1e6c57 (patch) | |
tree | 8d6d7cd42ac0a12aa489087bddd411ffea98c1c9 /gcc | |
parent | a6f8851e3efa0157bf28631e2d296430b4dbc472 (diff) | |
download | gcc-c3f8384f9474f4f354226523e33a47bc6a1e6c57.zip gcc-c3f8384f9474f4f354226523e33a47bc6a1e6c57.tar.gz gcc-c3f8384f9474f4f354226523e33a47bc6a1e6c57.tar.bz2 |
re PR target/52775 (Change default for using FCFID instruction)
[gcc]
2012-04-11 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/52775
* config/rs6000/rs6000.h (TARGET_FCFID): Add TARGET_PPC_GPOPT to
the list of options to enable the FCFID instruction.
(TARGET_EXTRA_BUILTINS): Adjust comment.
[gcc/testsuite]
2012-04-11 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/52775
* gcc.target/powerpc/pr52775.c: New file.
From-SVN: r186387
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.h | 11 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/powerpc/pr52775.c | 16 |
4 files changed, 34 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index be5fc05..fb291e7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2012-04-12 Michael Meissner <meissner@linux.vnet.ibm.com> + + PR target/52775 + * config/rs6000/rs6000.h (TARGET_FCFID): Add TARGET_PPC_GPOPT to + the list of options to enable the FCFID instruction. + (TARGET_EXTRA_BUILTINS): Adjust comment. + 2012-04-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR tree-optimization/18589 diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 6bd2b8d..63cbdc8 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -467,10 +467,11 @@ extern int rs6000_vector_align[]; /* ISA 2.01 allowed FCFID to be done in 32-bit, previously it was 64-bit only. Enable 32-bit fcfid's on any of the switches for newer ISA machines or XILINX. */ -#define TARGET_FCFID (TARGET_POWERPC64 \ - || TARGET_POPCNTB /* ISA 2.02 */ \ - || TARGET_CMPB /* ISA 2.05 */ \ - || TARGET_POPCNTD /* ISA 2.06 */ \ +#define TARGET_FCFID (TARGET_POWERPC64 \ + || TARGET_PPC_GPOPT /* 970/power4 */ \ + || TARGET_POPCNTB /* ISA 2.02 */ \ + || TARGET_CMPB /* ISA 2.05 */ \ + || TARGET_POPCNTD /* ISA 2.06 */ \ || TARGET_XILINX_FPU) #define TARGET_FCTIDZ TARGET_FCFID @@ -492,7 +493,7 @@ extern int rs6000_vector_align[]; #define TARGET_EXTRA_BUILTINS (!TARGET_SPE && !TARGET_PAIRED_FLOAT \ && ((TARGET_POWERPC64 \ - || TARGET_PPC_GPOPT /* 970 */ \ + || TARGET_PPC_GPOPT /* 970/power4 */ \ || TARGET_POPCNTB /* ISA 2.02 */ \ || TARGET_CMPB /* ISA 2.05 */ \ || TARGET_POPCNTD /* ISA 2.06 */ \ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ae2922d..7a5f47f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-04-12 Michael Meissner <meissner@linux.vnet.ibm.com> + + PR target/52775 + * gcc.target/powerpc/pr52775.c: New file. + 2012-04-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR tree-optimization/18589 diff --git a/gcc/testsuite/gcc.target/powerpc/pr52775.c b/gcc/testsuite/gcc.target/powerpc/pr52775.c new file mode 100644 index 0000000..4027819 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr52775.c @@ -0,0 +1,16 @@ +/* { dg-do compile { target { powerpc*-*-* && ilp32 } } } */ +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ +/* { dg-options "-O1 -mcpu=power4" } */ +/* { dg-final { scan-assembler-times "fcfid" 2 } } */ + +double +int_to_double (int *p) +{ + return (double)*p; +} + +double +long_long_to_double (long long *p) +{ + return (double)*p; +} |