diff options
author | Segher Boessenkool <segher@kernel.crashing.org> | 2017-03-10 18:57:58 +0100 |
---|---|---|
committer | Segher Boessenkool <segher@gcc.gnu.org> | 2017-03-10 18:57:58 +0100 |
commit | 7502c5970d0af6cc71c2a906d55d95a31322bc07 (patch) | |
tree | 16e2a026b5e756c50a081d806968d0a5851baaf4 /gcc | |
parent | 0c942f3edab10854aecdf92e8bd79ca6bc33bc66 (diff) | |
download | gcc-7502c5970d0af6cc71c2a906d55d95a31322bc07.zip gcc-7502c5970d0af6cc71c2a906d55d95a31322bc07.tar.gz gcc-7502c5970d0af6cc71c2a906d55d95a31322bc07.tar.bz2 |
rs6000: float128 on BE and 32-bit
This fixes float128 on BE and on 32-bit.
The configure tests need to use -mabi=altivec for 32-bit, since it is
not the default there. That also enables the "vector" keyword, used by
the tests. To do this it temporarily adds a few flags to the CFLAGS
variable.
It also fixes a syntax error in the libgcc_cv_powerpc_float128_hw test
(the function name was missing in the function declaration).
Regenerating config.in (via autoreconf) removed the duplicate definition
of HAVE_SOLARIS_CRTS.
Finally, this adds a "-mfloat128-hardware requires -m64" test to
rs6000.c: all the current patterns need 64-bit registers. Maybe we'll
want to add float128 hardware support to 32-bit some day, but certainly
not today.
* config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
-mfloat128-hardware without -m64.
libgcc/
* configure.ac (test for libgcc_cv_powerpc_float128): Temporarily
modify CFLAGS. Add -mabi=altivec -mvsx -mfloat128.
(test for libgcc_cv_powerpc_float128_hw): Add -mpower9-vector and
-mfloat128-hardware to the CFLAGS. Fix syntax error in the C snippet.
* configure: Regenerate.
* config.in: Regenerate.
From-SVN: r246043
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3cbc63d..518178a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ +2017-03-10 Segher Boessenkool <segher@kernel.crashing.org> + + * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow + -mfloat128-hardware without -m64. + 2017-03-10 Will Schmidt <will_schmidt@vnet.ibm.com> - + PR target/79941 * config/rs6000/rs6000.c (builtin_function_type): Add VMUL*U[HB] entries to the case statement that marks unsigned arguments to diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 4371b00..e3627c9 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -4686,6 +4686,14 @@ rs6000_option_override_internal (bool global_init_p) rs6000_isa_flags &= ~OPTION_MASK_FLOAT128_HW; } + if (TARGET_FLOAT128_HW && !TARGET_64BIT) + { + if ((rs6000_isa_flags_explicit & OPTION_MASK_FLOAT128_HW) != 0) + error ("-mfloat128-hardware requires -m64"); + + rs6000_isa_flags &= ~OPTION_MASK_FLOAT128_HW; + } + if (TARGET_FLOAT128_HW && !TARGET_FLOAT128_KEYWORD && (rs6000_isa_flags_explicit & OPTION_MASK_FLOAT128_HW) != 0 && (rs6000_isa_flags_explicit & OPTION_MASK_FLOAT128_KEYWORD) == 0) |