1# RUN: llvm-mc -triple=arc -disassemble %s | FileCheck %s
2
3# CHECK: abs_s %r0, %r1
40x31 0x78
5
6# CHECK: add_s %r0, %r1, %r2
70x58 0x61
8
9# CHECK: add_s %r0, %r0, %fp
100x63 0x70
11
12# CHECK: add_s %fp, %fp, -1
130x67 0x77
14
15# CHECK: add_s %fp, %fp, 6
160x67 0x76
17
18# CHECK: add_s %r0, %r0, 287454020
190xc3 0x70 0x22 0x11 0x44 0x33
20
21# CHECK: add_s 0, 287454020, 4
220xc7 0x74 0x22 0x11 0x44 0x33
23
24# CHECK: add_s %r0, %sp, 64
250x90 0xc0
26
27# CHECK: add_s %r0, %r0, 64
280x40 0xe0
29
30# CHECK: add_s %r0, %r1, 7
310x07 0x69
32
33# CHECK: add_s %sp, %sp, 64
340xb0 0xc0
35
36# CHECK: add_s %r0, %gp, -4
370xff 0xcf
38
39# CHECK: add_s %r0, %r1, 4
400x0c 0x49
41
42# CHECK: add_s %r1, %r0, 4
430x8c 0x48
44
45# CHECK: add1_s %r0, %r0, %r1
460x34 0x78
47
48# CHECK: add2_s %r0, %r0, %r1
490x35 0x78
50
51# CHECK: add3_s %r0, %r0, %r1
520x36 0x78
53
54# CHECK: and_s %r0, %r0, %r1
550x24 0x78
56
57# CHECK: asl_s %r0, %r1
580x3b 0x78
59
60# CHECK: asl_s %r1, %r0, 4
610x34 0x68
62
63# CHECK: asl_s %r0, %r0, %r1
640x38 0x78
65
66# CHECK: asl_s %r0, %r0, 16
670x10 0xb8
68
69# CHECK: asr_s %r0, %r1
700x3c 0x78
71
72# CHECK: asr_s %r1, %r0, 4
730x3c 0x68
74
75# CHECK: asr_s %r0, %r0, %r1
760x3a 0x78
77
78# CHECK: asr_s %r0, %r0, 16
790x50 0xb8
80
81# CHECK: b_s 256
820x80 0xf0
83
84# CHECK: b_s -4
850xfe 0xf1
86
87# CHECK: beq_s -4
880xfe 0xf3
89
90# CHECK: bne_s -4
910xfe 0xf5
92
93# CHECK: bgt_s -4
940x3e 0xf6
95
96# CHECK: bge_s -4
970x7e 0xf6
98
99# CHECK: blt_s -4
1000xbe 0xf6
101
102# CHECK: ble_s -4
1030xfe 0xf6
104
105# CHECK: bhi_s -4
1060x3e 0xf7
107
108# CHECK: bhs_s -4
1090x7e 0xf7
110
111# CHECK: blo_s -4
1120xbe 0xf7
113
114# CHECK: bls_s -4
1150xfe 0xf7
116
117# CHECK: bclr_s %r0, %r0, 24
1180xb8 0xb8
119
120# CHECK: bic_s %r0, %r0, %r1
1210x26 0x78
122
123# CHECK: bl_s -256
1240xc0 0xff
125
126# CHECK: bmsk_s %r0, %r0, 24
1270xd8 0xb8
128
129# CHECK: brne_s %r0, 0, -128
1300xc0 0xe8
131
132# CHECK: breq_s %r0, 0, -128
1330x40 0xe8
134
135# CHECK: brk_s
1360xff 0x7f
137
138# CHECK: bset_s %r0, %r0, 24
1390x98 0xb8
140
141# CHECK: btst_s %r0, 24
1420xf8 0xb8
143
144# CHECK: cmp_s %r0, %sp
1450x93 0x70
146
147# CHECK: cmp_s %sp, -1
1480x97 0x77
149
150# CHECK: cmp_s %r2, 64
1510xc0 0xe2
152
153# CHECK: ei_s 512
1540x00 0x5e
155
156# CHECK: enter_s 16
1570xe0 0xc1
158
159# CHECK: extb_s %r0, %r1
1600x2f 0x78
161
162# CHECK: exth_s %r0, %r1
1630x30 0x78
164
165# CHECK: j_s [%r0]
1660x00 0x78
167
168# CHECK: j_s [%blink]
1690xe0 0x7e
170
171# CHECK: j_s.d [%r0]
1720x20 0x78
173
174# CHECK: j_s.d [%blink]
1750xe0 0x7f
176
177# CHECK: jeq_s [%blink]
1780xe0 0x7c
179
180# CHECK: jne_s [%blink]
1810xe0 0x7d
182
183# CHECK: jl_s [%r0]
1840x40 0x78
185
186# CHECK: jl_s.d [%r0]
1870x60 0x78
188
189# CHECK: jli_s 512
1900x00 0x5a
191
192# CHECK: ld_s %r0, [%r1, %r2]
1930x40 0x61
194
195# CHECK: ld_s %r0, [%sp, 64]
1960x10 0xc0
197
198# CHECK: ld_s %r0, [%pcl, 512]
1990x80 0xd0
200
201# CHECK: ld_s %r1, [%r0, 64]
2020x30 0x80
203
204# CHECK: ld_s %r0, [%gp, -1024]
2050x00 0xc9
206
207# CHECK: ldb_s %r0, [%r1, %r2]
2080x48 0x61
209
210# CHECK: ldb_s %r0, [%sp, 64]
2110x30 0xc0
212
213# CHECK: ldb_s %r1, [%r0, 16]
2140x30 0x88
215
216# CHECK: ldb_s %r0, [%gp, -256]
2170x00 0xcb
218
219# CHECK: ldh_s %r0, [%r1, %r2]
2200x50 0x61
221
222# CHECK: ldh_s %r1, [%r0, 32]
2230x30 0x90
224
225# CHECK: ldh_s %r0, [%gp, -512]
2260x00 0xcd
227
228# CHECK: ldh_s.x %r1, [%r0, 32]
2290x30 0x98
230
231# CHECK: ld_s %r0, [%r17, 8]
2320x36 0x40
233
234# CHECK: ld_s %r1, [%r17, 8]
2350x36 0x41
236
237# CHECK: ld_s %r2, [%r17, 8]
2380x36 0x42
239
240# CHECK: ld_s %r3, [%r17, 8]
2410x36 0x43
242
243# CHECK: ld_s.as %r0, [%r1, %r2]
2440x40 0x49
245
246# CHECK: ld_s %r1, [%gp, -1024]
2470x00 0x54
248
249# CHECK: ldi_s %r0, [64]
2500x88 0x50
251
252# CHECK: leave_s 16
2530xc0 0xc1
254
255# CHECK: lsr_s %r0, %r1
2560x3d 0x78
257
258# CHECK: lsr_s %r0, %r0, %r1
2590x39 0x78
260
261# CHECK: lsr_s %r0, %r0, 16
2620x30 0xb8
263
264# CHECK: mov_s %r17, -1
2650x2e 0x77
266
267# CHECK: mov_s 0, 5
2680xcf 0x75
269
270# CHECK: mov_s.ne %r0, %r17
2710x3e 0x70
272
273# CHECK: mov_s.ne %r0, 1024
2740xdf 0x70 0x00 0x00 0x00 0x04
275
276# CHECK: mov_s %r0, 128
2770x80 0xd8
278
279# CHECK: mov_s %r16, %r17
2800x32 0x40
281
282# CHECK: mov_s %r16, 1024
2830xd3 0x40 0x00 0x00 0x00 0x04
284
285# CHECK: mov_s 0, %r17
2860x3a 0x46
287
288# CHECK: mov_s 0, 1024
2890xdb 0x46 0x00 0x00 0x00 0x04
290
291# CHECK: mpy_s %r0, %r0, %r1
2920x2c 0x78
293
294# CHECK: mpyuw_s %r0, %r0, %r1
2950x2a 0x78
296
297# CHECK: mpyw_s %r0, %r0, %r1
2980x29 0x78
299
300# CHECK: neg_s %r0, %r1
3010x33 0x78
302
303# CHECK: nop_s
3040xe0 0x78
305
306# CHECK: not_s %r0, %r1
3070x32 0x78
308
309# CHECK: or_s %r0, %r0, %r1
3100x25 0x78
311
312# CHECK: pop_s %r0
3130xe1 0xc0
314
315# CHECK: pop_s %blink
3160xd1 0xc0
317
318# CHECK: push_s %r0
3190xc1 0xc0
320
321# CHECK: push_s %blink
3220xf1 0xc0
323
324# CHECK: sexb_s %r0, %r1
3250x2d 0x78
326
327# CHECK: sexh_s %r0, %r1
3280x2e 0x78
329
330# CHECK: st_s %r0, [%sp, 64]
3310x50 0xc0
332
333# CHECK: st_s %r1, [%r0, 64]
3340x30 0xa0
335
336# CHECK: st_s %r0, [%gp, -1024]
3370x10 0x54
338
339# CHECK: stb_s %r0, [%sp, 64]
3400x70 0xc0
341
342# CHECK: stb_s %r1, [%r0, 16]
3430x30 0xa8
344
345# CHECK: sth_s %r1, [%r0, 32]
3460x30 0xb0
347
348# CHECK: sub_s %r1, %r0, 4
3490x2c 0x68
350
351# CHECK: sub_s.ne %r0, %r0, %r0
3520xc0 0x78
353
354# CHECK: sub_s %r0, %r0, %r1
3550x22 0x78
356
357# CHECK: sub_s %r0, %r0, 16
3580x70 0xb8
359
360# CHECK: sub_s %sp, %sp, 64
3610xb0 0xc1
362
363# CHECK: sub_s %r0, %r1, %r2
3640x50 0x49
365
366# CHECK: swi_s
3670xe0 0x7a
368
369# CHECK: trap_s 32
3700x1e 0x7c
371
372# CHECK: tst_s %r0, %r1
3730x2b 0x78
374
375# CHECK: unimp_s
3760xe0 0x79
377
378# CHECK: xor_s %r0, %r0, %r1
3790x27 0x78
380