[RISCV] Change func to funct in RISCVInstrInfoXqci.td. NFC (#119669)
[llvm-project.git] / llvm / test / ExecutionEngine / JITLink / AArch64 / MachO_ptrauth-globals.s
blobebe9d470038e495f681871c4a73a66153831fc8b
1 # RUN: llvm-mc -triple=arm64e-apple-macosx -filetype=obj -o %t.o %s
2 # RUN: llvm-jitlink %t.o
4 # REQUIRES: system-darwin && host=arm64{{.*}}
6 # Check that arm64e ptrauth relocations are handled correctly.
8 # This test contains eight global pointers with different signing schemes
9 # (IA vs DA key, with and without address diversity, and with 0 or 0xa5a5 as
10 # the additional diversity value). If all pointers pass authentication at
11 # runtime then the test returns zero.
13 # This test requires execution since the signed pointers are written by a
14 # signing function attached to the graph.
16 # TODO: Write an out-of-process version. This will probably need to be added to
17 # the ORC runtime.
19 .section __TEXT,__text,regular,pure_instructions
20 .build_version macos, 13, 0 sdk_version 13, 3
21 .globl _main
22 .p2align 2
23 _main:
24 adrp x8, _p1@PAGE
25 ldr x16, [x8, _p1@PAGEOFF]
26 autiza x16
28 adrp x9, _p2@PAGE
29 add x9, x9, _p2@PAGEOFF
30 ldr x16, [x9]
31 autia x16, x9
33 adrp x10, _p3@PAGE
34 ldr x16, [x10, _p3@PAGEOFF]
35 mov x17, #23130
36 autia x16, x17
38 adrp x9, _p4@PAGE
39 add x9, x9, _p4@PAGEOFF
40 ldr x16, [x9]
41 mov x17, x9
42 movk x17, #23130, lsl #48
43 autia x16, x17
45 adrp x10, _p5@PAGE
46 ldr x10, [x10, _p5@PAGEOFF]
47 ldraa x10, [x10]
49 adrp x9, _p6@PAGE
50 add x9, x9, _p6@PAGEOFF
51 ldr x16, [x9]
52 autda x16, x9
54 adrp x10, _p7@PAGE
55 ldr x16, [x10, _p7@PAGEOFF]
56 mov x17, #23130
57 autda x16, x17
59 adrp x9, _p8@PAGE
60 add x9, x9, _p8@PAGEOFF
61 ldr x16, [x9]
62 mov x17, x9
63 movk x17, #23130, lsl #48
64 autda x16, x17
66 mov w0, #0
67 ret
69 .private_extern _a
70 .section __DATA,__data
71 .globl _a
72 .p2align 3
73 _a:
74 .quad 1
76 .private_extern _b
77 .globl _b
78 .p2align 3
79 _b:
80 .quad 2
82 .private_extern _c
83 .globl _c
84 .p2align 3
85 _c:
86 .quad 3
88 .private_extern _d
89 .globl _d
90 .p2align 3
91 _d:
92 .quad 4
94 .private_extern _e
95 .globl _e
96 .p2align 3
97 _e:
98 .quad 5
100 .private_extern _f
101 .globl _f
102 .p2align 3
104 .quad 6
106 .private_extern _g
107 .globl _g
108 .p2align 3
110 .quad 7
112 .private_extern _h
113 .globl _h
114 .p2align 3
116 .quad 8
118 .globl _p1
119 .p2align 3
120 _p1:
121 .quad _a@AUTH(ia,0)
123 .globl _p2
124 .p2align 3
125 _p2:
126 .quad _b@AUTH(ia,0,addr)
128 .globl _p3
129 .p2align 3
130 _p3:
131 .quad _c@AUTH(ia,23130)
133 .globl _p4
134 .p2align 3
135 _p4:
136 .quad _d@AUTH(ia,23130,addr)
138 .globl _p5
139 .p2align 3
140 _p5:
141 .quad _e@AUTH(da,0)
143 .globl _p6
144 .p2align 3
145 _p6:
146 .quad _f@AUTH(da,0,addr)
148 .globl _p7
149 .p2align 3
150 _p7:
151 .quad _g@AUTH(da,23130)
153 .globl _p8y
154 .p2align 3
155 _p8:
156 .quad _h@AUTH(da,23130,addr)
158 .subsections_via_symbols