https://gcc.gnu.org/g:7b9d4c1b70a4690dcd91af5b756b1eccf06cc12d
commit 7b9d4c1b70a4690dcd91af5b756b1eccf06cc12d Author: Michael Meissner <meiss...@linux.ibm.com> Date: Tue Jul 16 17:19:27 2024 -0400 Do not add -mvsx or -mfloat128 when testing the float128 support. 2024-07-16 Michael Meissner <meiss...@linux.ibm.com> gcc/testsuite/ PR target/115800 PR target/113652 * lib/target-supports.exp (check_ppc_float128_sw_available): Do not add -mfloat128 or -mfloat128-hardware. (check_ppc_float128_hw_available): Likewise. (check_effective_target_ppc_ieee128_ok): Likewise. (add_options_for___float128): Likewise. (check_effective_target_powerpc_float128_sw_ok): Likewise. (check_effective_target_powerpc_float128_hw_ok): Likewise. Diff: --- gcc/testsuite/lib/target-supports.exp | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index bd8416a51886..beb8e2877e57 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2979,7 +2979,6 @@ proc check_ppc_float128_sw_available { } { || [istarget *-*-darwin*]} { expr 0 } else { - set options "-mfloat128" check_runtime_nocache ppc_float128_sw_available { volatile __float128 x = 1.0q; volatile __float128 y = 2.0q; @@ -2988,7 +2987,7 @@ proc check_ppc_float128_sw_available { } { __float128 z = x + y; return (z != 3.0q); } - } $options + } "" } }] } @@ -3005,7 +3004,6 @@ proc check_ppc_float128_hw_available { } { || [istarget *-*-darwin*]} { expr 0 } else { - set options "-mfloat128 -mfloat128-hardware -mcpu=power9" check_runtime_nocache ppc_float128_hw_available { volatile __float128 x = 1.0q; volatile __float128 y = 2.0q; @@ -3017,7 +3015,7 @@ proc check_ppc_float128_hw_available { } { __asm__ ("xsaddqp %0,%1,%2" : "+v" (w) : "v" (x), "v" (y)); return ((z != 3.0q) || (z != w)); } - } $options + } "" } }] } @@ -3030,14 +3028,13 @@ proc check_effective_target_ppc_ieee128_ok { } { || [istarget *-*-vxworks*]} { expr 0 } else { - set options "-mfloat128" check_runtime_nocache ppc_ieee128_ok { int main() { __ieee128 a; return 0; } - } $options + } "" } }] } @@ -3946,9 +3943,6 @@ proc check_effective_target___float128 { } { } proc add_options_for___float128 { flags } { - if { [istarget powerpc*-*-linux*] } { - return "$flags -mfloat128" - } return "$flags" } @@ -7217,8 +7211,9 @@ proc check_effective_target_power10_ok { } { } } -# Return 1 if this is a PowerPC target supporting -mfloat128 via either -# software emulation on power7/power8 systems or hardware support on power9. +# Return 1 if this is a PowerPC target supporting IEEE 128-bit floating point +# via either software emulation on power7/power8 systems or hardware support on +# power9. proc check_effective_target_powerpc_float128_sw_ok { } { if { [istarget powerpc*-*-*] @@ -7234,14 +7229,14 @@ proc check_effective_target_powerpc_float128_sw_ok { } { __float128 z = x + y; return (z == 3.0q); } - } "-mfloat128"] + } ""] } else { return 0 } } -# Return 1 if this is a PowerPC target supporting -mfloat128 via hardware -# support on power9. +# Return 1 if this is a PowerPC target supporting IEEE 128-bit floating point +# via hardware support on power9 and later systems. proc check_effective_target_powerpc_float128_hw_ok { } { if { [istarget powerpc*-*-*] @@ -7258,7 +7253,7 @@ proc check_effective_target_powerpc_float128_hw_ok { } { __asm__ ("xsaddqp %0,%1,%2" : "=v" (z) : "v" (x), "v" (y)); return (z == 3.0q); } - } "-mfloat128-hardware"] + } ""] } else { return 0 }