diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index 71c04841df2..d465b046d6d 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -1937,6 +1937,9 @@ test system can execute decimal floating point tests. @item hard_dfp Target generates decimal floating point instructions with current options. + +@item dfp_bid +Target uses the BID format for decimal floating point. @end table @subsubsection ARM-specific attributes diff --git a/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-1.c b/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-1.c index eee5471cae0..f8da7022213 100644 --- a/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-1.c +++ b/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-1.c @@ -1,5 +1,6 @@ /* Test non-canonical BID significands: _Decimal128. Bug 91226. */ -/* { dg-do run { target { { i?86-*-* x86_64-*-* } && lp64 } } } */ +/* { dg-do run { target lp64 } } */ +/* { dg-require-effective-target dfp_bid } */ /* { dg-options "-std=gnu2x -O2" } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-2.c b/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-2.c index 626712153b4..dade48fcf66 100644 --- a/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-2.c +++ b/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-2.c @@ -1,6 +1,7 @@ /* Test non-canonical BID significands: _Decimal128, case where combination field starts 11. Bug 91226. */ -/* { dg-do run { target { { i?86-*-* x86_64-*-* } && lp64 } } } */ +/* { dg-do run { target lp64 } } */ +/* { dg-require-effective-target dfp_bid } */ /* { dg-options "-std=gnu2x -O2" } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-3.c b/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-3.c index 9190daedaf6..77c0941c027 100644 --- a/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-3.c +++ b/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-3.c @@ -1,5 +1,6 @@ /* Test non-canonical BID significands: _Decimal128. Bug 91226. */ -/* { dg-do run { target { { i?86-*-* x86_64-*-* } && lp64 } } } */ +/* { dg-do run { target lp64 } } */ +/* { dg-require-effective-target dfp_bid } */ /* { dg-options "-std=gnu2x -O0" } */ #include "bid-non-canonical-d128-1.c" diff --git a/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-4.c b/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-4.c index b148ce445e7..93ff0fc6d57 100644 --- a/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-4.c +++ b/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-4.c @@ -1,6 +1,7 @@ /* Test non-canonical BID significands: _Decimal128, case where combination field starts 11. Bug 91226. */ -/* { dg-do run { target { { i?86-*-* x86_64-*-* } && lp64 } } } */ +/* { dg-do run { target lp64 } } */ +/* { dg-require-effective-target dfp_bid } */ /* { dg-options "-std=gnu2x -O0" } */ #include "bid-non-canonical-d128-2.c" diff --git a/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d32-1.c b/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d32-1.c index b46b71cc3fc..69d014f68c0 100644 --- a/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d32-1.c +++ b/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d32-1.c @@ -1,5 +1,6 @@ /* Test non-canonical BID significands: _Decimal32. Bug 91226. */ -/* { dg-do run { target i?86-*-* x86_64-*-* } } */ +/* { dg-do run } */ +/* { dg-require-effective-target dfp_bid } */ /* { dg-options "-std=gnu2x -O2" } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d32-2.c b/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d32-2.c index 11d64dce193..874b2fb3633 100644 --- a/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d32-2.c +++ b/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d32-2.c @@ -1,5 +1,6 @@ /* Test non-canonical BID significands: _Decimal32. Bug 91226. */ -/* { dg-do run { target i?86-*-* x86_64-*-* } } */ +/* { dg-do run } */ +/* { dg-require-effective-target dfp_bid } */ /* { dg-options "-std=gnu2x -O0" } */ #include "bid-non-canonical-d32-1.c" diff --git a/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d64-1.c b/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d64-1.c index 87b106945d4..4602d34d7cb 100644 --- a/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d64-1.c +++ b/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d64-1.c @@ -1,5 +1,6 @@ /* Test non-canonical BID significands: _Decimal64. Bug 91226. */ -/* { dg-do run { target i?86-*-* x86_64-*-* } } */ +/* { dg-do run } */ +/* { dg-require-effective-target dfp_bid } */ /* { dg-options "-std=gnu2x -O2" } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d64-2.c b/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d64-2.c index 3c10145a314..c2993b6476f 100644 --- a/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d64-2.c +++ b/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d64-2.c @@ -1,5 +1,6 @@ /* Test non-canonical BID significands: _Decimal64. Bug 91226. */ -/* { dg-do run { target i?86-*-* x86_64-*-* } } */ +/* { dg-do run } */ +/* { dg-require-effective-target dfp_bid } */ /* { dg-options "-std=gnu2x -O0" } */ #include "bid-non-canonical-d64-1.c" diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 244fe2306f4..d1f4eb7641f 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -3427,6 +3427,17 @@ proc check_effective_target_dfprt { } { }] } +# Return 1 if the target uses the BID format for Decimal Floating +# Point, 0 otherwise. + +proc check_effective_target_dfp_bid { } { + if { [istarget aarch64*-*-*] + || [istarget i?86-*-*] || [istarget x86_64-*-*]} { + return 1 + } + return 0 +} + # Return 1 iff target has unsigned plain 'char' by default. proc check_effective_target_unsigned_char {} {