Skip to content

Commit 09a08df

Browse files
author
Victor Do Nascimento
committed
aarch64: Add rsr128 and wsr128 ACLE tests
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.
1 parent 88157c8 commit 09a08df

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

  • gcc/testsuite/gcc.target/aarch64/acle

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

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,38 @@
66

77
#include <arm_acle.h>
88

9+
#pragma GCC push_options
10+
#pragma GCC target ("arch=armv9.4-a+d128")
11+
12+
#ifndef __ARM_FEATURE_SYSREG128
13+
#error "__ARM_FEATURE_SYSREG128 feature macro not defined."
14+
#endif
15+
16+
/*
17+
** get_rsr128:
18+
** mrrs x0, x1, s3_0_c7_c4_0
19+
** ...
20+
*/
21+
__uint128_t
22+
get_rsr128 ()
23+
{
24+
__arm_rsr128 ("par_el1");
25+
}
26+
27+
/*
28+
** set_wsr128:
29+
** ...
30+
** msrr s3_0_c7_c4_0, x0, x1
31+
** ...
32+
*/
33+
void
34+
set_wsr128 (__uint128_t c)
35+
{
36+
__arm_wsr128 ("par_el1", c);
37+
}
38+
39+
#pragma GCC pop_options
40+
941
/*
1042
** get_rsr:
1143
** ...

0 commit comments

Comments
 (0)