]> gcc.gnu.org Git - gcc.git/commit
PowerPC: PR 97791: Fix gnu attributes.
authorMichael Meissner <meissner@linux.ibm.com>
Wed, 2 Dec 2020 18:58:13 +0000 (13:58 -0500)
committerMichael Meissner <meissner@linux.ibm.com>
Wed, 2 Dec 2020 18:58:13 +0000 (13:58 -0500)
commit1042c8bcd730144de16ea6c96aec191bf2113609
tree566e9e835e0d229b406771ae387cfb6bfd6ae02e
parentbc8d86f78fd98ae7e3994491324b7570b8c18599
PowerPC: PR 97791: Fix gnu attributes.

This patch does two things to fix setting gnu attribute #4 (long double status)

1) Only set gnu attribute #4 if long double was passed.  Passing __float128
when long double is IBM or __ibm128 when long double is IEEE no longer sets the
attribute.  This resulted in a lot of false positives, such as using __float128
and no long double support.

2) Do not set the gnu attribute if a mode used by long double (TF or DF) is
used in a move.  The moves do not differentiate between the long double type
and similar types.  Delete the three tests that tested this.

I wrote the code for the move several years.  I wanted to flag that an object
that used the appropriate long double type got flagged.  Unfortunately, at the
RTL level, we have lost the type nodes, so we can't tell the difference between
two types that use the same mode (for instance if long double is 64-bit, the
attribute would be set if you used normal doubles, and not long doubles).  Alan
Modra and I discussed this, and we think this is just the right thing to do.

gcc/
2020-11-30  Michael Meissner  <meissner@linux.ibm.com>

PR gcc/97791
* config/rs6000/rs6000-call.c (init_cumulative_args): Only set
that long double was returned if the type is actually long
double.
(rs6000_function_arg_advance_1): Only set that long double was
passed if the type is actually long double.
* config/rs6000/rs6000.c (rs6000_emit_move): Delete code that sets
whether long double was passed based on the modes used in moves.

gcc/testsuite/
2020-11-30  Michael Meissner  <meissner@linux.ibm.com>

PR target/97791
* gcc.target/powerpc/gnuattr1.c: Mark as XFAIL.
* gcc.target/powerpc/gnuattr2.c: Mark as XFAIL.
* gcc.target/powerpc/gnuattr3.c: Mark as XFAIL.
gcc/config/rs6000/rs6000-call.c
gcc/config/rs6000/rs6000.c
gcc/testsuite/gcc.target/powerpc/gnuattr1.c
gcc/testsuite/gcc.target/powerpc/gnuattr2.c
gcc/testsuite/gcc.target/powerpc/gnuattr3.c
This page took 0.06934 seconds and 6 git commands to generate.