Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/acle/gcs-1.c

raw
1 /* Test the __gsc* ACLE intrinsics. */
2 /* { dg-do compile } */
3 /* { dg-options "-O1 -march=armv8.9-a -mbranch-protection=none" } */
4 /* { dg-final { check-function-bodies "**" "" } } */
5
6 #include <arm_acle.h>
7
8 /*
9 **test_gcspr:
10 ** mrs x0, s3_3_c2_c5_1 // gcspr_el0
11 ** ret
12 */
13 void *
14 test_gcspr ()
15 {
16 return __gcspr ();
17 }
18
19 /*
20 **test_gcspopm:
21 ** mov x0, 0
22 ** sysl x0, #3, c7, c7, #1 // gcspopm
23 ** ret
24 */
25 uint64_t
26 test_gcspopm ()
27 {
28 return __gcspopm ();
29 }
30
31 /*
32 **test_gcsss:
33 ** sys #3, c7, c7, #2, x0 // gcsss1
34 ** mov x0, 0
35 ** sysl x0, #3, c7, c7, #3 // gcsss2
36 ** ret
37 */
38 void *
39 test_gcsss (void *stack)
40 {
41 return __gcsss (stack);
42 }