]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: enable more BID DFP tests for AArch64
authorChristophe Lyon <christophe.lyon@arm.com>
Fri, 22 Apr 2022 16:14:56 +0000 (17:14 +0100)
committerChristophe Lyon <christophe.lyon@arm.com>
Fri, 20 May 2022 07:35:08 +0000 (09:35 +0200)
Some tests for the BID format are currently restricted to i?86 and
x86_64, but they also pass on AArch64, so this patch enables them.

Since all these tests are related to the BID format, it seems useful
to introduce a new effective-target (dfp_bid) instead of adding
aarch64 to the current target list.

2022-04-28  Christophe Lyon  <christophe.lyon@arm.com>

gcc/
* doc/sourcebuild.texi (Decimal floating point attributes): Document
dfp_bid effective-target.

gcc/testsuite/
* lib/target-supports.exp (check_effective_target_dfp_bid): New.
* gcc.dg/dfp/bid-non-canonical-d128-1.c: Use dfp_bid
effective-target.
* gcc.dg/dfp/bid-non-canonical-d128-2.c: Likewise.
* gcc.dg/dfp/bid-non-canonical-d128-3.c: Likewise.
* gcc.dg/dfp/bid-non-canonical-d128-4.c: Likewise.
* gcc.dg/dfp/bid-non-canonical-d32-1.c: Likewise.
* gcc.dg/dfp/bid-non-canonical-d32-2.c: Likewise.
* gcc.dg/dfp/bid-non-canonical-d64-1.c: Likewise.
* gcc.dg/dfp/bid-non-canonical-d64-2.c: Likewise.

gcc/doc/sourcebuild.texi
gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-1.c
gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-2.c
gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-3.c
gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-4.c
gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d32-1.c
gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d32-2.c
gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d64-1.c
gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d64-2.c
gcc/testsuite/lib/target-supports.exp

index 71c04841df2b176d0fa85d6301c5bb3ae5c0bb4e..d465b046d6de17158eb616bd2dd1b171d9142059 100644 (file)
@@ -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
index eee5471cae0d46a7d43bf9550ca2f940e0324b9e..f8da7022213091fadb250548a729190bae10c550 100644 (file)
@@ -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);
index 626712153b4b1301615ecf7cfaf553379eb7f9ba..dade48fcf66add36a8a77e8948448e366d1ad46e 100644 (file)
@@ -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);
index 9190daedaf6fbeb1635505f94b949718dfb919fc..77c0941c0270f56fa89d032e201941651e3ddcaa 100644 (file)
@@ -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"
index b148ce445e742fa169c57cfab1b50af654c16608..93ff0fc6d57d863bd70db7e9e9febc353b89b2aa 100644 (file)
@@ -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"
index b46b71cc3fcc0a6af94bb4945e971e1baa6b0cb7..69d014f68c07734201da6991247de7d9aa4bd8fa 100644 (file)
@@ -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);
index 11d64dce19339aa7c13726012739cf5712f98956..874b2fb36334bdacac8a675461930a505fafa7ea 100644 (file)
@@ -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"
index 87b106945d42c1d6fd137dea856c60c111114172..4602d34d7cb5f9cfe72a8c6e70b6714be49411db 100644 (file)
@@ -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);
index 3c10145a314a9df0ad2d186eb06e857f0f3305a8..c2993b6476fdffd6aa9690847863620fbf13f82c 100644 (file)
@@ -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"
index 244fe2306f457f46f860a1e919dbbddeea8d6757..d1f4eb7641fa7cde71135537b7ec752c02ad2691 100644 (file)
@@ -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 {} {