1 # RUN: llvm-mc %s -triple=csky -show-encoding -csky-no-aliases -mattr=+e2 -mattr=+2e3 \
2 # RUN: -mattr=+mp1e2 | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
3 # RUN: llvm-mc -filetype=obj -triple=csky -mattr=+e2 -mattr=+2e3 -mattr=+mp1e2 < %s \
4 # RUN: | llvm-objdump --mattr=+e2 --mattr=+2e3 --mattr=+mp1e2 -M no-aliases -M abi-names -d -r - \
5 # RUN: | FileCheck -check-prefixes=CHECK-ASM-AND-OBJ,CHECK-OBJ %s
7 # CHECK-ASM-AND-OBJ: addi32 a0, sp, 2
8 # CHECK-ASM: encoding: [0x0e,0xe4,0x01,0x00]
11 # CHECK-ASM-AND-OBJ: subi32 a0, sp, 2
12 # CHECK-ASM: encoding: [0x0e,0xe4,0x01,0x10]
15 # CHECK-ASM-AND-OBJ: andi32 a0, sp, 2
16 # CHECK-ASM: encoding: [0x0e,0xe4,0x02,0x20]
19 # CHECK-ASM-AND-OBJ: andni32 a0, sp, 2
20 # CHECK-ASM: encoding: [0x0e,0xe4,0x02,0x30]
23 # CHECK-ASM-AND-OBJ: xori32 a0, sp, 2
24 # CHECK-ASM: encoding: [0x0e,0xe4,0x02,0x40]
27 # CHECK-ASM-AND-OBJ: lsli32 a0, sp, 2
28 # CHECK-ASM: encoding: [0x4e,0xc4,0x20,0x48]
31 # CHECK-ASM-AND-OBJ: lsri32 a0, sp, 2
32 # CHECK-ASM: encoding: [0x4e,0xc4,0x40,0x48]
35 # CHECK-ASM-AND-OBJ: asri32 a0, sp, 2
36 # CHECK-ASM: encoding: [0x4e,0xc4,0x80,0x48]
39 # CHECK-ASM-AND-OBJ: ori32 a0, sp, 2
40 # CHECK-ASM: encoding: [0x0e,0xec,0x02,0x00]
43 # CHECK-ASM-AND-OBJ: rotli32 a0, sp, 2
44 # CHECK-ASM: encoding: [0x4e,0xc4,0x00,0x49]
47 # CHECK-ASM-AND-OBJ: incf32 a0, sp, 2
48 # CHECK-ASM: encoding: [0x0e,0xc4,0x22,0x0c]
51 # CHECK-ASM-AND-OBJ: inct32 a0, sp, 2
52 # CHECK-ASM: encoding: [0x0e,0xc4,0x42,0x0c]
55 # CHECK-ASM-AND-OBJ: decf32 a0, sp, 2
56 # CHECK-ASM: encoding: [0x0e,0xc4,0x82,0x0c]
59 # CHECK-ASM-AND-OBJ: dect32 a0, sp, 2
60 # CHECK-ASM: encoding: [0x0e,0xc4,0x02,0x0d]
63 # CHECK-ASM-AND-OBJ: decgt32 a0, sp, 2
64 # CHECK-ASM: encoding: [0x4e,0xc4,0x20,0x10]
67 # CHECK-ASM-AND-OBJ: declt32 a0, sp, 2
68 # CHECK-ASM: encoding: [0x4e,0xc4,0x40,0x10]
71 # CHECK-ASM-AND-OBJ: decne32 a0, sp, 2
72 # CHECK-ASM: encoding: [0x4e,0xc4,0x80,0x10]
75 # CHECK-ASM-AND-OBJ: btsti32 a0, 2
76 # CHECK-ASM: encoding: [0x40,0xc4,0x80,0x28]
79 # CHECK-ASM-AND-OBJ: bclri32 a0, sp, 2
80 # CHECK-ASM: encoding: [0x4e,0xc4,0x20,0x28]
83 # CHECK-ASM-AND-OBJ: bseti32 a0, sp, 2
84 # CHECK-ASM: encoding: [0x4e,0xc4,0x40,0x28]
87 # CHECK-ASM-AND-OBJ: cmpnei32 a0, 2
88 # CHECK-ASM: encoding: [0x40,0xeb,0x02,0x00]
91 # CHECK-ASM-AND-OBJ: cmphsi32 a0, 2
92 # CHECK-ASM: encoding: [0x00,0xeb,0x01,0x00]
95 # CHECK-ASM-AND-OBJ: cmplti32 a0, 2
96 # CHECK-ASM: encoding: [0x20,0xeb,0x01,0x00]
99 # CHECK-ASM-AND-OBJ: movi32 a0, 2
100 # CHECK-ASM: encoding: [0x00,0xea,0x02,0x00]
103 # CHECK-ASM-AND-OBJ: movih32 a0, 2
104 # CHECK-ASM: encoding: [0x20,0xea,0x02,0x00]
107 # CHECK-ASM-AND-OBJ: addu32 a3, l0, l1
108 # CHECK-ASM: encoding: [0xa4,0xc4,0x23,0x00]
111 # CHECK-ASM-AND-OBJ: subu32 a3, l0, l1
112 # CHECK-ASM: encoding: [0xa4,0xc4,0x83,0x00]
115 # CHECK-ASM-AND-OBJ: and32 a3, l0, l1
116 # CHECK-ASM: encoding: [0xa4,0xc4,0x23,0x20]
119 # CHECK-ASM-AND-OBJ: andn32 a3, l0, l1
120 # CHECK-ASM: encoding: [0xa4,0xc4,0x43,0x20]
123 # CHECK-ASM-AND-OBJ: or32 a3, l0, l1
124 # CHECK-ASM: encoding: [0xa4,0xc4,0x23,0x24]
127 # CHECK-ASM-AND-OBJ: xor32 a3, l0, l1
128 # CHECK-ASM: encoding: [0xa4,0xc4,0x43,0x24]
131 # CHECK-ASM-AND-OBJ: nor32 a3, l0, l1
132 # CHECK-ASM: encoding: [0xa4,0xc4,0x83,0x24]
135 # CHECK-ASM-AND-OBJ: lsl32 a3, l0, l1
136 # CHECK-ASM: encoding: [0xa4,0xc4,0x23,0x40]
139 # CHECK-ASM-AND-OBJ: rotl32 a3, l0, l1
140 # CHECK-ASM: encoding: [0xa4,0xc4,0x03,0x41]
143 # CHECK-ASM-AND-OBJ: lsr32 a3, l0, l1
144 # CHECK-ASM: encoding: [0xa4,0xc4,0x43,0x40]
147 # CHECK-ASM-AND-OBJ: asr32 a3, l0, l1
148 # CHECK-ASM: encoding: [0xa4,0xc4,0x83,0x40]
151 # CHECK-ASM-AND-OBJ: lslc32 a0, sp, 2
152 # CHECK-ASM: encoding: [0x2e,0xc4,0x20,0x4c]
155 # CHECK-ASM-AND-OBJ: lsrc32 a0, sp, 2
156 # CHECK-ASM: encoding: [0x2e,0xc4,0x40,0x4c]
159 # CHECK-ASM-AND-OBJ: asrc32 a0, sp, 2
160 # CHECK-ASM: encoding: [0x2e,0xc4,0x80,0x4c]
163 # CHECK-ASM-AND-OBJ: xsr32 a0, sp, 2
164 # CHECK-ASM: encoding: [0x2e,0xc4,0x00,0x4d]
167 # CHECK-ASM-AND-OBJ: bmaski32 a3, 17
168 # CHECK-ASM: encoding: [0x00,0xc6,0x23,0x50]
171 # CHECK-ASM-AND-OBJ: mult32 a3, l0, l1
172 # CHECK-ASM: encoding: [0xa4,0xc4,0x23,0x84]
175 # CHECK-ASM-AND-OBJ: divs32 a3, l0, l1
176 # CHECK-ASM: encoding: [0xa4,0xc4,0x43,0x80]
179 # CHECK-ASM-AND-OBJ: divu32 a3, l0, l1
180 # CHECK-ASM: encoding: [0xa4,0xc4,0x23,0x80]
183 # CHECK-ASM-AND-OBJ: ixh32 a3, l0, l1
184 # CHECK-ASM: encoding: [0xa4,0xc4,0x23,0x08]
187 # CHECK-ASM-AND-OBJ: ixw32 a3, l0, l1
188 # CHECK-ASM: encoding: [0xa4,0xc4,0x43,0x08]
191 # CHECK-ASM-AND-OBJ: ixd32 a3, l0, l1
192 # CHECK-ASM: encoding: [0xa4,0xc4,0x83,0x08]
195 # CHECK-ASM-AND-OBJ: addc32 a3, l0, l1
196 # CHECK-ASM: encoding: [0xa4,0xc4,0x43,0x00]
199 # CHECK-ASM-AND-OBJ: subc32 a3, l0, l1
200 # CHECK-ASM: encoding: [0xa4,0xc4,0x03,0x01]
203 # CHECK-OBJ: ld32.b a0, (sp, 0x2)
204 # CHECK-ASM: ld32.b a0, (sp, 2)
205 # CHECK-ASM: encoding: [0x0e,0xd8,0x02,0x00]
208 # CHECK-OBJ: ld32.bs a0, (sp, 0x2)
209 # CHECK-ASM: ld32.bs a0, (sp, 2)
210 # CHECK-ASM: encoding: [0x0e,0xd8,0x02,0x40]
213 # CHECK-OBJ: ld32.h a0, (sp, 0x2)
214 # CHECK-ASM: ld32.h a0, (sp, 2)
215 # CHECK-ASM: encoding: [0x0e,0xd8,0x01,0x10]
218 # CHECK-OBJ: ld32.hs a0, (sp, 0x2)
219 # CHECK-ASM: ld32.hs a0, (sp, 2)
220 # CHECK-ASM: encoding: [0x0e,0xd8,0x01,0x50]
223 # CHECK-OBJ: ld32.w a0, (sp, 0x4)
224 # CHECK-ASM: ld32.w a0, (sp, 4)
225 # CHECK-ASM: encoding: [0x0e,0xd8,0x01,0x20]
228 # CHECK-ASM-AND-OBJ: ldr32.b a0, (sp, l1 << 2)
229 # CHECK-ASM: encoding: [0xae,0xd0,0x80,0x00]
230 ldr32.
b a0
, (sp
, l1
<< 2)
232 # CHECK-OBJ: ldex32.w a0, (sp, 0x4)
233 # CHECK-ASM: ldex32.w a0, (sp, 4)
234 # CHECK-ASM: encoding: [0x0e,0xd8,0x01,0x70]
237 # CHECK-ASM-AND-OBJ: ldr32.bs a0, (sp, l1 << 2)
238 # CHECK-ASM: encoding: [0xae,0xd0,0x80,0x10]
239 ldr32.bs a0
, (sp
, l1
<< 2)
241 # CHECK-ASM-AND-OBJ: ldr32.h a0, (sp, l1 << 3)
242 # CHECK-ASM: encoding: [0xae,0xd0,0x00,0x05]
243 ldr32.h a0
, (sp
, l1
<< 3)
245 # CHECK-ASM-AND-OBJ: ldr32.hs a0, (sp, l1 << 3)
246 # CHECK-ASM: encoding: [0xae,0xd0,0x00,0x15]
247 ldr32.hs a0
, (sp
, l1
<< 3)
249 # CHECK-ASM-AND-OBJ: ldr32.w a0, (sp, l1 << 3)
250 # CHECK-ASM: encoding: [0xae,0xd0,0x00,0x09]
251 ldr32.w a0
, (sp
, l1
<< 3)
253 # CHECK-OBJ: st32.b a0, (sp, 0x2)
254 # CHECK-ASM: st32.b a0, (sp, 2)
255 # CHECK-ASM: encoding: [0x0e,0xdc,0x02,0x00]
258 # CHECK-OBJ: st32.h a0, (sp, 0x2)
259 # CHECK-ASM: st32.h a0, (sp, 2)
260 # CHECK-ASM: encoding: [0x0e,0xdc,0x01,0x10]
263 # CHECK-OBJ: st32.w a0, (sp, 0x4)
264 # CHECK-ASM: st32.w a0, (sp, 4)
265 # CHECK-ASM: encoding: [0x0e,0xdc,0x01,0x20]
268 # CHECK-OBJ: stex32.w a0, (sp, 0x4)
269 # CHECK-ASM: stex32.w a0, (sp, 4)
270 # CHECK-ASM: encoding: [0x0e,0xdc,0x01,0x70]
273 # CHECK-ASM-AND-OBJ: str32.b a0, (sp, l1 << 2)
274 # CHECK-ASM: encoding: [0xae,0xd4,0x80,0x00]
275 str32.
b a0
, (sp
, l1
<< 2)
277 # CHECK-ASM-AND-OBJ: str32.h a0, (sp, l1 << 3)
278 # CHECK-ASM: encoding: [0xae,0xd4,0x00,0x05]
279 str32.h a0
, (sp
, l1
<< 3)
281 # CHECK-ASM-AND-OBJ: str32.w a0, (sp, l1 << 3)
282 # CHECK-ASM: encoding: [0xae,0xd4,0x00,0x09]
283 str32.w a0
, (sp
, l1
<< 3)
285 # CHECK-ASM-AND-OBJ: ldm32 a1-a2, (a0)
286 # CHECK-ASM: encoding: [0x20,0xd0,0x21,0x1c]
289 # CHECK-ASM-AND-OBJ: stm32 a1-a2, (a0)
290 # CHECK-ASM: encoding: [0x20,0xd4,0x21,0x1c]
293 # CHECK-ASM-AND-OBJ: ldm32 l0-l3, (a0)
294 # CHECK-ASM: encoding: [0x80,0xd0,0x23,0x1c]
297 # CHECK-ASM-AND-OBJ: stm32 l0-l3, (a0)
298 # CHECK-ASM: encoding: [0x80,0xd4,0x23,0x1c]
301 # CHECK-ASM-AND-OBJ: brev32 a3, l0
302 # CHECK-ASM: encoding: [0x04,0xc4,0x03,0x62]
305 # CHECK-ASM-AND-OBJ: abs32 a3, l0
306 # CHECK-ASM: encoding: [0x04,0xc4,0x03,0x02]
309 # CHECK-ASM-AND-OBJ: bgenr32 a3, l0
310 # CHECK-ASM: encoding: [0x04,0xc4,0x43,0x50]
313 # CHECK-ASM-AND-OBJ: revb32 a3, l0
314 # CHECK-ASM: encoding: [0x04,0xc4,0x83,0x60]
317 # CHECK-ASM-AND-OBJ: revh32 a3, l0
318 # CHECK-ASM: encoding: [0x04,0xc4,0x03,0x61]
321 # CHECK-ASM-AND-OBJ: ff0.32 a3, l0
322 # CHECK-ASM: encoding: [0x04,0xc4,0x23,0x7c]
325 # CHECK-ASM-AND-OBJ: ff1.32 a3, l0
326 # CHECK-ASM: encoding: [0x04,0xc4,0x43,0x7c]
329 # CHECK-ASM-AND-OBJ: xtrb0.32 a3, l0
330 # CHECK-ASM: encoding: [0x04,0xc4,0x23,0x70]
333 # CHECK-ASM-AND-OBJ: xtrb1.32 a3, l0
334 # CHECK-ASM: encoding: [0x04,0xc4,0x43,0x70]
337 # CHECK-ASM-AND-OBJ: xtrb2.32 a3, l0
338 # CHECK-ASM: encoding: [0x04,0xc4,0x83,0x70]
341 # CHECK-ASM-AND-OBJ: xtrb3.32 a3, l0
342 # CHECK-ASM: encoding: [0x04,0xc4,0x03,0x71]
345 # CHECK-ASM-AND-OBJ: mvc32 a3
346 # CHECK-ASM: encoding: [0x00,0xc4,0x03,0x05]
349 # CHECK-ASM-AND-OBJ: mvcv32 a3
350 # CHECK-ASM: encoding: [0x00,0xc4,0x03,0x06]
353 # CHECK-ASM-AND-OBJ: cmpne32 a3, l0
354 # CHECK-ASM: encoding: [0x83,0xc4,0x80,0x04]
357 # CHECK-ASM-AND-OBJ: cmphs32 a3, l0
358 # CHECK-ASM: encoding: [0x83,0xc4,0x20,0x04]
361 # CHECK-ASM-AND-OBJ: cmplt32 a3, l0
362 # CHECK-ASM: encoding: [0x83,0xc4,0x40,0x04]
365 # CHECK-ASM-AND-OBJ: zext32 a3, l0, 7, 0
366 # CHECK-ASM: encoding: [0x04,0xc4,0xe3,0x54]
369 # CHECK-ASM-AND-OBJ: sext32 a3, l0, 7, 0
370 # CHECK-ASM: encoding: [0x04,0xc4,0xe3,0x58]
373 # CHECK-ASM-AND-OBJ: ldm32 l1-l3, (a0)
374 # CHECK-ASM: encoding: [0xa0,0xd0,0x22,0x1c]
377 # CHECK-ASM-AND-OBJ: stm32 l1-l3, (a0)
378 # CHECK-ASM: encoding: [0xa0,0xd4,0x22,0x1c]
381 # CHECK-ASM-AND-OBJ: setc32
382 # CHECK-ASM: encoding: [0x00,0xc4,0x20,0x04]
385 # CHECK-ASM-AND-OBJ: clrc32
386 # CHECK-ASM: encoding: [0x00,0xc4,0x80,0x04]
389 # CHECK-ASM-AND-OBJ: tst32 a3, l0
390 # CHECK-ASM: encoding: [0x83,0xc4,0x80,0x20]
393 # CHECK-ASM-AND-OBJ: tstnbz32 a3
394 # CHECK-ASM: encoding: [0x03,0xc4,0x00,0x21]
397 # CHECK-ASM-AND-OBJ: clrf32 a3
398 # CHECK-ASM: encoding: [0x60,0xc4,0x20,0x2c]
401 # CHECK-ASM-AND-OBJ: clrt32 a3
402 # CHECK-ASM: encoding: [0x60,0xc4,0x40,0x2c]
405 # CHECK-ASM-AND-OBJ: bar.brwarw
406 # CHECK-ASM: encoding: [0x00,0xc0,0x2f,0x84]
409 # CHECK-ASM-AND-OBJ: bar.brwarws
410 # CHECK-ASM: encoding: [0x00,0xc2,0x2f,0x84]
413 # CHECK-ASM-AND-OBJ: bar.brarw
414 # CHECK-ASM: encoding: [0x00,0xc0,0x27,0x84]
417 # CHECK-ASM-AND-OBJ: bar.brarws
418 # CHECK-ASM: encoding: [0x00,0xc2,0x27,0x84]
421 # CHECK-ASM-AND-OBJ: bar.brwaw
422 # CHECK-ASM: encoding: [0x00,0xc0,0x2e,0x84]
425 # CHECK-ASM-AND-OBJ: bar.brwaws
426 # CHECK-ASM: encoding: [0x00,0xc2,0x2e,0x84]
429 # CHECK-ASM-AND-OBJ: bar.brar
430 # CHECK-ASM: encoding: [0x00,0xc0,0x25,0x84]
433 # CHECK-ASM-AND-OBJ: bar.brars
434 # CHECK-ASM: encoding: [0x00,0xc2,0x25,0x84]
437 # CHECK-ASM-AND-OBJ: bar.bwaw
438 # CHECK-ASM: encoding: [0x00,0xc0,0x2a,0x84]
441 # CHECK-ASM-AND-OBJ: bar.bwaws
442 # CHECK-ASM: encoding: [0x00,0xc2,0x2a,0x84]
445 # CHECK-ASM-AND-OBJ: sync32
446 # CHECK-ASM: encoding: [0x00,0xc0,0x20,0x04]
449 # CHECK-ASM-AND-OBJ: sync32.s
450 # CHECK-ASM: encoding: [0x00,0xc2,0x20,0x04]
453 # CHECK-ASM-AND-OBJ: sync32.i
454 # CHECK-ASM: encoding: [0x20,0xc0,0x20,0x04]
457 # CHECK-ASM-AND-OBJ: sync32.is
458 # CHECK-ASM: encoding: [0x20,0xc2,0x20,0x04]
461 # CHECK-ASM-AND-OBJ: rfi32
462 # CHECK-ASM: encoding: [0x00,0xc0,0x20,0x44]
465 # CHECK-ASM-AND-OBJ: stop32
466 # CHECK-ASM: encoding: [0x00,0xc0,0x20,0x48]
469 # CHECK-ASM-AND-OBJ: wait32
470 # CHECK-ASM: encoding: [0x00,0xc0,0x20,0x4c]
473 # CHECK-ASM-AND-OBJ: doze32
474 # CHECK-ASM: encoding: [0x00,0xc0,0x20,0x50]
477 # CHECK-ASM: br32 .L.test
478 # CHECK-ASM: encoding: [A,0xe8'A',A,A]
479 # CHECK-ASM: fixup A - offset: 0, value: .L.test, kind: fixup_csky_pcrel_imm16_scale2
483 # CHECK-ASM: bt32 .L.test2
484 # CHECK-ASM: encoding: [0x60'A',0xe8'A',A,A]
485 # CHECK-ASM: fixup A - offset: 0, value: .L.test2, kind: fixup_csky_pcrel_imm16_scale2
489 # CHECK-ASM: bf32 .L.test3
490 # CHECK-ASM: encoding: [0x40'A',0xe8'A',A,A]
491 # CHECK-ASM: fixup A - offset: 0, value: .L.test3, kind: fixup_csky_pcrel_imm16_scale2
495 # CHECK-ASM: bez32 a0, .L.test4
496 # CHECK-ASM: encoding: [A,0xe9'A',A,A]
497 # CHECK-ASM: fixup A - offset: 0, value: .L.test4, kind: fixup_csky_pcrel_imm16_scale2
501 # CHECK-ASM: bnez32 a0, .L.test5
502 # CHECK-ASM: encoding: [0x20'A',0xe9'A',A,A]
503 # CHECK-ASM: fixup A - offset: 0, value: .L.test5, kind: fixup_csky_pcrel_imm16_scale2
507 # CHECK-ASM: bhz32 a0, .L.test6
508 # CHECK-ASM: encoding: [0x40'A',0xe9'A',A,A]
509 # CHECK-ASM: fixup A - offset: 0, value: .L.test6, kind: fixup_csky_pcrel_imm16_scale2
513 # CHECK-ASM: blsz32 a0, .L.test7
514 # CHECK-ASM: encoding: [0x60'A',0xe9'A',A,A]
515 # CHECK-ASM: fixup A - offset: 0, value: .L.test7, kind: fixup_csky_pcrel_imm16_scale2
519 # CHECK-ASM: blz32 a0, .L.test8
520 # CHECK-ASM: encoding: [0x80'A',0xe9'A',A,A]
521 # CHECK-ASM: fixup A - offset: 0, value: .L.test8, kind: fixup_csky_pcrel_imm16_scale2
525 # CHECK-ASM: bhsz32 a0, .L.test9
526 # CHECK-ASM: encoding: [0xa0'A',0xe9'A',A,A]
527 # CHECK-ASM: fixup A - offset: 0, value: .L.test9, kind: fixup_csky_pcrel_imm16_scale2
531 # CHECK-ASM: jmp32 a3
532 # CHECK-ASM: encoding: [0xc3,0xe8,0x00,0x00]
535 # CHECK-ASM: jmpi32 [.L.test10]
536 # CHECK-ASM: encoding: [0xc0'A',0xea'A',A,A]
537 # CHECK-ASM: fixup A - offset: 0, value: .L.test10, kind: fixup_csky_pcrel_uimm16_scale4
541 # CHECK-ASM: bsr32 .L.test11
542 # CHECK-ASM: encoding: [A,0xe0'A',A,A]
543 # CHECK-ASM: fixup A - offset: 0, value: .L.test11, kind: fixup_csky_pcrel_imm26_scale2
547 # CHECK-ASM: jsr32 a3
548 # CHECK-ASM: encoding: [0xe3,0xe8,0x00,0x00]
551 # CHECK-ASM: jsri32 [.L.test12]
552 # CHECK-ASM: encoding: [0xe0'A',0xea'A',A,A]
553 # CHECK-ASM: fixup A - offset: 0, value: .L.test12, kind: fixup_csky_pcrel_uimm16_scale4
557 # CHECK-ASM: grs32 a0, .L.test13
558 # CHECK-ASM: encoding: [0x0c'A',0xcc'A',A,A]
559 # CHECK-ASM: fixup A - offset: 0, value: .L.test13, kind: fixup_csky_pcrel_imm18_scale2
563 # CHECK-ASM: lrw32 a0, [.L.test14]
564 # CHECK-ASM: encoding: [0x80'A',0xea'A',A,A]
565 # CHECK-ASM: fixup A - offset: 0, value: .L.test14, kind: fixup_csky_pcrel_uimm16_scale4
567 lrw32 a0
, [.L.test14]
569 # RUN: not llvm-mc -triple csky -mattr=+e2 -mattr=+2e3 --defsym=ERR=1 < %s 2>&1 | FileCheck %s
573 # uimm12/oimm12/nimm12
574 addi32 a0
, a0
, 0 # CHECK: :[[#@LINE]]:16: error: immediate must be an integer in the range [1, 4096]
575 subi32 a0
, a0
, 4097 # CHECK: :[[#@LINE]]:16: error: immediate must be an integer in the range [1, 4096]
576 andi32 a0
, a0
, 4096 # CHECK: :[[#@LINE]]:16: error: immediate must be an integer in the range [0, 4095]
577 andni32 a0
, a0
, 4096 # CHECK: :[[#@LINE]]:17: error: immediate must be an integer in the range [0, 4095]
578 xori32 a0
, a0
, 4096 # CHECK: :[[#@LINE]]:16: error: immediate must be an integer in the range [0, 4095]
582 lsli32 a0
, a0
, 32 # CHECK: :[[#@LINE]]:16: error: immediate must be an integer in the range [0, 31]
583 lsri32 a0
, a0
, 32 # CHECK: :[[#@LINE]]:16: error: immediate must be an integer in the range [0, 31]
584 asri32 a0
, a0
, 32 # CHECK: :[[#@LINE]]:16: error: immediate must be an integer in the range [0, 31]
585 rotli32 a0
, a0
, 32 # CHECK: :[[@LINE]]:17: error: immediate must be an integer in the range [0, 31]
587 # uimm12(shift0)/uimm12_1/uimm12_2
588 ld32.
b a0
, (a0
, -1) # CHECK: :[[@LINE]]:17: error: immediate must be an integer in the range [0, 4095]
589 ld32.h a0
, (a0
, 4095) # CHECK: :[[@LINE]]:17: error: immediate must be a multiple of 2 bytes in the range [0, 4094]
590 ld32.h a0
, (a0
, 4093) # CHECK: :[[@LINE]]:17: error: immediate must be a multiple of 2 bytes in the range [0, 4094]
591 ld32.w a0
, (a0
, 4093) # CHECK: :[[@LINE]]:17: error: immediate must be a multiple of 4 bytes in the range [0, 4092]
592 ld32.w a0
, (a0
, 2) # CHECK: :[[@LINE]]:17: error: immediate must be a multiple of 4 bytes in the range [0, 4092]
593 ldr32.
b a0
, (a0
, a1
<< 4) # CHECK: :[[@LINE]]:24: error: immediate must be an integer in the range [0, 3]
594 ldr32.bs a0
, (a0
, a1
<< 4) # CHECK: :[[@LINE]]:25: error: immediate must be an integer in the range [0, 3]
595 ldr32.h a0
, (a0
, a1
<< -1) # CHECK: :[[@LINE]]:24: error: immediate must be an integer in the range [0, 3]
596 ldr32.hs a0
, (a0
, a1
<< 4) # CHECK: :[[@LINE]]:25: error: immediate must be an integer in the range [0, 3]
597 ldr32.w a0
, (a0
, a1
<< 4) # CHECK: :[[@LINE]]:24: error: immediate must be an integer in the range [0, 3]
599 st32.
b a0
, (a0
, -1) # CHECK: :[[@LINE]]:17: error: immediate must be an integer in the range [0, 4095]
600 st32.h a0
, (a0
, 4095) # CHECK: :[[@LINE]]:17: error: immediate must be a multiple of 2 bytes in the range [0, 4094]
601 st32.h a0
, (a0
, 4093) # CHECK: :[[@LINE]]:17: error: immediate must be a multiple of 2 bytes in the range [0, 4094]
602 st32.w a0
, (a0
, 4093) # CHECK: :[[@LINE]]:17: error: immediate must be a multiple of 4 bytes in the range [0, 4092]
603 st32.w a0
, (a0
, 2) # CHECK: :[[@LINE]]:17: error: immediate must be a multiple of 4 bytes in the range [0, 4092]
605 str32.
b a0
, (a0
, a1
<< 4) # CHECK: :[[@LINE]]:24: error: immediate must be an integer in the range [0, 3]
606 str32.h a0
, (a0
, a1
<< -1) # CHECK: :[[@LINE]]:24: error: immediate must be an integer in the range [0, 3]
607 str32.w a0
, (a0
, a1
<< 4) # CHECK: :[[@LINE]]:24: error: immediate must be an integer in the range [0, 3]
610 ori32 a0
, a0
, 0x10000 # CHECK: :[[@LINE]]:15: error: immediate must be an integer in the range [0, 65535]
611 cmpnei32 a0
, 0x10000 # CHECK: :[[@LINE]]:14: error: immediate must be an integer in the range [0, 65535]
612 cmphsi32 a0
, 0x10001 # CHECK: :[[@LINE]]:14: error: immediate must be an integer in the range [1, 65536]
613 cmplti32 a0
, 0 # CHECK: :[[@LINE]]:14: error: immediate must be an integer in the range [1, 65536]
614 movi32 a0
, 0x10000 # CHECK: :[[@LINE]]:12: error: immediate must be an integer in the range [0, 65535]
615 movih32 a0
, 0x10000 # CHECK: :[[@LINE]]:13: error: immediate must be an integer in the range [0, 65535]
618 subs t0
, t2
, t1
# CHECK: :[[#@LINE]]:1: error: unrecognized instruction mnemonic
619 nandi t0
, t2
, 0 # CHECK: :[[#@LINE]]:1: error: unrecognized instruction mnemonic
621 # Invalid register names
622 addi32 foo
, sp
, 10 # CHECK: :[[#@LINE]]:8: error: unknown operand
623 lsli32 a10
, a2
, 0x20 # CHECK: :[[#@LINE]]:8: error: unknown operand
624 asri32 x32
, s0
, s0
# CHECK: :[[#@LINE]]:8: error: unknown operand
626 # Invalid operand types
627 xori32 sp
, 22, 220 # CHECK: :[[#@LINE]]:12: error: invalid operand for instruction
628 subu32 t0
, t2
, 1 # CHECK: :[[#@LINE]]:16: error: invalid operand for instruction
631 subi32 t2
, t3
, 0x50, 0x60 # CHECK: :[[@LINE]]:22: error: invalid operand for instruction
634 xori32 a0
, a1
# CHECK: :[[#@LINE]]:1: error: too few operands for instruction
635 xor32 a0
, a2
# CHECK: :[[#@LINE]]:1: error: too few operands for instruction
637 ldm32 a1-a33
, (a1
) # CHECK: :[[#@LINE]]:10: error: invalid register
638 stm32 a1-a33
, (a1
) # CHECK: :[[#@LINE]]:10: error: invalid register
640 ldq32 a1-a2
, (a1
) # CHECK: :[[#@LINE]]:1: error: Register sequence is not valid. 'r4-r7' expected
641 stq32 a1-a3
, (a1
) # CHECK: :[[#@LINE]]:1: error: Register sequence is not valid. 'r4-r7' expected