[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / Mips / sc-expansion.s
blobb407f7aaf570007b0da7a54c4e7fad7e2c430ff5
1 # RUN: llvm-mc -filetype=obj -triple mips -mcpu=mips2 %s -o - \
2 # RUN: | llvm-objdump -d -r - | FileCheck %s --check-prefix=MIPS32
3 # RUN: llvm-mc -filetype=obj -triple mips -mcpu=mips32 %s -o - \
4 # RUN: | llvm-objdump -d -r - | FileCheck %s --check-prefix=MIPS32
5 # RUN: llvm-mc -filetype=obj -triple mips -mcpu=mips32r2 %s -o - \
6 # RUN: | llvm-objdump -d -r - | FileCheck %s --check-prefix=MIPS32
7 # RUN: llvm-mc -filetype=obj -triple mipsn32 -mcpu=mips3 %s -o - \
8 # RUN: | llvm-objdump -d -r - | FileCheck %s --check-prefix=MIPSN32
9 # RUN: llvm-mc -filetype=obj -triple mipsn32 -mcpu=mips64r6 %s -o - \
10 # RUN: | llvm-objdump -d -r - | FileCheck %s --check-prefix=MIPSN32R6
11 # RUN: llvm-mc -filetype=obj -triple mips64 -mcpu=mips64 %s -o - \
12 # RUN: | llvm-objdump -d -r - | FileCheck %s --check-prefix=MIPS64
13 # RUN: llvm-mc -filetype=obj -triple mips64 -mcpu=mips64r2 %s -o - \
14 # RUN: | llvm-objdump -d -r - | FileCheck %s --check-prefix=MIPS64
15 # RUN: llvm-mc -filetype=obj -triple mips -mcpu=mips32r6 %s -o - \
16 # RUN: | llvm-objdump -d -r - | FileCheck %s --check-prefix=MIPS32R6
17 # RUN: llvm-mc -filetype=obj -triple mips64 -mcpu=mips64r6 %s -o - \
18 # RUN: | llvm-objdump -d -r - | FileCheck %s --check-prefix=MIPS64R6
20 sc $2, 128($sp)
21 # MIPS32: e3 a2 00 80 sc $2, 128($sp)
22 # MIPS32R6: 7f a2 40 26 sc $2, 128($sp)
23 # MIPSN32: e3 a2 00 80 sc $2, 128($sp)
24 # MIPSN32R6: 7f a2 40 26 sc $2, 128($sp)
25 # MIPS64: e3 a2 00 80 sc $2, 128($sp)
26 # MIPS64R6: 7f a2 40 26 sc $2, 128($sp)
28 sc $2, -128($sp)
29 # MIPS32: e3 a2 ff 80 sc $2, -128($sp)
30 # MIPS32R6: 7f a2 c0 26 sc $2, -128($sp)
31 # MIPSN32: e3 a2 ff 80 sc $2, -128($sp)
32 # MIPSN32R6: 7f a2 c0 26 sc $2, -128($sp)
33 # MIPS64: e3 a2 ff 80 sc $2, -128($sp)
34 # MIPS64R6: 7f a2 c0 26 sc $2, -128($sp)
36 sc $2, 256($sp)
37 # MIPS32: e3 a2 01 00 sc $2, 256($sp)
39 # MIPS32R6: 27 a1 01 00 addiu $1, $sp, 256
40 # MIPS32R6-NEXT: 7c 22 00 26 sc $2, 0($1)
42 # MIPSN32: e3 a2 01 00 sc $2, 256($sp)
44 # MIPSN32R6: 27 a1 01 00 addiu $1, $sp, 256
45 # MIPSN32R6-NEXT: 7c 22 00 26 sc $2, 0($1)
47 # MIPS64: e3 a2 01 00 sc $2, 256($sp)
49 # MIPS64R6: 67 a1 01 00 daddiu $1, $sp, 256
50 # MIPS64R6-NEXT: 7c 22 00 26 sc $2, 0($1)
52 sc $2, -257($sp)
53 # MIPS32: e3 a2 fe ff sc $2, -257($sp)
55 # MIPS32R6: 27 a1 fe ff addiu $1, $sp, -257
56 # MIPS32R6-NEXT: 7c 22 00 26 sc $2, 0($1)
58 # MIPSN32: e3 a2 fe ff sc $2, -257($sp)
60 # MIPSN32R6: 27 a1 fe ff addiu $1, $sp, -257
61 # MIPSN32R6-NEXT: 7c 22 00 26 sc $2, 0($1)
63 # MIPS64: e3 a2 fe ff sc $2, -257($sp)
65 # MIPS64R6: 67 a1 fe ff daddiu $1, $sp, -257
66 # MIPS64R6-NEXT: 7c 22 00 26 sc $2, 0($1)
68 sc $2, 32767($sp)
69 # MIPS32: e3 a2 7f ff sc $2, 32767($sp)
71 # MIPS32R6: 27 a1 7f ff addiu $1, $sp, 32767
72 # MIPS32R6-NEXT: 7c 22 00 26 sc $2, 0($1)
74 # MIPSN32: e3 a2 7f ff sc $2, 32767($sp)
76 # MIPSN32R6: 27 a1 7f ff addiu $1, $sp, 32767
77 # MIPSN32R6-NEXT: 7c 22 00 26 sc $2, 0($1)
79 # MIPS64: e3 a2 7f ff sc $2, 32767($sp)
81 # MIPS64R6: 67 a1 7f ff daddiu $1, $sp, 32767
82 # MIPS64R6-NEXT: 7c 22 00 26 sc $2, 0($1)
84 sc $2, 32768($sp)
85 # MIPS32: 3c 01 00 01 lui $1, 1
86 # MIPS32-NEXT: 00 3d 08 21 addu $1, $1, $sp
87 # MIPS32-NEXT: e0 22 80 00 sc $2, -32768($1)
89 # MIPS32R6: 34 01 80 00 ori $1, $zero, 32768
90 # MIPS32R6-NEXT: 00 3d 08 21 addu $1, $1, $sp
91 # MIPS32R6-NEXT: 7c 22 00 26 sc $2, 0($1)
93 # MIPSN32: 3c 01 00 01 lui $1, 1
94 # MIPSN32-NEXT: 00 3d 08 21 addu $1, $1, $sp
95 # MIPSN32-NEXT: e0 22 80 00 sc $2, -32768($1)
97 # MIPSN32R6: 34 01 80 00 ori $1, $zero, 32768
98 # MIPSN32R6-NEXT: 00 3d 08 21 addu $1, $1, $sp
99 # MIPSN32R6-NEXT: 7c 22 00 26 sc $2, 0($1)
101 # MIPS64: 3c 01 00 01 lui $1, 1
102 # MIPS64-NEXT: 00 3d 08 2d daddu $1, $1, $sp
103 # MIPS64-NEXT: e0 22 80 00 sc $2, -32768($1)
105 # MIPS64R6: 34 01 80 00 ori $1, $zero, 32768
106 # MIPS64R6-NEXT: 00 3d 08 2d daddu $1, $1, $sp
107 # MIPS64R6-NEXT: 7c 22 00 26 sc $2, 0($1)
109 sc $2, -32768($sp)
110 # MIPS32: e3 a2 80 00 sc $2, -32768($sp)
112 # MIPS32R6: 27 a1 80 00 addiu $1, $sp, -32768
113 # MIPS32R6-NEXT: 7c 22 00 26 sc $2, 0($1)
115 # MIPSN32: e3 a2 80 00 sc $2, -32768($sp)
117 # MIPSN32R6: 27 a1 80 00 addiu $1, $sp, -32768
118 # MIPSN32R6-NEXT: 7c 22 00 26 sc $2, 0($1)
120 # MIPS64: e3 a2 80 00 sc $2, -32768($sp)
122 # MIPS64R6: 67 a1 80 00 daddiu $1, $sp, -32768
123 # MIPS64R6-NEXT: 7c 22 00 26 sc $2, 0($1)
125 sc $2, -32769($sp)
126 # MIPS32: 3c 01 ff ff lui $1, 65535
127 # MIPS32-NEXT: 00 3d 08 21 addu $1, $1, $sp
128 # MIPS32-NEXT: e0 22 7f ff sc $2, 32767($1)
130 # MIPS32R6: 3c 01 ff ff aui $1, $zero, 65535
131 # MIPS32R6-NEXT: 34 21 7f ff ori $1, $1, 32767
132 # MIPS32R6-NEXT: 00 3d 08 21 addu $1, $1, $sp
133 # MIPS32R6-NEXT: 7c 22 00 26 sc $2, 0($1)
135 # MIPSN32: 3c 01 ff ff lui $1, 65535
136 # MIPSN32-NEXT: 00 3d 08 21 addu $1, $1, $sp
137 # MIPSN32-NEXT: e0 22 7f ff sc $2, 32767($1)
139 # MIPSN32R6: 3c 01 ff ff aui $1, $zero, 65535
140 # MIPSN32R6-NEXT: 34 21 7f ff ori $1, $1, 32767
141 # MIPSN32R6-NEXT: 00 3d 08 21 addu $1, $1, $sp
142 # MIPSN32R6-NEXT: 7c 22 00 26 sc $2, 0($1)
144 # MIPS64: 3c 01 ff ff lui $1, 65535
145 # MIPS64-NEXT: 00 3d 08 2d daddu $1, $1, $sp
146 # MIPS64-NEXT: e0 22 7f ff sc $2, 32767($1)
148 # MIPS64R6: 3c 01 ff ff aui $1, $zero, 65535
149 # MIPS64R6-NEXT: 34 21 7f ff ori $1, $1, 32767
150 # MIPS64R6-NEXT: 00 3d 08 2d daddu $1, $1, $sp
151 # MIPS64R6-NEXT: 7c 22 00 26 sc $2, 0($1)
153 sc $2, 655987($sp)
154 # MIPS32: 3c 01 00 0a lui $1, 10
155 # MIPS32-NEXT: 00 3d 08 21 addu $1, $1, $sp
156 # MIPS32-NEXT: e0 22 02 73 sc $2, 627($1)
158 # MIPS32R6: 3c 01 00 0a aui $1, $zero, 10
159 # MIPS32R6-NEXT: 34 21 02 73 ori $1, $1, 627
160 # MIPS32R6-NEXT: 00 3d 08 21 addu $1, $1, $sp
161 # MIPS32R6-NEXT: 7c 22 00 26 sc $2, 0($1)
163 # MIPSN32: 3c 01 00 0a lui $1, 10
164 # MIPSN32-NEXT: 00 3d 08 21 addu $1, $1, $sp
165 # MIPSN32-NEXT: e0 22 02 73 sc $2, 627($1)
167 # MIPSN32R6: 3c 01 00 0a aui $1, $zero, 10
168 # MIPSN32R6-NEXT: 34 21 02 73 ori $1, $1, 627
169 # MIPSN32R6-NEXT: 00 3d 08 21 addu $1, $1, $sp
170 # MIPSN32R6-NEXT: 7c 22 00 26 sc $2, 0($1)
172 # MIPS64: 3c 01 00 0a lui $1, 10
173 # MIPS64-NEXT: 00 3d 08 2d daddu $1, $1, $sp
174 # MIPS64-NEXT: e0 22 02 73 sc $2, 627($1)
176 # MIPS64R6: 3c 01 00 0a aui $1, $zero, 10
177 # MIPS64R6-NEXT: 34 21 02 73 ori $1, $1, 627
178 # MIPS64R6-NEXT: 00 3d 08 2d daddu $1, $1, $sp
179 # MIPS64R6-NEXT: 7c 22 00 26 sc $2, 0($1)
181 sc $2, -655987($sp)
182 # MIPS32: 3c 01 ff f6 lui $1, 65526
183 # MIPS32-NEXT: 00 3d 08 21 addu $1, $1, $sp
184 # MIPS32-NEXT: e0 22 fd 8d sc $2, -627($1)
186 # MIPS32R6: 3c 01 ff f5 aui $1, $zero, 65525
187 # MIPS32R6-NEXT: 34 21 fd 8d ori $1, $1, 64909
188 # MIPS32R6-NEXT: 00 3d 08 21 addu $1, $1, $sp
189 # MIPS32R6-NEXT: 7c 22 00 26 sc $2, 0($1)
191 # MIPSN32: 3c 01 ff f6 lui $1, 65526
192 # MIPSN32-NEXT: 00 3d 08 21 addu $1, $1, $sp
193 # MIPSN32-NEXT: e0 22 fd 8d sc $2, -627($1)
195 # MIPSN32R6: 3c 01 ff f5 aui $1, $zero, 65525
196 # MIPSN32R6-NEXT: 34 21 fd 8d ori $1, $1, 64909
197 # MIPSN32R6-NEXT: 00 3d 08 21 addu $1, $1, $sp
198 # MIPSN32R6-NEXT: 7c 22 00 26 sc $2, 0($1)
200 # MIPS64: 3c 01 ff f6 lui $1, 65526
201 # MIPS64-NEXT: 00 3d 08 2d daddu $1, $1, $sp
202 # MIPS64-NEXT: e0 22 fd 8d sc $2, -627($1)
204 # MIPS64R6: 3c 01 ff f5 aui $1, $zero, 65525
205 # MIPS64R6-NEXT: 34 21 fd 8d ori $1, $1, 64909
206 # MIPS64R6-NEXT: 00 3d 08 2d daddu $1, $1, $sp
207 # MIPS64R6-NEXT: 7c 22 00 26 sc $2, 0($1)
209 sc $12, symbol
210 # MIPS32: 3c 01 00 00 lui $1, 0
211 # MIPS32-NEXT: R_MIPS_HI16 symbol
212 # MIPS32-NEXT: e0 2c 00 00 sc $12, 0($1)
213 # MIPS32-NEXT: R_MIPS_LO16 symbol
215 # MIPS32R6: 3c 01 00 00 aui $1, $zero, 0
216 # MIPS32R6-NEXT: R_MIPS_HI16 symbol
217 # MIPS32R6-NEXT: 24 21 00 00 addiu $1, $1, 0
218 # MIPS32R6-NEXT: R_MIPS_LO16 symbol
219 # MIPS32R6-NEXT: 7c 2c 00 26 sc $12, 0($1)
221 # MIPSN32: 3c 01 00 00 lui $1, 0
222 # MIPSN32-NEXT: R_MIPS_HI16 symbol
223 # MIPSN32-NEXT: e0 2c 00 00 sc $12, 0($1)
224 # MIPSN32-NEXT: R_MIPS_LO16 symbol
226 # MIPSN32R6: 3c 01 00 00 aui $1, $zero, 0
227 # MIPSN32R6-NEXT: R_MIPS_HI16 symbol
228 # MIPSN32R6-NEXT: 24 21 00 00 addiu $1, $1, 0
229 # MIPSN32R6-NEXT: R_MIPS_LO16 symbol
230 # MIPSN32R6-NEXT: 7c 2c 00 26 sc $12, 0($1)
232 # MIPS64: 3c 01 00 00 lui $1, 0
233 # MIPS64-NEXT: R_MIPS_HIGHEST/R_MIPS_NONE/R_MIPS_NONE symbol
234 # MIPS64-NEXT: 64 21 00 00 daddiu $1, $1, 0
235 # MIPS64-NEXT: R_MIPS_HIGHER/R_MIPS_NONE/R_MIPS_NONE symbol
236 # MIPS64-NEXT: 00 01 0c 38 dsll $1, $1, 16
237 # MIPS64-NEXT: 64 21 00 00 daddiu $1, $1, 0
238 # MIPS64-NEXT: R_MIPS_HI16/R_MIPS_NONE/R_MIPS_NONE symbol
239 # MIPS64-NEXT: 00 01 0c 38 dsll $1, $1, 16
240 # MIPS64-NEXT: e0 2c 00 00 sc $12, 0($1)
241 # MIPS64-NEXT: R_MIPS_LO16/R_MIPS_NONE/R_MIPS_NONE symbol
243 # MIPS64R6: 3c 01 00 00 aui $1, $zero, 0
244 # MIPS64R6-NEXT: R_MIPS_HIGHEST/R_MIPS_NONE/R_MIPS_NONE symbol
245 # MIPS64R6-NEXT: 64 21 00 00 daddiu $1, $1, 0
246 # MIPS64R6-NEXT: R_MIPS_HIGHER/R_MIPS_NONE/R_MIPS_NONE symbol
247 # MIPS64R6-NEXT: 00 01 0c 38 dsll $1, $1, 16
248 # MIPS64R6-NEXT: 64 21 00 00 daddiu $1, $1, 0
249 # MIPS64R6-NEXT: R_MIPS_HI16/R_MIPS_NONE/R_MIPS_NONE symbol
250 # MIPS64R6-NEXT: 00 01 0c 38 dsll $1, $1, 16
251 # MIPS64R6-NEXT: 64 21 00 00 daddiu $1, $1, 0
252 # MIPS64R6-NEXT: R_MIPS_LO16/R_MIPS_NONE/R_MIPS_NONE symbol
253 # MIPS64R6-NEXT: 7c 2c 00 26 sc $12, 0($1)
255 sc $12, symbol($3)
256 # MIPS32: 3c 01 00 00 lui $1, 0
257 # MIPS32-NEXT: R_MIPS_HI16 symbol
258 # MIPS32-NEXT: 00 23 08 21 addu $1, $1, $3
259 # MIPS32-NEXT: e0 2c 00 00 sc $12, 0($1)
260 # MIPS32-NEXT: R_MIPS_LO16 symbol
262 # MIPS32R6: 3c 01 00 00 aui $1, $zero, 0
263 # MIPS32R6-NEXT: R_MIPS_HI16 symbol
264 # MIPS32R6-NEXT: 24 21 00 00 addiu $1, $1, 0
265 # MIPS32R6-NEXT: R_MIPS_LO16 symbol
266 # MIPS32R6-NEXT: 00 23 08 21 addu $1, $1, $3
267 # MIPS32R6-NEXT: 7c 2c 00 26 sc $12, 0($1)
269 # MIPSN32: 3c 01 00 00 lui $1, 0
270 # MIPSN32-NEXT: R_MIPS_HI16 symbol
271 # MIPSN32-NEXT: 00 23 08 21 addu $1, $1, $3
272 # MIPSN32-NEXT: e0 2c 00 00 sc $12, 0($1)
273 # MIPSN32-NEXT: R_MIPS_LO16 symbol
275 # MIPSN32R6: 3c 01 00 00 aui $1, $zero, 0
276 # MIPSN32R6-NEXT: R_MIPS_HI16 symbol
277 # MIPSN32R6-NEXT: 24 21 00 00 addiu $1, $1, 0
278 # MIPSN32R6-NEXT: R_MIPS_LO16 symbol
279 # MIPSN32R6-NEXT: 00 23 08 21 addu $1, $1, $3
280 # MIPSN32R6-NEXT: 7c 2c 00 26 sc $12, 0($1)
282 # MIPS64: 3c 01 00 00 lui $1, 0
283 # MIPS64-NEXT: R_MIPS_HIGHEST/R_MIPS_NONE/R_MIPS_NONE symbol
284 # MIPS64-NEXT: 64 21 00 00 daddiu $1, $1, 0
285 # MIPS64-NEXT: R_MIPS_HIGHER/R_MIPS_NONE/R_MIPS_NONE symbol
286 # MIPS64-NEXT: 00 01 0c 38 dsll $1, $1, 16
287 # MIPS64-NEXT: 64 21 00 00 daddiu $1, $1, 0
288 # MIPS64-NEXT: R_MIPS_HI16/R_MIPS_NONE/R_MIPS_NONE symbol
289 # MIPS64-NEXT: 00 01 0c 38 dsll $1, $1, 16
290 # MIPS64-NEXT: 00 23 08 2d daddu $1, $1, $3
291 # MIPS64-NEXT: e0 2c 00 00 sc $12, 0($1)
292 # MIPS64-NEXT: R_MIPS_LO16/R_MIPS_NONE/R_MIPS_NONE symbol
294 # MIPS64R6: 3c 01 00 00 aui $1, $zero, 0
295 # MIPS64R6-NEXT: R_MIPS_HIGHEST/R_MIPS_NONE/R_MIPS_NONE symbol
296 # MIPS64R6-NEXT: 64 21 00 00 daddiu $1, $1, 0
297 # MIPS64R6-NEXT: R_MIPS_HIGHER/R_MIPS_NONE/R_MIPS_NONE symbol
298 # MIPS64R6-NEXT: 00 01 0c 38 dsll $1, $1, 16
299 # MIPS64R6-NEXT: 64 21 00 00 daddiu $1, $1, 0
300 # MIPS64R6-NEXT: R_MIPS_HI16/R_MIPS_NONE/R_MIPS_NONE symbol
301 # MIPS64R6-NEXT: 00 01 0c 38 dsll $1, $1, 16
302 # MIPS64R6-NEXT: 64 21 00 00 daddiu $1, $1, 0
303 # MIPS64R6-NEXT: R_MIPS_LO16/R_MIPS_NONE/R_MIPS_NONE symbol
304 # MIPS64R6-NEXT: 00 23 08 2d daddu $1, $1, $3
305 # MIPS64R6-NEXT: 7c 2c 00 26 sc $12, 0($1)
307 sc $12, symbol+8
308 # MIPS32: 3c 01 00 00 lui $1, 0
309 # MIPS32-NEXT: R_MIPS_HI16 symbol
310 # MIPS32-NEXT: e0 2c 00 08 sc $12, 8($1)
311 # MIPS32-NEXT: R_MIPS_LO16 symbol
313 # MIPS32R6: 3c 01 00 00 aui $1, $zero, 0
314 # MIPS32R6-NEXT: R_MIPS_HI16 symbol
315 # MIPS32R6-NEXT: 24 21 00 08 addiu $1, $1, 8
316 # MIPS32R6-NEXT: R_MIPS_LO16 symbol
317 # MIPS32R6-NEXT: 7c 2c 00 26 sc $12, 0($1)
319 # MIPSN32: 3c 01 00 00 lui $1, 0
320 # MIPSN32-NEXT: R_MIPS_HI16 symbol+0x8
321 # MIPSN32-NEXT: e0 2c 00 00 sc $12, 0($1)
322 # MIPSN32-NEXT: R_MIPS_LO16 symbol+0x8
324 # MIPSN32R6: 3c 01 00 00 aui $1, $zero, 0
325 # MIPSN32R6-NEXT: R_MIPS_HI16 symbol+0x8
326 # MIPSN32R6-NEXT: 24 21 00 00 addiu $1, $1, 0
327 # MIPSN32R6-NEXT: R_MIPS_LO16 symbol+0x8
328 # MIPSN32R6-NEXT: 7c 2c 00 26 sc $12, 0($1)
330 # MIPS64: 3c 01 00 00 lui $1, 0
331 # MIPS64-NEXT: R_MIPS_HIGHEST/R_MIPS_NONE/R_MIPS_NONE symbol+0x8
332 # MIPS64-NEXT: 64 21 00 00 daddiu $1, $1, 0
333 # MIPS64-NEXT: R_MIPS_HIGHER/R_MIPS_NONE/R_MIPS_NONE symbol+0x8
334 # MIPS64-NEXT: 00 01 0c 38 dsll $1, $1, 16
335 # MIPS64-NEXT: 64 21 00 00 daddiu $1, $1, 0
336 # MIPS64-NEXT: R_MIPS_HI16/R_MIPS_NONE/R_MIPS_NONE symbol+0x8
337 # MIPS64-NEXT: 00 01 0c 38 dsll $1, $1, 16
338 # MIPS64-NEXT: e0 2c 00 00 sc $12, 0($1)
339 # MIPS64-NEXT: R_MIPS_LO16/R_MIPS_NONE/R_MIPS_NONE symbol+0x8
341 # MIPS64R6: 3c 01 00 00 aui $1, $zero, 0
342 # MIPS64R6-NEXT: R_MIPS_HIGHEST/R_MIPS_NONE/R_MIPS_NONE symbol+0x8
343 # MIPS64R6-NEXT: 64 21 00 00 daddiu $1, $1, 0
344 # MIPS64R6-NEXT: R_MIPS_HIGHER/R_MIPS_NONE/R_MIPS_NONE symbol+0x8
345 # MIPS64R6-NEXT: 00 01 0c 38 dsll $1, $1, 16
346 # MIPS64R6-NEXT: 64 21 00 00 daddiu $1, $1, 0
347 # MIPS64R6-NEXT: R_MIPS_HI16/R_MIPS_NONE/R_MIPS_NONE symbol+0x8
348 # MIPS64R6-NEXT: 00 01 0c 38 dsll $1, $1, 16
349 # MIPS64R6-NEXT: 64 21 00 00 daddiu $1, $1, 0
350 # MIPS64R6-NEXT: R_MIPS_LO16/R_MIPS_NONE/R_MIPS_NONE symbol+0x8
351 # MIPS64R6-NEXT: 7c 2c 00 26 sc $12, 0($1)
353 .option pic2
355 sc $12, symbol
356 # MIPS32: 8f 81 00 00 lw $1, 0($gp)
357 # MIPS32-NEXT: R_MIPS_GOT16 symbol
358 # MIPS32-NEXT: e0 2c 00 00 sc $12, 0($1)
360 # MIPS32R6: 8f 81 00 00 lw $1, 0($gp)
361 # MIPS32R6-NEXT: R_MIPS_GOT16 symbol
362 # MIPS32R6-NEXT: 7c 2c 00 26 sc $12, 0($1)
364 # MIPSN32: 8f 81 00 00 lw $1, 0($gp)
365 # MIPSN32-NEXT: R_MIPS_GOT_DISP symbol
366 # MIPSN32-NEXT: e0 2c 00 00 sc $12, 0($1)
368 # MIPSN32R6: 8f 81 00 00 lw $1, 0($gp)
369 # MIPSN32R6-NEXT: R_MIPS_GOT_DISP symbol
370 # MIPSN32R6-NEXT: 7c 2c 00 26 sc $12, 0($1)
372 # MIPS64: df 81 00 00 ld $1, 0($gp)
373 # MIPS64-NEXT: R_MIPS_GOT_DISP/R_MIPS_NONE/R_MIPS_NONE symbol
374 # MIPS64-NEXT: e0 2c 00 00 sc $12, 0($1)
376 # MIPS64R6: df 81 00 00 ld $1, 0($gp)
377 # MIPS64R6-NEXT: R_MIPS_GOT_DISP/R_MIPS_NONE/R_MIPS_NONE symbol
378 # MIPS64R6-NEXT: 7c 2c 00 26 sc $12, 0($1)
380 sc $12, symbol+8
381 # MIPS32: 8f 81 00 00 lw $1, 0($gp)
382 # MIPS32-NEXT: R_MIPS_GOT16 symbol
383 # MIPS32-NEXT: e0 2c 00 08 sc $12, 8($1)
385 # MIPS32R6: 8f 81 00 00 lw $1, 0($gp)
386 # MIPS32R6-NEXT: R_MIPS_GOT16 symbol
387 # MIPS32R6-NEXT: 24 21 00 08 addiu $1, $1, 8
388 # MIPS32R6-NEXT: 7c 2c 00 26 sc $12, 0($1)
390 # MIPSN32: 8f 81 00 00 lw $1, 0($gp)
391 # MIPSN32-NEXT: R_MIPS_GOT_DISP symbol
392 # MIPSN32-NEXT: e0 2c 00 08 sc $12, 8($1)
394 # MIPSN32R6: 8f 81 00 00 lw $1, 0($gp)
395 # MIPSN32R6-NEXT: R_MIPS_GOT_DISP symbol
396 # MIPSN32R6-NEXT: 24 21 00 08 addiu $1, $1, 8
397 # MIPSN32R6-NEXT: 7c 2c 00 26 sc $12, 0($1)
399 # MIPS64: df 81 00 00 ld $1, 0($gp)
400 # MIPS64-NEXT: R_MIPS_GOT_DISP/R_MIPS_NONE/R_MIPS_NONE symbol
401 # MIPS64-NEXT: e0 2c 00 08 sc $12, 8($1)
403 # MIPS64R6: df 81 00 00 ld $1, 0($gp)
404 # MIPS64R6-NEXT: R_MIPS_GOT_DISP/R_MIPS_NONE/R_MIPS_NONE symbol
405 # MIPS64R6-NEXT: 64 21 00 08 daddiu $1, $1, 8
406 # MIPS64R6-NEXT: 7c 2c 00 26 sc $12, 0($1)