From: Richard Sandiford <richard.sandiford@arm.com>
To: Victor Do Nascimento <victor.donascimento@arm.com>
Cc: <gcc-patches@gcc.gnu.org>, <kyrylo.tkachov@arm.com>,
<Richard.Earnshaw@arm.com>
Subject: Re: [PATCH 5/5] aarch64: Add rsr128 and wsr128 ACLE tests
Date: Tue, 07 Nov 2023 22:51:37 +0000 [thread overview]
Message-ID: <mpto7g59nye.fsf@arm.com> (raw)
In-Reply-To: <20231107103211.2837188-6-victor.donascimento@arm.com> (Victor Do Nascimento's message of "Tue, 7 Nov 2023 10:30:14 +0000")
Victor Do Nascimento <victor.donascimento@arm.com> writes:
> Extend existing unit tests for the ACLE system register manipulation
> functions to include 128-bit tests.
>
> gcc/testsuite/ChangeLog:
>
> * gcc/testsuite/gcc.target/aarch64/acle/rwsr.c (get_rsr128): New.
> (set_wsr128): Likewise.
> ---
> gcc/testsuite/gcc.target/aarch64/acle/rwsr.c | 30 +++++++++++++++++++-
> 1 file changed, 29 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/gcc.target/aarch64/acle/rwsr.c b/gcc/testsuite/gcc.target/aarch64/acle/rwsr.c
> index 3af4b960306..e7725022316 100644
> --- a/gcc/testsuite/gcc.target/aarch64/acle/rwsr.c
> +++ b/gcc/testsuite/gcc.target/aarch64/acle/rwsr.c
> @@ -1,11 +1,15 @@
> /* Test the __arm_[r,w]sr ACLE intrinsics family. */
> /* Check that function variants for different data types handle types correctly. */
> /* { dg-do compile } */
> -/* { dg-options "-O1 -march=armv8.4-a" } */
> +/* { dg-options "-O1 -march=armv9.4-a+d128" } */
> /* { dg-final { check-function-bodies "**" "" } } */
I'm nervous about having our only tests for 64-bit reads and writes
using such a high minimum version. Could the file instead be compiled
without any minimum architecture and have tests that work with plain
-march=armv8-a? Then the test could switch to other architectures
where necessary using #pragam GCC target. This test...
> #include <arm_acle.h>
>
> +#ifndef __ARM_FEATURE_SYSREG128
> +#error "__ARM_FEATURE_SYSREG128 feature macro not defined."
> +#endif
> +
...would still work. with a #pragma GCC target.
Thanks,
Richard
> /*
> ** get_rsr:
> ** ...
> @@ -66,6 +70,17 @@ get_rsrf64 ()
> return __arm_rsrf64("trcseqstr");
> }
>
> +/*
> +** get_rsr128:
> +** mrrs x0, x1, s3_0_c7_c4_0
> +** ...
> +*/
> +__uint128_t
> +get_rsr128 ()
> +{
> + __arm_rsr128("par_el1");
> +}
> +
> /*
> ** set_wsr32:
> ** ...
> @@ -129,6 +144,18 @@ set_wsrf64(double a)
> __arm_wsrf64("trcseqstr", a);
> }
>
> +/*
> +** set_wsr128:
> +** ...
> +** msrr s3_0_c7_c4_0, x0, x1
> +** ...
> +*/
> +void
> +set_wsr128 (__uint128_t c)
> +{
> + __arm_wsr128 ("par_el1", c);
> +}
> +
> /*
> ** set_custom:
> ** ...
> @@ -142,3 +169,4 @@ void set_custom()
> __uint64_t b = __arm_rsr64("S1_2_C3_C4_5");
> __arm_wsr64("S1_2_C3_C4_5", b);
> }
> +
next prev parent reply other threads:[~2023-11-07 22:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-07 10:30 [PATCH 0/5] aarch64: Add Armv9.4-a 128-bit system-register read/write support Victor Do Nascimento
2023-11-07 10:30 ` [PATCH 1/5] aarch64: Add march flags for +the and +d128 arch extensions Victor Do Nascimento
2023-11-07 23:18 ` Richard Sandiford
2023-11-07 10:30 ` [PATCH 2/5] aarch64: Add support for GCS system registers with the +gcs modifier Victor Do Nascimento
2023-11-07 23:19 ` Richard Sandiford
2023-11-07 10:30 ` [PATCH 3/5] aarch64: Sync `aarch64-sys-regs.def' with Binutils Victor Do Nascimento
2023-11-07 23:17 ` Richard Sandiford
2023-11-07 10:30 ` [PATCH 4/5] aarch64: Implement 128-bit extension to ACLE sysreg r/w builtins Victor Do Nascimento
2023-11-07 23:14 ` Richard Sandiford
2023-11-07 10:30 ` [PATCH 5/5] aarch64: Add rsr128 and wsr128 ACLE tests Victor Do Nascimento
2023-11-07 22:51 ` Richard Sandiford [this message]
2023-11-08 9:49 ` Christophe Lyon
2023-11-08 10:03 ` 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=mpto7g59nye.fsf@arm.com \
--to=richard.sandiford@arm.com \
--cc=Richard.Earnshaw@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=kyrylo.tkachov@arm.com \
--cc=victor.donascimento@arm.com \
/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).