public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Christophe Lyon <christophe.lyon@arm.com>
To: <gcc-patches@gcc.gnu.org>
Subject: [PATCH 07/10] testsuite: enable more BID DFP tests for AArch64
Date: Mon, 9 May 2022 16:35:04 +0200	[thread overview]
Message-ID: <20220509143507.239804-8-christophe.lyon@arm.com> (raw)
In-Reply-To: <20220509143507.239804-1-christophe.lyon@arm.com>

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                            |  3 +++
 gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-1.c |  3 ++-
 gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-2.c |  3 ++-
 gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-3.c |  3 ++-
 gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d128-4.c |  3 ++-
 gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d32-1.c  |  3 ++-
 gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d32-2.c  |  3 ++-
 gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d64-1.c  |  3 ++-
 gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d64-2.c  |  3 ++-
 gcc/testsuite/lib/target-supports.exp               | 11 +++++++++++
 10 files changed, 30 insertions(+), 8 deletions(-)

diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 613ac29967b..8189d9ec8ec 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 2d5d0539bb4..c13932e9532 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -3397,6 +3397,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 {} {
-- 
2.25.1


  parent reply	other threads:[~2022-05-09 14:35 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09 14:34 [PATCH 00/10] Enable Decimal Floating Point (DFP) on AArch64 Christophe Lyon
2022-05-09 14:34 ` [PATCH 01/10] aarch64: Enable DFP (Decimal Floating-point) (BID format) Christophe Lyon
2022-05-09 14:34 ` [PATCH 02/10] aarch64: Add backend support for DFP Christophe Lyon
2022-05-10  9:23   ` Richard Sandiford
2022-05-10  9:30     ` Richard Sandiford
2022-05-10 10:18       ` Christophe Lyon
2022-05-13 16:08   ` [PATCH v2 " Christophe Lyon
2022-05-13 16:35     ` Richard Sandiford
2022-05-16 12:17       ` Christophe Lyon
2022-05-09 14:35 ` [PATCH 03/10] libgcc: Enable XF mode conversions to/from DFP modes only if supported Christophe Lyon
2022-05-09 14:35 ` [PATCH 04/10] libgcc: enable DFP for AArch64 Christophe Lyon
2022-05-09 14:35 ` [PATCH 05/10] testsuite:: Fix pr39986.c testcase " Christophe Lyon
2022-05-09 14:35 ` [PATCH 06/10] testsuite: Add new tests for DFP under aarch64/aapcs64 Christophe Lyon
2022-05-09 14:35 ` Christophe Lyon [this message]
2022-05-09 14:35 ` [PATCH 08/10] testsuite: Add C++ unwinding tests with Decimal Floating-Point Christophe Lyon
2022-05-10  9:27   ` Richard Sandiford
2022-05-13 16:35   ` [PATCH v2 " Christophe Lyon
2022-05-13 17:52   ` Christophe Lyon
2022-05-16 10:33     ` Richard Sandiford
2022-05-09 14:35 ` [PATCH 09/10] libgcc: Add support for HF mode (aka __fp16) in libbid Christophe Lyon
2022-05-09 21:27   ` Joseph Myers
2022-05-10  8:08     ` Christophe Lyon
2022-05-10 20:26       ` Joseph Myers
2022-05-13 16:34   ` [PATCH v2 " Christophe Lyon
2022-05-13 17:52   ` Christophe Lyon
2022-05-13 18:23     ` Joseph Myers
2022-05-13 18:30       ` Christophe Lyon
2022-05-16 13:47       ` [PATCH v3 09/10] libgcc: Add support for HF mode (aka _Float16) " Christophe Lyon
2022-05-19 13:03         ` Christophe Lyon
2022-05-19 19:35           ` Joseph Myers
2022-05-20  7:47             ` Christophe Lyon
2022-05-09 14:35 ` [PATCH 10/10] libgcc: use __builtin_clz and __builtin_ctz " Christophe Lyon
2022-05-10  9:37 ` [PATCH 00/10] Enable Decimal Floating Point (DFP) on AArch64 Richard Sandiford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220509143507.239804-8-christophe.lyon@arm.com \
    --to=christophe.lyon@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).