• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llvm-mc --disassemble %s -triple powerpc64-unknown-unknown -mcpu=pwr7 | FileCheck %s
2
3# FIXME: test b target
4
5# FIXME: test ba target
6
7# FIXME: test bl target
8
9# FIXME: test bla target
10
11# FIXME: test bc 4, 10, target
12
13# FIXME: test bca 4, 10, target
14
15# FIXME: test bcl 4, 10, target
16
17# FIXME: test bcla 4, 10, target
18
19# CHECK: bclr 4, 10, 3
200x4c 0x8a 0x18 0x20
21
22# CHECK: bclr 4, 10, 0
230x4c 0x8a 0x00 0x20
24
25# CHECK: bclrl 4, 10, 3
260x4c 0x8a 0x18 0x21
27
28# CHECK: bclrl 4, 10, 0
290x4c 0x8a 0x00 0x21
30
31# CHECK: bcctr 4, 10, 3
320x4c 0x8a 0x1c 0x20
33
34# CHECK: bcctr 4, 10, 0
350x4c 0x8a 0x04 0x20
36
37# CHECK: bcctrl 4, 10, 3
380x4c 0x8a 0x1c 0x21
39
40# CHECK: bcctrl 4, 10, 0
410x4c 0x8a 0x04 0x21
42
43# CHECK: crand 2, 3, 4
440x4c 0x43 0x22 0x02
45
46# CHECK: crnand 2, 3, 4
470x4c 0x43 0x21 0xc2
48
49# CHECK: cror 2, 3, 4
500x4c 0x43 0x23 0x82
51
52# CHECK: crxor 2, 3, 4
530x4c 0x43 0x21 0x82
54
55# CHECK: crnor 2, 3, 4
560x4c 0x43 0x20 0x42
57
58# CHECK: creqv 2, 3, 4
590x4c 0x43 0x22 0x42
60
61# CHECK: crandc 2, 3, 4
620x4c 0x43 0x21 0x02
63
64# CHECK: crorc 2, 3, 4
650x4c 0x43 0x23 0x42
66
67# CHECK: mcrf 2, 3
680x4d 0x0c 0x00 0x00
69
70# CHECK: sc 1
710x44 0x00 0x00 0x22
72
73# CHECK: sc 0
740x44 0x00 0x00 0x02
75
76# CHECK: lbz 2, 128(4)
770x88 0x44 0x00 0x80
78
79# CHECK: lbzx 2, 3, 4
800x7c 0x43 0x20 0xae
81
82# CHECK: lbzu 2, 128(4)
830x8c 0x44 0x00 0x80
84
85# CHECK: lbzux 2, 3, 4
860x7c 0x43 0x20 0xee
87
88# CHECK: lhz 2, 128(4)
890xa0 0x44 0x00 0x80
90
91# CHECK: lhzx 2, 3, 4
920x7c 0x43 0x22 0x2e
93
94# CHECK: lhzu 2, 128(4)
950xa4 0x44 0x00 0x80
96
97# CHECK: lhzux 2, 3, 4
980x7c 0x43 0x22 0x6e
99
100# CHECK: lha 2, 128(4)
1010xa8 0x44 0x00 0x80
102
103# CHECK: lhax 2, 3, 4
1040x7c 0x43 0x22 0xae
105
106# CHECK: lhau 2, 128(4)
1070xac 0x44 0x00 0x80
108
109# CHECK: lhaux 2, 3, 4
1100x7c 0x43 0x22 0xee
111
112# CHECK: lwz 2, 128(4)
1130x80 0x44 0x00 0x80
114
115# CHECK: lwzx 2, 3, 4
1160x7c 0x43 0x20 0x2e
117
118# CHECK: lwzu 2, 128(4)
1190x84 0x44 0x00 0x80
120
121# CHECK: lwzux 2, 3, 4
1220x7c 0x43 0x20 0x6e
123
124# CHECK: lwa 2, 128(4)
1250xe8 0x44 0x00 0x82
126
127# CHECK: lwax 2, 3, 4
1280x7c 0x43 0x22 0xaa
129
130# CHECK: lwaux 2, 3, 4
1310x7c 0x43 0x22 0xea
132
133# CHECK: ld 2, 128(4)
1340xe8 0x44 0x00 0x80
135
136# CHECK: ldx 2, 3, 4
1370x7c 0x43 0x20 0x2a
138
139# CHECK: ldu 2, 128(4)
1400xe8 0x44 0x00 0x81
141
142# CHECK: ldux 2, 3, 4
1430x7c 0x43 0x20 0x6a
144
145# CHECK: stb 2, 128(4)
1460x98 0x44 0x00 0x80
147
148# CHECK: stbx 2, 3, 4
1490x7c 0x43 0x21 0xae
150
151# CHECK: stbu 2, 128(4)
1520x9c 0x44 0x00 0x80
153
154# CHECK: stbux 2, 3, 4
1550x7c 0x43 0x21 0xee
156
157# CHECK: sth 2, 128(4)
1580xb0 0x44 0x00 0x80
159
160# CHECK: sthx 2, 3, 4
1610x7c 0x43 0x23 0x2e
162
163# CHECK: sthu 2, 128(4)
1640xb4 0x44 0x00 0x80
165
166# CHECK: sthux 2, 3, 4
1670x7c 0x43 0x23 0x6e
168
169# CHECK: stw 2, 128(4)
1700x90 0x44 0x00 0x80
171
172# CHECK: stwx 2, 3, 4
1730x7c 0x43 0x21 0x2e
174
175# CHECK: stwu 2, 128(4)
1760x94 0x44 0x00 0x80
177
178# CHECK: stwux 2, 3, 4
1790x7c 0x43 0x21 0x6e
180
181# CHECK: std 2, 128(4)
1820xf8 0x44 0x00 0x80
183
184# CHECK: stdx 2, 3, 4
1850x7c 0x43 0x21 0x2a
186
187# CHECK: stdu 2, 128(4)
1880xf8 0x44 0x00 0x81
189
190# CHECK: stdux 2, 3, 4
1910x7c 0x43 0x21 0x6a
192
193# CHECK: lhbrx 2, 3, 4
1940x7c 0x43 0x26 0x2c
195
196# CHECK: sthbrx 2, 3, 4
1970x7c 0x43 0x27 0x2c
198
199# CHECK: lwbrx 2, 3, 4
2000x7c 0x43 0x24 0x2c
201
202# CHECK: stwbrx 2, 3, 4
2030x7c 0x43 0x25 0x2c
204
205# CHECK: ldbrx 2, 3, 4
2060x7c 0x43 0x24 0x28
207
208# CHECK: stdbrx 2, 3, 4
2090x7c 0x43 0x25 0x28
210
211# CHECK: lmw 2, 128(1)
2120xb8 0x41 0x00 0x80
213
214# CHECK: stmw 2, 128(1)
2150xbc 0x41 0x00 0x80
216
217# CHECK: addi 2, 3, 128
2180x38 0x43 0x00 0x80
219
220# CHECK: addis 2, 3, 128
2210x3c 0x43 0x00 0x80
222
223# CHECK: add 2, 3, 4
2240x7c 0x43 0x22 0x14
225
226# CHECK: add. 2, 3, 4
2270x7c 0x43 0x22 0x15
228
229# CHECK: subf 2, 3, 4
2300x7c 0x43 0x20 0x50
231
232# CHECK: subf. 2, 3, 4
2330x7c 0x43 0x20 0x51
234
235# CHECK: addic 2, 3, 128
2360x30 0x43 0x00 0x80
237
238# CHECK: addic. 2, 3, 128
2390x34 0x43 0x00 0x80
240
241# CHECK: subfic 2, 3, 4
2420x20 0x43 0x00 0x04
243
244# CHECK: addc 2, 3, 4
2450x7c 0x43 0x20 0x14
246
247# CHECK: addc. 2, 3, 4
2480x7c 0x43 0x20 0x15
249
250# CHECK: subfc 2, 3, 4
2510x7c 0x43 0x20 0x10
252
253# CHECK: subfc 2, 3, 4
2540x7c 0x43 0x20 0x10
255
256# CHECK: adde 2, 3, 4
2570x7c 0x43 0x21 0x14
258
259# CHECK: adde. 2, 3, 4
2600x7c 0x43 0x21 0x15
261
262# CHECK: subfe 2, 3, 4
2630x7c 0x43 0x21 0x10
264
265# CHECK: subfe. 2, 3, 4
2660x7c 0x43 0x21 0x11
267
268# CHECK: addme 2, 3
2690x7c 0x43 0x01 0xd4
270
271# CHECK: addme. 2, 3
2720x7c 0x43 0x01 0xd5
273
274# CHECK: subfme 2, 3
2750x7c 0x43 0x01 0xd0
276
277# CHECK: subfme. 2, 3
2780x7c 0x43 0x01 0xd1
279
280# CHECK: addze 2, 3
2810x7c 0x43 0x01 0x94
282
283# CHECK: addze. 2, 3
2840x7c 0x43 0x01 0x95
285
286# CHECK: subfze 2, 3
2870x7c 0x43 0x01 0x90
288
289# CHECK: subfze. 2, 3
2900x7c 0x43 0x01 0x91
291
292# CHECK: neg 2, 3
2930x7c 0x43 0x00 0xd0
294
295# CHECK: neg. 2, 3
2960x7c 0x43 0x00 0xd1
297
298# CHECK: mulli 2, 3, 128
2990x1c 0x43 0x00 0x80
300
301# CHECK: mulhw 2, 3, 4
3020x7c 0x43 0x20 0x96
303
304# CHECK: mulhw. 2, 3, 4
3050x7c 0x43 0x20 0x97
306
307# CHECK: mullw 2, 3, 4
3080x7c 0x43 0x21 0xd6
309
310# CHECK: mullw. 2, 3, 4
3110x7c 0x43 0x21 0xd7
312
313# CHECK: mulhwu 2, 3, 4
3140x7c 0x43 0x20 0x16
315
316# CHECK: mulhwu. 2, 3, 4
3170x7c 0x43 0x20 0x17
318
319# CHECK: divw 2, 3, 4
3200x7c 0x43 0x23 0xd6
321
322# CHECK: divw. 2, 3, 4
3230x7c 0x43 0x23 0xd7
324
325# CHECK: divwu 2, 3, 4
3260x7c 0x43 0x23 0x96
327
328# CHECK: divwu. 2, 3, 4
3290x7c 0x43 0x23 0x97
330
331# CHECK: mulld 2, 3, 4
3320x7c 0x43 0x21 0xd2
333
334# CHECK: mulld. 2, 3, 4
3350x7c 0x43 0x21 0xd3
336
337# CHECK: mulhd 2, 3, 4
3380x7c 0x43 0x20 0x92
339
340# CHECK: mulhd. 2, 3, 4
3410x7c 0x43 0x20 0x93
342
343# CHECK: mulhdu 2, 3, 4
3440x7c 0x43 0x20 0x12
345
346# CHECK: mulhdu. 2, 3, 4
3470x7c 0x43 0x20 0x13
348
349# CHECK: divd 2, 3, 4
3500x7c 0x43 0x23 0xd2
351
352# CHECK: divd. 2, 3, 4
3530x7c 0x43 0x23 0xd3
354
355# CHECK: divdu 2, 3, 4
3560x7c 0x43 0x23 0x92
357
358# CHECK: divdu. 2, 3, 4
3590x7c 0x43 0x23 0x93
360
361# CHECK: cmpdi 2, 3, 128
3620x2d 0x23 0x00 0x80
363
364# CHECK: cmpd 2, 3, 4
3650x7d 0x23 0x20 0x00
366
367# CHECK: cmpldi 2, 3, 128
3680x29 0x23 0x00 0x80
369
370# CHECK: cmpld 2, 3, 4
3710x7d 0x23 0x20 0x40
372
373# CHECK: cmpwi 2, 3, 128
3740x2d 0x03 0x00 0x80
375
376# CHECK: cmpw 2, 3, 4
3770x7d 0x03 0x20 0x00
378
379# CHECK: cmplwi 2, 3, 128
3800x29 0x03 0x00 0x80
381
382# CHECK: cmplw 2, 3, 4
3830x7d 0x03 0x20 0x40
384
385# CHECK: twi 2, 3, 4
3860x0c 0x43 0x00 0x04
387
388# CHECK: tw 2, 3, 4
3890x7c 0x43 0x20 0x08
390
391# CHECK: tdi 2, 3, 4
3920x08 0x43 0x00 0x04
393
394# CHECK: td 2, 3, 4
3950x7c 0x43 0x20 0x88
396
397# CHECK: isel 2, 3, 4, 5
3980x7c 0x43 0x21 0x5e
399
400# CHECK: andi. 2, 3, 128
4010x70 0x62 0x00 0x80
402
403# CHECK: andis. 2, 3, 128
4040x74 0x62 0x00 0x80
405
406# CHECK: ori 2, 3, 128
4070x60 0x62 0x00 0x80
408
409# CHECK: oris 2, 3, 128
4100x64 0x62 0x00 0x80
411
412# CHECK: xori 2, 3, 128
4130x68 0x62 0x00 0x80
414
415# CHECK: xoris 2, 3, 128
4160x6c 0x62 0x00 0x80
417
418# CHECK: and 2, 3, 4
4190x7c 0x62 0x20 0x38
420
421# CHECK: and. 2, 3, 4
4220x7c 0x62 0x20 0x39
423
424# CHECK: xor 2, 3, 4
4250x7c 0x62 0x22 0x78
426
427# CHECK: xor. 2, 3, 4
4280x7c 0x62 0x22 0x79
429
430# CHECK: nand 2, 3, 4
4310x7c 0x62 0x23 0xb8
432
433# CHECK: nand. 2, 3, 4
4340x7c 0x62 0x23 0xb9
435
436# CHECK: or 2, 3, 4
4370x7c 0x62 0x23 0x78
438
439# CHECK: or. 2, 3, 4
4400x7c 0x62 0x23 0x79
441
442# CHECK: nor 2, 3, 4
4430x7c 0x62 0x20 0xf8
444
445# CHECK: nor. 2, 3, 4
4460x7c 0x62 0x20 0xf9
447
448# CHECK: eqv 2, 3, 4
4490x7c 0x62 0x22 0x38
450
451# CHECK: eqv. 2, 3, 4
4520x7c 0x62 0x22 0x39
453
454# CHECK: andc 2, 3, 4
4550x7c 0x62 0x20 0x78
456
457# CHECK: andc. 2, 3, 4
4580x7c 0x62 0x20 0x79
459
460# CHECK: orc 2, 3, 4
4610x7c 0x62 0x23 0x38
462
463# CHECK: orc. 2, 3, 4
4640x7c 0x62 0x23 0x39
465
466# CHECK: extsb 2, 3
4670x7c 0x62 0x07 0x74
468
469# CHECK: extsb. 2, 3
4700x7c 0x62 0x07 0x75
471
472# CHECK: extsh 2, 3
4730x7c 0x62 0x07 0x34
474
475# CHECK: extsh. 2, 3
4760x7c 0x62 0x07 0x35
477
478# CHECK: cntlzw 2, 3
4790x7c 0x62 0x00 0x34
480
481# CHECK: cntlzw. 2, 3
4820x7c 0x62 0x00 0x35
483
484# CHECK: popcntw 2, 3
4850x7c 0x62 0x02 0xf4
486
487# CHECK: extsw 2, 3
4880x7c 0x62 0x07 0xb4
489
490# CHECK: extsw. 2, 3
4910x7c 0x62 0x07 0xb5
492
493# CHECK: cntlzd 2, 3
4940x7c 0x62 0x00 0x74
495
496# CHECK: cntlzd. 2, 3
4970x7c 0x62 0x00 0x75
498
499# CHECK: popcntd 2, 3
5000x7c 0x62 0x03 0xf4
501
502# CHECK: rlwinm 2, 3, 4, 5, 6
5030x54 0x62 0x21 0x4c
504
505# CHECK: rlwinm. 2, 3, 4, 5, 6
5060x54 0x62 0x21 0x4d
507
508# CHECK: rlwnm 2, 3, 4, 5, 6
5090x5c 0x62 0x21 0x4c
510
511# CHECK: rlwnm. 2, 3, 4, 5, 6
5120x5c 0x62 0x21 0x4d
513
514# CHECK: rlwimi 2, 3, 4, 5, 6
5150x50 0x62 0x21 0x4c
516
517# CHECK: rlwimi. 2, 3, 4, 5, 6
5180x50 0x62 0x21 0x4d
519
520# CHECK: rldicl 2, 3, 4, 5
5210x78 0x62 0x21 0x40
522
523# CHECK: rldicl. 2, 3, 4, 5
5240x78 0x62 0x21 0x41
525
526# CHECK: rldicr 2, 3, 4, 5
5270x78 0x62 0x21 0x44
528
529# CHECK: rldicr. 2, 3, 4, 5
5300x78 0x62 0x21 0x45
531
532# CHECK: rldic 2, 3, 4, 5
5330x78 0x62 0x21 0x48
534
535# CHECK: rldic. 2, 3, 4, 5
5360x78 0x62 0x21 0x49
537
538# CHECK: rldcl 2, 3, 4, 5
5390x78 0x62 0x21 0x50
540
541# CHECK: rldcl. 2, 3, 4, 5
5420x78 0x62 0x21 0x51
543
544# CHECK: rldcr 2, 3, 4, 5
5450x78 0x62 0x21 0x52
546
547# CHECK: rldcr. 2, 3, 4, 5
5480x78 0x62 0x21 0x53
549
550# CHECK: rldimi 2, 3, 4, 5
5510x78 0x62 0x21 0x4c
552
553# CHECK: rldimi. 2, 3, 4, 5
5540x78 0x62 0x21 0x4d
555
556# CHECK: slw 2, 3, 4
5570x7c 0x62 0x20 0x30
558
559# CHECK: slw. 2, 3, 4
5600x7c 0x62 0x20 0x31
561
562# CHECK: srw 2, 3, 4
5630x7c 0x62 0x24 0x30
564
565# CHECK: srw. 2, 3, 4
5660x7c 0x62 0x24 0x31
567
568# CHECK: srawi 2, 3, 4
5690x7c 0x62 0x26 0x70
570
571# CHECK: srawi. 2, 3, 4
5720x7c 0x62 0x26 0x71
573
574# CHECK: sraw 2, 3, 4
5750x7c 0x62 0x26 0x30
576
577# CHECK: sraw. 2, 3, 4
5780x7c 0x62 0x26 0x31
579
580# CHECK: sld 2, 3, 4
5810x7c 0x62 0x20 0x36
582
583# CHECK: sld. 2, 3, 4
5840x7c 0x62 0x20 0x37
585
586# CHECK: srd 2, 3, 4
5870x7c 0x62 0x24 0x36
588
589# CHECK: srd. 2, 3, 4
5900x7c 0x62 0x24 0x37
591
592# CHECK: sradi 2, 3, 4
5930x7c 0x62 0x26 0x74
594
595# CHECK: sradi. 2, 3, 4
5960x7c 0x62 0x26 0x75
597
598# CHECK: srad 2, 3, 4
5990x7c 0x62 0x26 0x34
600
601# CHECK: srad. 2, 3, 4
6020x7c 0x62 0x26 0x35
603
604# CHECK: mtspr 600, 2
6050x7c 0x58 0x93 0xa6
606
607# CHECK: mfspr 2, 600
6080x7c 0x58 0x92 0xa6
609
610# CHECK: mtcrf 123, 2
6110x7c 0x47 0xb1 0x20
612
613# CHECK: mfcr 2
6140x7c 0x40 0x00 0x26
615
616# CHECK: mtocrf 16, 2
6170x7c 0x51 0x01 0x20
618
619# CHECK: mfocrf 16, 8
6200x7e 0x10 0x80 0x26
621
622