]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aarch64: Add rsr128 and wsr128 ACLE tests
authorVictor Do Nascimento <victor.donascimento@arm.com>
Sun, 29 Oct 2023 00:49:45 +0000 (01:49 +0100)
committerVictor Do Nascimento <victor.donascimento@arm.com>
Wed, 6 Dec 2023 21:22:11 +0000 (21:22 +0000)
Extend existing unit tests for the ACLE system register manipulation
functions to include 128-bit tests.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/acle/rwsr.c (get_rsr128): New.
(set_wsr128): Likewise.

gcc/testsuite/gcc.target/aarch64/acle/rwsr.c

index 93c48c4caf0a2a0bc4a0b96f57a183275bcaec31..6feb0bef2d6f8a93ec3d8198817f05b9e1e2f415 100644 (file)
@@ -6,6 +6,38 @@
 
 #include <arm_acle.h>
 
+#pragma GCC push_options
+#pragma GCC target ("arch=armv9.4-a+d128")
+
+#ifndef __ARM_FEATURE_SYSREG128
+#error "__ARM_FEATURE_SYSREG128 feature macro not defined."
+#endif
+
+/*
+** get_rsr128:
+**     mrrs    x0, x1, s3_0_c7_c4_0
+** ...
+*/
+__uint128_t
+get_rsr128 ()
+{
+  __arm_rsr128 ("par_el1");
+}
+
+/*
+** set_wsr128:
+** ...
+**     msrr    s3_0_c7_c4_0, x0, x1
+** ...
+*/
+void
+set_wsr128 (__uint128_t c)
+{
+  __arm_wsr128 ("par_el1", c);
+}
+
+#pragma GCC pop_options
+
 /*
 ** get_rsr:
 ** ...