2 # RUN: llvm-mc -triple powerpc64-unknown-unknown --show-encoding %s | FileCheck -check-prefix=CHECK-BE %s
3 # RUN: llvm-mc -triple powerpc64le-unknown-unknown --show-encoding %s | FileCheck -check-prefix=CHECK-LE %s
5 # RUN: llvm-mc -triple powerpc64-unknown-unknown -filetype=obj %s | \
6 # RUN: llvm-readobj -r | FileCheck %s -check-prefix=CHECK-BE-REL
7 # RUN: llvm-mc -triple powerpc64le-unknown-unknown -filetype=obj %s | \
8 # RUN: llvm-readobj -r | FileCheck %s -check-prefix=CHECK-LE-REL
10 # CHECK-BE: b target # encoding: [0b010010AA,A,A,0bAAAAAA00]
11 # CHECK-LE: b target # encoding: [0bAAAAAA00,A,A,0b010010AA]
12 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_br24
13 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_br24
14 # CHECK-BE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_REL24 target 0x0
15 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_REL24 target 0x0
18 # CHECK-BE: ba target # encoding: [0b010010AA,A,A,0bAAAAAA10]
19 # CHECK-LE: ba target # encoding: [0bAAAAAA10,A,A,0b010010AA]
20 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_br24abs
21 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_br24abs
22 # CHECK-BE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR24 target 0x0
23 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR24 target 0x0
26 # CHECK-BE: beq 0, target # encoding: [0x41,0x82,A,0bAAAAAA00]
27 # CHECK-LE: beq 0, target # encoding: [0bAAAAAA00,A,0x82,0x41]
28 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14
29 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14
30 # CHECK-BE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_REL14 target 0x0
31 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_REL14 target 0x0
34 # CHECK-BE: beqa 0, target # encoding: [0x41,0x82,A,0bAAAAAA10]
35 # CHECK-LE: beqa 0, target # encoding: [0bAAAAAA10,A,0x82,0x41]
36 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs
37 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_brcond14abs
38 # CHECK-BE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR14 target 0x0
39 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR14 target 0x0
43 # CHECK-BE: li 3, target@l # encoding: [0x38,0x60,A,A]
44 # CHECK-LE: li 3, target@l # encoding: [A,A,0x60,0x38]
45 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@l, kind: fixup_ppc_half16
46 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@l, kind: fixup_ppc_half16
47 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_ADDR16_LO target 0x0
48 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR16_LO target 0x0
51 # CHECK-BE: addis 3, 3, target@ha # encoding: [0x3c,0x63,A,A]
52 # CHECK-LE: addis 3, 3, target@ha # encoding: [A,A,0x63,0x3c]
53 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@ha, kind: fixup_ppc_half16
54 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@ha, kind: fixup_ppc_half16
55 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_ADDR16_HA target 0x0
56 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR16_HA target 0x0
59 # CHECK-BE: addis 3, 3, target@higha # encoding: [0x3c,0x63,A,A]
60 # CHECK-LE: addis 3, 3, target@higha # encoding: [A,A,0x63,0x3c]
61 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@higha, kind: fixup_ppc_half16
62 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@higha, kind: fixup_ppc_half16
63 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_ADDR16_HIGHA target 0x0
64 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR16_HIGHA target 0x0
66 addis 3, 3, target@higha
68 # CHECK-BE: lis 3, target@ha # encoding: [0x3c,0x60,A,A]
69 # CHECK-LE: lis 3, target@ha # encoding: [A,A,0x60,0x3c]
70 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@ha, kind: fixup_ppc_half16
71 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@ha, kind: fixup_ppc_half16
72 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_ADDR16_HA target 0x0
73 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR16_HA target 0x0
76 # CHECK-BE: addi 4, 3, target@l # encoding: [0x38,0x83,A,A]
77 # CHECK-LE: addi 4, 3, target@l # encoding: [A,A,0x83,0x38]
78 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@l, kind: fixup_ppc_half16
79 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@l, kind: fixup_ppc_half16
80 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_ADDR16_LO target 0x0
81 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR16_LO target 0x0
84 # CHECK-BE: li 3, target@ha # encoding: [0x38,0x60,A,A]
85 # CHECK-LE: li 3, target@ha # encoding: [A,A,0x60,0x38]
86 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@ha, kind: fixup_ppc_half16
87 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@ha, kind: fixup_ppc_half16
88 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_ADDR16_HA target 0x0
89 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR16_HA target 0x0
92 # CHECK-BE: lis 3, target@l # encoding: [0x3c,0x60,A,A]
93 # CHECK-LE: lis 3, target@l # encoding: [A,A,0x60,0x3c]
94 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@l, kind: fixup_ppc_half16
95 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@l, kind: fixup_ppc_half16
96 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_ADDR16_LO target 0x0
97 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR16_LO target 0x0
100 # CHECK-BE: li 3, target@h # encoding: [0x38,0x60,A,A]
101 # CHECK-LE: li 3, target@h # encoding: [A,A,0x60,0x38]
102 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@h, kind: fixup_ppc_half16
103 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@h, kind: fixup_ppc_half16
104 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_ADDR16_HI target 0x0
105 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR16_HI target 0x0
108 # CHECK-BE: lis 3, target@h # encoding: [0x3c,0x60,A,A]
109 # CHECK-LE: lis 3, target@h # encoding: [A,A,0x60,0x3c]
110 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@h, kind: fixup_ppc_half16
111 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@h, kind: fixup_ppc_half16
112 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_ADDR16_HI target 0x0
113 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR16_HI target 0x0
116 # CHECK-BE: li 3, target@higher # encoding: [0x38,0x60,A,A]
117 # CHECK-LE: li 3, target@higher # encoding: [A,A,0x60,0x38]
118 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@higher, kind: fixup_ppc_half16
119 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@higher, kind: fixup_ppc_half16
120 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_ADDR16_HIGHER target 0x0
121 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR16_HIGHER target 0x0
124 # CHECK-BE: lis 3, target@highest # encoding: [0x3c,0x60,A,A]
125 # CHECK-LE: lis 3, target@highest # encoding: [A,A,0x60,0x3c]
126 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@highest, kind: fixup_ppc_half16
127 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@highest, kind: fixup_ppc_half16
128 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_ADDR16_HIGHEST target 0x0
129 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR16_HIGHEST target 0x0
130 lis 3, target@highest
132 # CHECK-BE: li 3, target@highera # encoding: [0x38,0x60,A,A]
133 # CHECK-LE: li 3, target@highera # encoding: [A,A,0x60,0x38]
134 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@highera, kind: fixup_ppc_half16
135 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@highera, kind: fixup_ppc_half16
136 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_ADDR16_HIGHERA target 0x0
137 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR16_HIGHERA target 0x0
140 # CHECK-BE: lis 3, target@highesta # encoding: [0x3c,0x60,A,A]
141 # CHECK-LE: lis 3, target@highesta # encoding: [A,A,0x60,0x3c]
142 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@highesta, kind: fixup_ppc_half16
143 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@highesta, kind: fixup_ppc_half16
144 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_ADDR16_HIGHESTA target 0x0
145 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR16_HIGHESTA target 0x0
146 lis 3, target@highesta
148 # CHECK-BE: lwz 1, target@l(3) # encoding: [0x80,0x23,A,A]
149 # CHECK-LE: lwz 1, target@l(3) # encoding: [A,A,0x23,0x80]
150 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@l, kind: fixup_ppc_half16
151 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@l, kind: fixup_ppc_half16
152 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_ADDR16_LO target 0x0
153 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR16_LO target 0x0
156 # CHECK-BE: lwz 1, target(3) # encoding: [0x80,0x23,A,A]
157 # CHECK-LE: lwz 1, target(3) # encoding: [A,A,0x23,0x80]
158 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target, kind: fixup_ppc_half16
159 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_half16
160 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_ADDR16 target 0x0
161 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR16 target 0x0
164 # CHECK-BE: ld 1, target@l(3) # encoding: [0xe8,0x23,A,0bAAAAAA00]
165 # CHECK-LE: ld 1, target@l(3) # encoding: [0bAAAAAA00,A,0x23,0xe8]
166 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@l, kind: fixup_ppc_half16ds
167 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@l, kind: fixup_ppc_half16ds
168 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_ADDR16_LO_DS target 0x0
169 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR16_LO_DS target 0x0
172 # CHECK-BE: ld 1, target(3) # encoding: [0xe8,0x23,A,0bAAAAAA00]
173 # CHECK-LE: ld 1, target(3) # encoding: [0bAAAAAA00,A,0x23,0xe8]
174 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target, kind: fixup_ppc_half16ds
175 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target, kind: fixup_ppc_half16ds
176 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_ADDR16_DS target 0x0
177 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR16_DS target 0x0
181 # CHECK-BE: lwz 1, target-base(3) # encoding: [0x80,0x23,A,A]
182 # CHECK-LE: lwz 1, target-base(3) # encoding: [A,A,0x23,0x80]
183 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target-base, kind: fixup_ppc_half16
184 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target-base, kind: fixup_ppc_half16
185 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_REL16 target 0x2
186 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_REL16 target 0x0
187 lwz 1, target-base
(3)
189 # CHECK-BE: li 3, target-base@h # encoding: [0x38,0x60,A,A]
190 # CHECK-LE: li 3, target-base@h # encoding: [A,A,0x60,0x38]
191 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target-base@h, kind: fixup_ppc_half16
192 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target-base@h, kind: fixup_ppc_half16
193 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_REL16_HI target 0x6
194 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_REL16_HI target 0x4
197 # CHECK-BE: li 3, target-base@l # encoding: [0x38,0x60,A,A]
198 # CHECK-LE: li 3, target-base@l # encoding: [A,A,0x60,0x38]
199 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target-base@l, kind: fixup_ppc_half16
200 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target-base@l, kind: fixup_ppc_half16
201 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_REL16_LO target 0xA
202 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_REL16_LO target 0x8
205 # CHECK-BE: li 3, target-base@ha # encoding: [0x38,0x60,A,A]
206 # CHECK-LE: li 3, target-base@ha # encoding: [A,A,0x60,0x38]
207 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target-base@ha, kind: fixup_ppc_half16
208 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target-base@ha, kind: fixup_ppc_half16
209 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_REL16_HA target 0xE
210 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_REL16_HA target 0xC
213 # CHECK-BE: ori 3, 3, target@l # encoding: [0x60,0x63,A,A]
214 # CHECK-LE: ori 3, 3, target@l # encoding: [A,A,0x63,0x60]
215 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@l, kind: fixup_ppc_half16
216 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@l, kind: fixup_ppc_half16
217 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_ADDR16_LO target 0x0
218 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR16_LO target 0x0
221 # CHECK-BE: oris 3, 3, target@h # encoding: [0x64,0x63,A,A]
222 # CHECK-LE: oris 3, 3, target@h # encoding: [A,A,0x63,0x64]
223 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@h, kind: fixup_ppc_half16
224 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@h, kind: fixup_ppc_half16
225 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_ADDR16_HI target 0x0
226 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR16_HI target 0x0
229 # CHECK-BE: oris 3, 3, target@high # encoding: [0x64,0x63,A,A]
230 # CHECK-LE: oris 3, 3, target@high # encoding: [A,A,0x63,0x64]
231 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@high, kind: fixup_ppc_half16
232 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@high, kind: fixup_ppc_half16
233 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_ADDR16_HIGH target 0x0
234 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_ADDR16_HIGH target 0x0
235 oris 3, 3, target@high
237 # CHECK-BE: ld 1, target@toc(2) # encoding: [0xe8,0x22,A,0bAAAAAA00]
238 # CHECK-LE: ld 1, target@toc(2) # encoding: [0bAAAAAA00,A,0x22,0xe8]
239 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@toc, kind: fixup_ppc_half16ds
240 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@toc, kind: fixup_ppc_half16ds
241 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TOC16_DS target 0x0
242 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TOC16_DS target 0x0
245 # CHECK-BE: addis 3, 2, target@toc@ha # encoding: [0x3c,0x62,A,A]
246 # CHECK-LE: addis 3, 2, target@toc@ha # encoding: [A,A,0x62,0x3c]
247 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@toc@ha, kind: fixup_ppc_half16
248 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@toc@ha, kind: fixup_ppc_half16
249 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TOC16_HA target 0x0
250 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TOC16_HA target 0x0
251 addis 3, 2, target@toc@ha
253 # CHECK-BE: addi 4, 3, target@toc@l # encoding: [0x38,0x83,A,A]
254 # CHECK-LE: addi 4, 3, target@toc@l # encoding: [A,A,0x83,0x38]
255 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@toc@l, kind: fixup_ppc_half16
256 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@toc@l, kind: fixup_ppc_half16
257 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TOC16_LO target 0x0
258 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TOC16_LO target 0x0
259 addi 4, 3, target@toc@
l
261 # CHECK-BE: addis 3, 2, target@toc@h # encoding: [0x3c,0x62,A,A]
262 # CHECK-LE: addis 3, 2, target@toc@h # encoding: [A,A,0x62,0x3c]
263 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@toc@h, kind: fixup_ppc_half16
264 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@toc@h, kind: fixup_ppc_half16
265 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TOC16_HI target 0x0
266 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TOC16_HI target 0x0
267 addis 3, 2, target@toc@h
269 # CHECK-BE: lwz 1, target@toc@l(3) # encoding: [0x80,0x23,A,A]
270 # CHECK-LE: lwz 1, target@toc@l(3) # encoding: [A,A,0x23,0x80]
271 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@toc@l, kind: fixup_ppc_half16
272 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@toc@l, kind: fixup_ppc_half16
273 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TOC16_LO target 0x0
274 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TOC16_LO target 0x0
275 lwz 1, target@toc@
l(3)
277 # CHECK-BE: ld 1, target@toc@l(3) # encoding: [0xe8,0x23,A,0bAAAAAA00]
278 # CHECK-LE: ld 1, target@toc@l(3) # encoding: [0bAAAAAA00,A,0x23,0xe8]
279 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@toc@l, kind: fixup_ppc_half16ds
280 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@toc@l, kind: fixup_ppc_half16ds
281 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TOC16_LO_DS target 0x0
282 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TOC16_LO_DS target 0x0
283 ld 1, target@toc@
l(3)
285 # CHECK-BE: addi 4, 3, target@GOT # encoding: [0x38,0x83,A,A]
286 # CHECK-LE: addi 4, 3, target@GOT # encoding: [A,A,0x83,0x38]
287 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@GOT, kind: fixup_ppc_half16
288 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@GOT, kind: fixup_ppc_half16
289 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT16 target 0x0
290 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT16 target 0x0
291 addi 4, 3, target@got
293 # CHECK-BE: ld 1, target@GOT(2) # encoding: [0xe8,0x22,A,0bAAAAAA00]
294 # CHECK-LE: ld 1, target@GOT(2) # encoding: [0bAAAAAA00,A,0x22,0xe8]
295 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@GOT, kind: fixup_ppc_half16ds
296 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@GOT, kind: fixup_ppc_half16ds
297 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT16_DS target 0x0
298 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT16_DS target 0x0
301 # CHECK-BE: addis 3, 2, target@got@ha # encoding: [0x3c,0x62,A,A]
302 # CHECK-LE: addis 3, 2, target@got@ha # encoding: [A,A,0x62,0x3c]
303 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@ha, kind: fixup_ppc_half16
304 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@ha, kind: fixup_ppc_half16
305 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT16_HA target 0x0
306 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT16_HA target 0x0
307 addis 3, 2, target@got@ha
309 # CHECK-BE: addi 4, 3, target@got@l # encoding: [0x38,0x83,A,A]
310 # CHECK-LE: addi 4, 3, target@got@l # encoding: [A,A,0x83,0x38]
311 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@l, kind: fixup_ppc_half16
312 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@l, kind: fixup_ppc_half16
313 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT16_LO target 0x0
314 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT16_LO target 0x0
315 addi 4, 3, target@got@
l
317 # CHECK-BE: addis 3, 2, target@got@h # encoding: [0x3c,0x62,A,A]
318 # CHECK-LE: addis 3, 2, target@got@h # encoding: [A,A,0x62,0x3c]
319 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@h, kind: fixup_ppc_half16
320 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@h, kind: fixup_ppc_half16
321 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT16_HI target 0x0
322 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT16_HI target 0x0
323 addis 3, 2, target@got@h
325 # CHECK-BE: lwz 1, target@got@l(3) # encoding: [0x80,0x23,A,A]
326 # CHECK-LE: lwz 1, target@got@l(3) # encoding: [A,A,0x23,0x80]
327 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@l, kind: fixup_ppc_half16
328 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@l, kind: fixup_ppc_half16
329 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT16_LO target 0x0
330 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT16_LO target 0x0
331 lwz 1, target@got@
l(3)
333 # CHECK-BE: ld 1, target@got@l(3) # encoding: [0xe8,0x23,A,0bAAAAAA00]
334 # CHECK-LE: ld 1, target@got@l(3) # encoding: [0bAAAAAA00,A,0x23,0xe8]
335 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@l, kind: fixup_ppc_half16ds
336 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@l, kind: fixup_ppc_half16ds
337 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT16_LO_DS target 0x0
338 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT16_LO_DS target 0x0
339 ld 1, target@got@
l(3)
341 # CHECK-BE: addis 3, 2, target@tprel@ha # encoding: [0x3c,0x62,A,A]
342 # CHECK-LE: addis 3, 2, target@tprel@ha # encoding: [A,A,0x62,0x3c]
343 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@tprel@ha, kind: fixup_ppc_half16
344 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@tprel@ha, kind: fixup_ppc_half16
345 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16_HA target 0x0
346 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TPREL16_HA target 0x0
347 addis 3, 2, target@tprel@ha
349 # CHECK-BE: addis 3, 2, target@tprel@higha # encoding: [0x3c,0x62,A,A]
350 # CHECK-LE: addis 3, 2, target@tprel@higha # encoding: [A,A,0x62,0x3c]
351 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@tprel@higha, kind: fixup_ppc_half16
352 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@tprel@higha, kind: fixup_ppc_half16
353 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16_HIGHA target 0x0
354 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TPREL16_HIGHA target 0x0
355 addis 3, 2, target@tprel@higha
357 # CHECK-BE: addis 3, 2, target@tprel@high # encoding: [0x3c,0x62,A,A]
358 # CHECK-LE: addis 3, 2, target@tprel@high # encoding: [A,A,0x62,0x3c]
359 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@tprel@high, kind: fixup_ppc_half16
360 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@tprel@high, kind: fixup_ppc_half16
361 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16_HIGH target 0x0
362 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TPREL16_HIGH target 0x0
363 addis 3, 2, target@tprel@high
365 # CHECK-BE: addi 3, 3, target@tprel@l # encoding: [0x38,0x63,A,A]
366 # CHECK-LE: addi 3, 3, target@tprel@l # encoding: [A,A,0x63,0x38]
367 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@tprel@l, kind: fixup_ppc_half16
368 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@tprel@l, kind: fixup_ppc_half16
369 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16_LO target 0x0
370 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TPREL16_LO target 0x0
371 addi 3, 3, target@tprel@
l
373 # CHECK-BE: addi 3, 3, target@TPREL # encoding: [0x38,0x63,A,A]
374 # CHECK-LE: addi 3, 3, target@TPREL # encoding: [A,A,0x63,0x38]
375 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@TPREL, kind: fixup_ppc_half16
376 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@TPREL, kind: fixup_ppc_half16
377 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16 target 0x0
378 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TPREL16 target 0x0
379 addi 3, 3, target@tprel
381 # CHECK-BE: addi 3, 3, target@tprel@h # encoding: [0x38,0x63,A,A]
382 # CHECK-LE: addi 3, 3, target@tprel@h # encoding: [A,A,0x63,0x38]
383 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@tprel@h, kind: fixup_ppc_half16
384 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@tprel@h, kind: fixup_ppc_half16
385 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16_HI target 0x0
386 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TPREL16_HI target 0x0
387 addi 3, 3, target@tprel@h
389 # CHECK-BE: addi 3, 3, target@tprel@higher # encoding: [0x38,0x63,A,A]
390 # CHECK-LE: addi 3, 3, target@tprel@higher # encoding: [A,A,0x63,0x38]
391 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@tprel@higher, kind: fixup_ppc_half16
392 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@tprel@higher, kind: fixup_ppc_half16
393 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16_HIGHER target 0x0
394 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TPREL16_HIGHER target 0x0
395 addi 3, 3, target@tprel@higher
397 # CHECK-BE: addis 3, 2, target@tprel@highest # encoding: [0x3c,0x62,A,A]
398 # CHECK-LE: addis 3, 2, target@tprel@highest # encoding: [A,A,0x62,0x3c]
399 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@tprel@highest, kind: fixup_ppc_half16
400 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@tprel@highest, kind: fixup_ppc_half16
401 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16_HIGHEST target 0x0
402 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TPREL16_HIGHEST target 0x0
403 addis 3, 2, target@tprel@highest
405 # CHECK-BE: addi 3, 3, target@tprel@highera # encoding: [0x38,0x63,A,A]
406 # CHECK-LE: addi 3, 3, target@tprel@highera # encoding: [A,A,0x63,0x38]
407 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@tprel@highera, kind: fixup_ppc_half16
408 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@tprel@highera, kind: fixup_ppc_half16
409 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16_HIGHERA target 0x0
410 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TPREL16_HIGHERA target 0x0
411 addi 3, 3, target@tprel@highera
413 # CHECK-BE: addis 3, 2, target@tprel@highesta # encoding: [0x3c,0x62,A,A]
414 # CHECK-LE: addis 3, 2, target@tprel@highesta # encoding: [A,A,0x62,0x3c]
415 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@tprel@highesta, kind: fixup_ppc_half16
416 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@tprel@highesta, kind: fixup_ppc_half16
417 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16_HIGHESTA target 0x0
418 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TPREL16_HIGHESTA target 0x0
419 addis 3, 2, target@tprel@highesta
421 # CHECK-BE: ld 1, target@tprel@l(3) # encoding: [0xe8,0x23,A,0bAAAAAA00]
422 # CHECK-LE: ld 1, target@tprel@l(3) # encoding: [0bAAAAAA00,A,0x23,0xe8]
423 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@tprel@l, kind: fixup_ppc_half16ds
424 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@tprel@l, kind: fixup_ppc_half16ds
425 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16_LO_DS target 0x0
426 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TPREL16_LO_DS target 0x0
427 ld 1, target@tprel@
l(3)
429 # CHECK-BE: ld 1, target@TPREL(3) # encoding: [0xe8,0x23,A,0bAAAAAA00]
430 # CHECK-LE: ld 1, target@TPREL(3) # encoding: [0bAAAAAA00,A,0x23,0xe8]
431 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@TPREL, kind: fixup_ppc_half16ds
432 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@TPREL, kind: fixup_ppc_half16ds
433 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_TPREL16_DS target 0x0
434 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TPREL16_DS target 0x0
435 ld 1, target@tprel
(3)
437 # CHECK-BE: addis 3, 2, target@dtprel@ha # encoding: [0x3c,0x62,A,A]
438 # CHECK-LE: addis 3, 2, target@dtprel@ha # encoding: [A,A,0x62,0x3c]
439 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@dtprel@ha, kind: fixup_ppc_half16
440 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@dtprel@ha, kind: fixup_ppc_half16
441 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16_HA target 0x0
442 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_DTPREL16_HA target 0x0
443 addis 3, 2, target@dtprel@ha
445 # CHECK-BE: addis 3, 2, target@dtprel@higha # encoding: [0x3c,0x62,A,A]
446 # CHECK-LE: addis 3, 2, target@dtprel@higha # encoding: [A,A,0x62,0x3c]
447 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@dtprel@higha, kind: fixup_ppc_half16
448 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@dtprel@higha, kind: fixup_ppc_half16
449 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16_HIGHA target 0x0
450 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_DTPREL16_HIGHA target 0x0
451 addis 3, 2, target@dtprel@higha
453 # CHECK-BE: addis 3, 2, target@dtprel@high # encoding: [0x3c,0x62,A,A]
454 # CHECK-LE: addis 3, 2, target@dtprel@high # encoding: [A,A,0x62,0x3c]
455 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@dtprel@high, kind: fixup_ppc_half16
456 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@dtprel@high, kind: fixup_ppc_half16
457 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16_HIGH target 0x0
458 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_DTPREL16_HIGH target 0x0
459 addis 3, 2, target@dtprel@high
461 # CHECK-BE: addi 3, 3, target@dtprel@l # encoding: [0x38,0x63,A,A]
462 # CHECK-LE: addi 3, 3, target@dtprel@l # encoding: [A,A,0x63,0x38]
463 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@dtprel@l, kind: fixup_ppc_half16
464 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@dtprel@l, kind: fixup_ppc_half16
465 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16_LO target 0x0
466 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_DTPREL16_LO target 0x0
467 addi 3, 3, target@dtprel@
l
469 # CHECK-BE: addi 3, 3, target@DTPREL # encoding: [0x38,0x63,A,A]
470 # CHECK-LE: addi 3, 3, target@DTPREL # encoding: [A,A,0x63,0x38]
471 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@DTPREL, kind: fixup_ppc_half16
472 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@DTPREL, kind: fixup_ppc_half16
473 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16 target 0x0
474 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_DTPREL16 target 0x0
475 addi 3, 3, target@dtprel
477 # CHECK-BE: addi 3, 3, target@dtprel@h # encoding: [0x38,0x63,A,A]
478 # CHECK-LE: addi 3, 3, target@dtprel@h # encoding: [A,A,0x63,0x38]
479 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@dtprel@h, kind: fixup_ppc_half16
480 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@dtprel@h, kind: fixup_ppc_half16
481 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16_HI target 0x0
482 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_DTPREL16_HI target 0x0
483 addi 3, 3, target@dtprel@h
485 # CHECK-BE: addi 3, 3, target@dtprel@higher # encoding: [0x38,0x63,A,A]
486 # CHECK-LE: addi 3, 3, target@dtprel@higher # encoding: [A,A,0x63,0x38]
487 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@dtprel@higher, kind: fixup_ppc_half16
488 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@dtprel@higher, kind: fixup_ppc_half16
489 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16_HIGHER target 0x0
490 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_DTPREL16_HIGHER target 0x0
491 addi 3, 3, target@dtprel@higher
493 # CHECK-BE: addis 3, 2, target@dtprel@highest # encoding: [0x3c,0x62,A,A]
494 # CHECK-LE: addis 3, 2, target@dtprel@highest # encoding: [A,A,0x62,0x3c]
495 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@dtprel@highest, kind: fixup_ppc_half16
496 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@dtprel@highest, kind: fixup_ppc_half16
497 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16_HIGHEST target 0x0
498 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_DTPREL16_HIGHEST target 0x0
499 addis 3, 2, target@dtprel@highest
501 # CHECK-BE: addi 3, 3, target@dtprel@highera # encoding: [0x38,0x63,A,A]
502 # CHECK-LE: addi 3, 3, target@dtprel@highera # encoding: [A,A,0x63,0x38]
503 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@dtprel@highera, kind: fixup_ppc_half16
504 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@dtprel@highera, kind: fixup_ppc_half16
505 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16_HIGHERA target 0x0
506 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_DTPREL16_HIGHERA target 0x0
507 addi 3, 3, target@dtprel@highera
509 # CHECK-BE: addis 3, 2, target@dtprel@highesta # encoding: [0x3c,0x62,A,A]
510 # CHECK-LE: addis 3, 2, target@dtprel@highesta # encoding: [A,A,0x62,0x3c]
511 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@dtprel@highesta, kind: fixup_ppc_half16
512 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@dtprel@highesta, kind: fixup_ppc_half16
513 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16_HIGHESTA target 0x0
514 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_DTPREL16_HIGHESTA target 0x0
515 addis 3, 2, target@dtprel@highesta
517 # CHECK-BE: ld 1, target@dtprel@l(3) # encoding: [0xe8,0x23,A,0bAAAAAA00]
518 # CHECK-LE: ld 1, target@dtprel@l(3) # encoding: [0bAAAAAA00,A,0x23,0xe8]
519 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@dtprel@l, kind: fixup_ppc_half16ds
520 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@dtprel@l, kind: fixup_ppc_half16ds
521 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16_LO_DS target 0x0
522 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_DTPREL16_LO_DS target 0x0
523 ld 1, target@dtprel@
l(3)
525 # CHECK-BE: ld 1, target@DTPREL(3) # encoding: [0xe8,0x23,A,0bAAAAAA00]
526 # CHECK-LE: ld 1, target@DTPREL(3) # encoding: [0bAAAAAA00,A,0x23,0xe8]
527 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@DTPREL, kind: fixup_ppc_half16ds
528 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@DTPREL, kind: fixup_ppc_half16ds
529 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_DTPREL16_DS target 0x0
530 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_DTPREL16_DS target 0x0
531 ld 1, target@dtprel
(3)
534 # CHECK-BE: addis 3, 2, target@got@tprel@ha # encoding: [0x3c,0x62,A,A]
535 # CHECK-LE: addis 3, 2, target@got@tprel@ha # encoding: [A,A,0x62,0x3c]
536 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@tprel@ha, kind: fixup_ppc_half16
537 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@tprel@ha, kind: fixup_ppc_half16
538 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TPREL16_HA target 0x0
539 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT_TPREL16_HA target 0x0
540 addis 3, 2, target@got@tprel@ha
542 # CHECK-BE: ld 1, target@got@tprel@l(3) # encoding: [0xe8,0x23,A,0bAAAAAA00]
543 # CHECK-LE: ld 1, target@got@tprel@l(3) # encoding: [0bAAAAAA00,A,0x23,0xe8]
544 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@tprel@l, kind: fixup_ppc_half16ds
545 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@tprel@l, kind: fixup_ppc_half16ds
546 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TPREL16_LO_DS target 0x0
547 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT_TPREL16_LO_DS target 0x0
548 ld 1, target@got@tprel@
l(3)
550 # CHECK-BE: addis 3, 2, target@got@tprel@h # encoding: [0x3c,0x62,A,A]
551 # CHECK-LE: addis 3, 2, target@got@tprel@h # encoding: [A,A,0x62,0x3c]
552 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@tprel@h, kind: fixup_ppc_half16
553 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@tprel@h, kind: fixup_ppc_half16
554 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TPREL16_HI target 0x0
555 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT_TPREL16_HI target 0x0
556 addis 3, 2, target@got@tprel@h
558 # CHECK-BE: addis 3, 2, target@got@tprel@l # encoding: [0x3c,0x62,A,A]
559 # CHECK-LE: addis 3, 2, target@got@tprel@l # encoding: [A,A,0x62,0x3c]
560 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@tprel@l, kind: fixup_ppc_half16
561 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@tprel@l, kind: fixup_ppc_half16
562 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TPREL16_LO_DS target 0x0
563 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT_TPREL16_LO_DS target 0x0
564 addis 3, 2, target@got@tprel@
l
566 # CHECK-BE: addis 3, 2, target@got@tprel # encoding: [0x3c,0x62,A,A]
567 # CHECK-LE: addis 3, 2, target@got@tprel # encoding: [A,A,0x62,0x3c]
568 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@tprel, kind: fixup_ppc_half16
569 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@tprel, kind: fixup_ppc_half16
570 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TPREL16_DS target 0x0
571 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT_TPREL16_DS target 0x0
572 addis 3, 2, target@got@tprel
574 # CHECK-BE: ld 1, target@got@tprel(3) # encoding: [0xe8,0x23,A,0bAAAAAA00]
575 # CHECK-LE: ld 1, target@got@tprel(3) # encoding: [0bAAAAAA00,A,0x23,0xe8]
576 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@tprel, kind: fixup_ppc_half16ds
577 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@tprel, kind: fixup_ppc_half16ds
578 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TPREL16_DS target 0x0
579 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT_TPREL16_DS target 0x0
580 ld 1, target@got@tprel
(3)
582 # CHECK-BE: addis 3, 2, target@got@dtprel@ha # encoding: [0x3c,0x62,A,A]
583 # CHECK-LE: addis 3, 2, target@got@dtprel@ha # encoding: [A,A,0x62,0x3c]
584 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@dtprel@ha, kind: fixup_ppc_half16
585 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@dtprel@ha, kind: fixup_ppc_half16
586 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_DTPREL16_HA target 0x0
587 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT_DTPREL16_HA target 0x0
588 addis 3, 2, target@got@dtprel@ha
590 # CHECK-BE: ld 1, target@got@dtprel@l(3) # encoding: [0xe8,0x23,A,0bAAAAAA00]
591 # CHECK-LE: ld 1, target@got@dtprel@l(3) # encoding: [0bAAAAAA00,A,0x23,0xe8]
592 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@dtprel@l, kind: fixup_ppc_half16ds
593 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@dtprel@l, kind: fixup_ppc_half16ds
594 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_DTPREL16_LO_DS target 0x0
595 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT_DTPREL16_LO_DS target 0x0
596 ld 1, target@got@dtprel@
l(3)
598 # CHECK-BE: addis 3, 2, target@got@dtprel@h # encoding: [0x3c,0x62,A,A]
599 # CHECK-LE: addis 3, 2, target@got@dtprel@h # encoding: [A,A,0x62,0x3c]
600 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@dtprel@h, kind: fixup_ppc_half16
601 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@dtprel@h, kind: fixup_ppc_half16
602 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_DTPREL16_HI target 0x0
603 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT_DTPREL16_HI target 0x0
604 addis 3, 2, target@got@dtprel@h
606 # CHECK-BE: addis 3, 2, target@got@dtprel@l # encoding: [0x3c,0x62,A,A]
607 # CHECK-LE: addis 3, 2, target@got@dtprel@l # encoding: [A,A,0x62,0x3c]
608 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@dtprel@l, kind: fixup_ppc_half16
609 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@dtprel@l, kind: fixup_ppc_half16
610 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_DTPREL16_LO_DS target 0x0
611 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT_DTPREL16_LO_DS target 0x0
612 addis 3, 2, target@got@dtprel@
l
614 # CHECK-BE: addis 3, 2, target@got@dtprel # encoding: [0x3c,0x62,A,A]
615 # CHECK-LE: addis 3, 2, target@got@dtprel # encoding: [A,A,0x62,0x3c]
616 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@dtprel, kind: fixup_ppc_half16
617 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@dtprel, kind: fixup_ppc_half16
618 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_DTPREL16_DS target 0x0
619 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT_DTPREL16_DS target 0x0
620 addis 3, 2, target@got@dtprel
622 # CHECK-BE: ld 1, target@got@dtprel(3) # encoding: [0xe8,0x23,A,0bAAAAAA00]
623 # CHECK-LE: ld 1, target@got@dtprel(3) # encoding: [0bAAAAAA00,A,0x23,0xe8]
624 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@dtprel, kind: fixup_ppc_half16ds
625 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@dtprel, kind: fixup_ppc_half16ds
626 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_DTPREL16_DS target 0x0
627 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT_DTPREL16_DS target 0x0
628 ld 1, target@got@dtprel
(3)
630 # CHECK-BE: addis 3, 2, target@got@tlsgd@ha # encoding: [0x3c,0x62,A,A]
631 # CHECK-LE: addis 3, 2, target@got@tlsgd@ha # encoding: [A,A,0x62,0x3c]
632 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@tlsgd@ha, kind: fixup_ppc_half16
633 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@tlsgd@ha, kind: fixup_ppc_half16
634 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TLSGD16_HA target 0x0
635 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT_TLSGD16_HA target 0x0
636 addis 3, 2, target@got@tlsgd@ha
638 # CHECK-BE: addi 3, 3, target@got@tlsgd@l # encoding: [0x38,0x63,A,A]
639 # CHECK-LE: addi 3, 3, target@got@tlsgd@l # encoding: [A,A,0x63,0x38]
640 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@tlsgd@l, kind: fixup_ppc_half16
641 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@tlsgd@l, kind: fixup_ppc_half16
642 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TLSGD16_LO target 0x0
643 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT_TLSGD16_LO target 0x0
644 addi 3, 3, target@got@tlsgd@
l
646 # CHECK-BE: addi 3, 3, target@got@tlsgd@h # encoding: [0x38,0x63,A,A]
647 # CHECK-LE: addi 3, 3, target@got@tlsgd@h # encoding: [A,A,0x63,0x38]
648 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@tlsgd@h, kind: fixup_ppc_half16
649 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@tlsgd@h, kind: fixup_ppc_half16
650 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TLSGD16_HI target 0x0
651 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT_TLSGD16_HI target 0x0
652 addi 3, 3, target@got@tlsgd@h
654 # CHECK-BE: addi 3, 3, target@got@tlsgd # encoding: [0x38,0x63,A,A]
655 # CHECK-LE: addi 3, 3, target@got@tlsgd # encoding: [A,A,0x63,0x38]
656 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@tlsgd, kind: fixup_ppc_half16
657 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@tlsgd, kind: fixup_ppc_half16
658 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TLSGD16 target 0x0
659 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT_TLSGD16 target 0x0
660 addi 3, 3, target@got@tlsgd
663 # CHECK-BE: addis 3, 2, target@got@tlsld@ha # encoding: [0x3c,0x62,A,A]
664 # CHECK-LE: addis 3, 2, target@got@tlsld@ha # encoding: [A,A,0x62,0x3c]
665 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@tlsld@ha, kind: fixup_ppc_half16
666 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@tlsld@ha, kind: fixup_ppc_half16
667 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TLSLD16_HA target 0x0
668 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT_TLSLD16_HA target 0x0
669 addis 3, 2, target@got@tlsld@ha
671 # CHECK-BE: addi 3, 3, target@got@tlsld@l # encoding: [0x38,0x63,A,A]
672 # CHECK-LE: addi 3, 3, target@got@tlsld@l # encoding: [A,A,0x63,0x38]
673 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@tlsld@l, kind: fixup_ppc_half16
674 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@tlsld@l, kind: fixup_ppc_half16
675 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TLSLD16_LO target 0x0
676 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT_TLSLD16_LO target 0x0
677 addi 3, 3, target@got@tlsld@
l
679 # CHECK-BE: addi 3, 3, target@got@tlsld@h # encoding: [0x38,0x63,A,A]
680 # CHECK-LE: addi 3, 3, target@got@tlsld@h # encoding: [A,A,0x63,0x38]
681 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@tlsld@h, kind: fixup_ppc_half16
682 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@tlsld@h, kind: fixup_ppc_half16
683 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TLSLD16_HI target 0x0
684 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT_TLSLD16_HI target 0x0
685 addi 3, 3, target@got@tlsld@h
687 # CHECK-BE: addi 3, 3, target@got@tlsld # encoding: [0x38,0x63,A,A]
688 # CHECK-LE: addi 3, 3, target@got@tlsld # encoding: [A,A,0x63,0x38]
689 # CHECK-BE-NEXT: # fixup A - offset: 2, value: target@got@tlsld, kind: fixup_ppc_half16
690 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@got@tlsld, kind: fixup_ppc_half16
691 # CHECK-BE-REL: 0x{{[0-9A-F]*[26AE]}} R_PPC64_GOT_TLSLD16 target 0x0
692 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_GOT_TLSLD16 target 0x0
693 addi 3, 3, target@got@tlsld
695 # CHECK-BE: bl __tls_get_addr(target@tlsgd) # encoding: [0b010010BB,B,B,0bBBBBBB01]
696 # CHECK-LE: bl __tls_get_addr(target@tlsgd) # encoding: [0bBBBBBB01,B,B,0b010010BB]
697 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target@tlsgd, kind: fixup_ppc_nofixup
698 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@tlsgd, kind: fixup_ppc_nofixup
699 # CHECK-BE-NEXT: # fixup B - offset: 0, value: __tls_get_addr, kind: fixup_ppc_br24
700 # CHECK-LE-NEXT: # fixup B - offset: 0, value: __tls_get_addr, kind: fixup_ppc_br24
701 # CHECK-BE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TLSGD target 0x0
702 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TLSGD target 0x0
703 # CHECK-BE-REL-NEXT: 0x{{[0-9A-F]*[048C]}} R_PPC64_REL24 __tls_get_addr 0x0
704 # CHECK-LE-REL-NEXT: 0x{{[0-9A-F]*[048C]}} R_PPC64_REL24 __tls_get_addr 0x0
705 bl __tls_get_addr
(target@tlsgd
)
707 # CHECK-BE: bl __tls_get_addr(target@tlsld) # encoding: [0b010010BB,B,B,0bBBBBBB01]
708 # CHECK-LE: bl __tls_get_addr(target@tlsld) # encoding: [0bBBBBBB01,B,B,0b010010BB]
709 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target@tlsld, kind: fixup_ppc_nofixup
710 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@tlsld, kind: fixup_ppc_nofixup
711 # CHECK-BE-NEXT: # fixup B - offset: 0, value: __tls_get_addr, kind: fixup_ppc_br24
712 # CHECK-LE-NEXT: # fixup B - offset: 0, value: __tls_get_addr, kind: fixup_ppc_br24
713 # CHECK-BE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TLSLD target 0x0
714 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TLSLD target 0x0
715 # CHECK-BE-REL-NEXT: 0x{{[0-9A-F]*[048C]}} R_PPC64_REL24 __tls_get_addr 0x0
716 # CHECK-LE-REL-NEXT: 0x{{[0-9A-F]*[048C]}} R_PPC64_REL24 __tls_get_addr 0x0
717 bl __tls_get_addr
(target@tlsld
)
719 # CHECK-BE: add 3, 4, target@tls # encoding: [0x7c,0x64,0x6a,0x14]
720 # CHECK-LE: add 3, 4, target@tls # encoding: [0x14,0x6a,0x64,0x7c]
721 # CHECK-BE-NEXT: # fixup A - offset: 0, value: target@tls, kind: fixup_ppc_nofixup
722 # CHECK-LE-NEXT: # fixup A - offset: 0, value: target@tls, kind: fixup_ppc_nofixup
723 # CHECK-BE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TLS target 0x0
724 # CHECK-LE-REL: 0x{{[0-9A-F]*[048C]}} R_PPC64_TLS target 0x0
727 # Verify that fixups on constants are resolved at assemble time
729 # CHECK-BE: ori 1, 2, 65535 # encoding: [0x60,0x41,0xff,0xff]
730 # CHECK-LE: ori 1, 2, 65535 # encoding: [0xff,0xff,0x41,0x60]
732 # CHECK-BE: ori 1, 2, 1 # encoding: [0x60,0x41,0x00,0x01]
733 # CHECK-LE: ori 1, 2, 1 # encoding: [0x01,0x00,0x41,0x60]
735 # CHECK-BE: ori 1, 2, 2 # encoding: [0x60,0x41,0x00,0x02]
736 # CHECK-LE: ori 1, 2, 2 # encoding: [0x02,0x00,0x41,0x60]
738 # CHECK-BE: addi 1, 2, -1 # encoding: [0x38,0x22,0xff,0xff]
739 # CHECK-LE: addi 1, 2, -1 # encoding: [0xff,0xff,0x22,0x38]
741 # CHECK-BE: addi 1, 2, 1 # encoding: [0x38,0x22,0x00,0x01]
742 # CHECK-LE: addi 1, 2, 1 # encoding: [0x01,0x00,0x22,0x38]
744 # CHECK-BE: addi 1, 2, 2 # encoding: [0x38,0x22,0x00,0x02]
745 # CHECK-LE: addi 1, 2, 2 # encoding: [0x02,0x00,0x22,0x38]
747 # CHECK-BE: addis 1, 2, -4096 # encoding: [0x3c,0x22,0xf0,0x00]
748 # CHECK-LE: addis 1, 2, -4096 # encoding: [0x00,0xf0,0x22,0x3c]
749 addis 1, 2, 0xf0000000@h
752 # llvm-mc does not show any "encoding" string for data, so we just check the relocs
754 # CHECK-BE-REL: .rela.data
755 # CHECK-LE-REL: .rela.data
758 # CHECK-BE-REL: 0x{{[0-9A-F]*[08]}} R_PPC64_TOC - 0x0
759 # CHECK-LE-REL: 0x{{[0-9A-F]*[08]}} R_PPC64_TOC - 0x0
762 # CHECK-BE-REL: 0x{{[0-9A-F]*[08]}} R_PPC64_DTPMOD64 target 0x0
763 # CHECK-LE-REL: 0x{{[0-9A-F]*[08]}} R_PPC64_DTPMOD64 target 0x0
766 # CHECK-BE-REL: 0x{{[0-9A-F]*[08]}} R_PPC64_TPREL64 target 0x0
767 # CHECK-LE-REL: 0x{{[0-9A-F]*[08]}} R_PPC64_TPREL64 target 0x0
770 # CHECK-BE-REL: 0x{{[0-9A-F]*[08]}} R_PPC64_DTPREL64 target 0x0
771 # CHECK-LE-REL: 0x{{[0-9A-F]*[08]}} R_PPC64_DTPREL64 target 0x0