aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@adacore.com>2024-05-23 03:20:19 -0300
committerAlexandre Oliva <oliva@gnu.org>2024-05-23 03:20:19 -0300
commitdbdddc92a3b955fce71af47755c226132559eda2 (patch)
treef9d7e43c559eb17de60e87ce73f79690dcd58a68
parent35a293a6454ac0cd88735036f536d8f4ec65951a (diff)
downloadgcc-dbdddc92a3b955fce71af47755c226132559eda2.zip
gcc-dbdddc92a3b955fce71af47755c226132559eda2.tar.gz
gcc-dbdddc92a3b955fce71af47755c226132559eda2.tar.bz2
[testsuite] xfail pr79004 on longdouble64; drop long_double_64bit
Some of the asm opcodes expected by pr79004 depend on -mlong-double-128 to be output. E.g., without this flag, the conditions of patterns @extenddf<mode>2 and extendsf<mode>2 do not hold, and so GCC resorts to libcalls instead of even trying rs6000_expand_float128_convert. Perhaps the conditions are too strict, and they could enable the use of conversion insns involving __ieee128/_Float128 even with 64-bit long doubles. For now, xfail the opcodes that are not available on longdouble64. While at that, drop long_double_64bit, since it's broken and sort of redundant. for gcc/testsuite/ChangeLog PR target/105359 * gcc.target/powerpc/pr79004.c: Xfail opcodes not available on longdouble64. * lib/target-supports.exp (check_effective_target_long_double_64bit): Drop. (add_options_for_long_double_64bit): Likewise.
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr79004.c14
-rw-r--r--gcc/testsuite/lib/target-supports.exp43
2 files changed, 8 insertions, 49 deletions
diff --git a/gcc/testsuite/gcc.target/powerpc/pr79004.c b/gcc/testsuite/gcc.target/powerpc/pr79004.c
index caf1f6c..2cb8bf4 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr79004.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr79004.c
@@ -100,10 +100,12 @@ void to_uns_short_store_n (TYPE a, unsigned short *p, long n) { p[n] = (unsigned
void to_uns_int_store_n (TYPE a, unsigned int *p, long n) { p[n] = (unsigned int)a; }
void to_uns_long_store_n (TYPE a, unsigned long *p, long n) { p[n] = (unsigned long)a; }
-/* { dg-final { scan-assembler-not {\mbl __} } } */
-/* { dg-final { scan-assembler {\mxscvdpqp\M} } } */
-/* { dg-final { scan-assembler {\mxscvqpdp\M} } } */
-/* { dg-final { scan-assembler {\mxscvqpdpo\M} } } */
+/* On targets with 64-bit long double, some opcodes to deal with __float128 are
+ disabled, see PR target/105359. */
+/* { dg-final { scan-assembler-not {\mbl __} { xfail longdouble64 } } } */
+/* { dg-final { scan-assembler {\mxscvdpqp\M} { xfail longdouble64 } } } */
+/* { dg-final { scan-assembler {\mxscvqpdp\M} { xfail longdouble64 } } } */
+/* { dg-final { scan-assembler {\mxscvqpdpo\M} { xfail longdouble64 } } } */
/* { dg-final { scan-assembler {\mxscvqpsdz\M} } } */
/* { dg-final { scan-assembler {\mxscvqpswz\M} } } */
/* { dg-final { scan-assembler {\mxscvsdqp\M} } } */
@@ -111,7 +113,7 @@ void to_uns_long_store_n (TYPE a, unsigned long *p, long n) { p[n] = (unsigned l
/* { dg-final { scan-assembler {\mlxsd\M} } } */
/* { dg-final { scan-assembler {\mlxsiwax\M} } } */
/* { dg-final { scan-assembler {\mlxsiwzx\M} } } */
-/* { dg-final { scan-assembler {\mlxssp\M} } } */
+/* { dg-final { scan-assembler {\mlxssp\M} { xfail longdouble64 } } } */
/* { dg-final { scan-assembler {\mstxsd\M} } } */
/* { dg-final { scan-assembler {\mstxsiwx\M} } } */
-/* { dg-final { scan-assembler {\mstxssp\M} } } */
+/* { dg-final { scan-assembler {\mstxssp\M} { xfail longdouble64 } } } */
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 3f0f853..f0f6da5 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -2924,49 +2924,6 @@ proc add_options_for_long_double_ieee128 { flags } {
return "$flags"
}
-# Check if GCC and GLIBC supports explicitly specifying that the long double
-# format uses the IEEE 64-bit. Under little endian PowerPC Linux, you need
-# GLIBC 2.32 or later to be able to use a different long double format for
-# running a program than the system default.
-
-proc check_effective_target_long_double_64bit { } {
- return [check_runtime_nocache long_double_64bit {
- #include <string.h>
- #include <stdio.h>
- /* use volatile to prevent optimization. */
- volatile double a = 3.0;
- volatile long double one = 1.0L;
- volatile long double two = 2.0L;
- volatile long double b;
- char buffer[20];
- int main()
- {
- double a2;
- long double b2;
- if (sizeof (long double) != 8)
- return 1;
- b = one + two;
- /* eliminate removing volatile cast warning. */
- a2 = a;
- b2 = b;
- if (memcmp (&a2, &b2, 16) != 0)
- return 1;
- sprintf (buffer, "%lg", b);
- return strcmp (buffer, "3") != 0;
- }
- } [add_options_for_ppc_long_double_override_64bit ""]]
-}
-
-# Return the appropriate options to specify that long double uses the IEEE
-# 64-bit format on PowerPC.
-
-proc add_options_for_long_double_64bit { flags } {
- if { [istarget powerpc*-*-*] } {
- return "$flags -mlong-double-64"
- }
- return "$flags"
-}
-
# Return 1 if the target supports executing VSX instructions, 0
# otherwise. Cache the result.