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 230x4c 0x8a 0x00 0x20 24 25# CHECK: bclrl 4, 10, 3 260x4c 0x8a 0x18 0x21 27 28# CHECK: bclrl 4, 10 290x4c 0x8a 0x00 0x21 30 31# CHECK: bcctr 4, 10, 3 320x4c 0x8a 0x1c 0x20 33 34# CHECK: bcctr 4, 10 350x4c 0x8a 0x04 0x20 36 37# CHECK: bcctrl 4, 10, 3 380x4c 0x8a 0x1c 0x21 39 40# CHECK: bcctrl 4, 10 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 740x44 0x00 0x00 0x02 75 76# CHECK: clrbhrb 770x7c 0x00 0x03 0x5c 78 79# CHECK: mfbhrbe 9, 983 800x7d 0x3e 0xba 0x5c 81 82# CHECK: rfebb 1 830x4c 0x00 0x09 0x24 84 85# CHECK: lbz 2, 128(4) 860x88 0x44 0x00 0x80 87 88# CHECK: lbzx 2, 3, 4 890x7c 0x43 0x20 0xae 90 91# CHECK: lbzu 2, 128(4) 920x8c 0x44 0x00 0x80 93 94# CHECK: lbzux 2, 3, 4 950x7c 0x43 0x20 0xee 96 97# CHECK: lhz 2, 128(4) 980xa0 0x44 0x00 0x80 99 100# CHECK: lhzx 2, 3, 4 1010x7c 0x43 0x22 0x2e 102 103# CHECK: lhzu 2, 128(4) 1040xa4 0x44 0x00 0x80 105 106# CHECK: lhzux 2, 3, 4 1070x7c 0x43 0x22 0x6e 108 109# CHECK: lha 2, 128(4) 1100xa8 0x44 0x00 0x80 111 112# CHECK: lhax 2, 3, 4 1130x7c 0x43 0x22 0xae 114 115# CHECK: lhau 2, 128(4) 1160xac 0x44 0x00 0x80 117 118# CHECK: lhaux 2, 3, 4 1190x7c 0x43 0x22 0xee 120 121# CHECK: lwz 2, 128(4) 1220x80 0x44 0x00 0x80 123 124# CHECK: lwzx 2, 3, 4 1250x7c 0x43 0x20 0x2e 126 127# CHECK: lwzu 2, 128(4) 1280x84 0x44 0x00 0x80 129 130# CHECK: lwzux 2, 3, 4 1310x7c 0x43 0x20 0x6e 132 133# CHECK: lwa 2, 128(4) 1340xe8 0x44 0x00 0x82 135 136# CHECK: lwax 2, 3, 4 1370x7c 0x43 0x22 0xaa 138 139# CHECK: lwaux 2, 3, 4 1400x7c 0x43 0x22 0xea 141 142# CHECK: ld 2, 128(4) 1430xe8 0x44 0x00 0x80 144 145# CHECK: ldx 2, 3, 4 1460x7c 0x43 0x20 0x2a 147 148# CHECK: ldu 2, 128(4) 1490xe8 0x44 0x00 0x81 150 151# CHECK: ldux 2, 3, 4 1520x7c 0x43 0x20 0x6a 153 154# CHECK: ldmx 2, 3, 4 1550x7c 0x43 0x22 0x6a 156 157# CHECK: stb 2, 128(4) 1580x98 0x44 0x00 0x80 159 160# CHECK: stbx 2, 3, 4 1610x7c 0x43 0x21 0xae 162 163# CHECK: stbu 2, 128(4) 1640x9c 0x44 0x00 0x80 165 166# CHECK: stbux 2, 3, 4 1670x7c 0x43 0x21 0xee 168 169# CHECK: sth 2, 128(4) 1700xb0 0x44 0x00 0x80 171 172# CHECK: sthx 2, 3, 4 1730x7c 0x43 0x23 0x2e 174 175# CHECK: sthu 2, 128(4) 1760xb4 0x44 0x00 0x80 177 178# CHECK: sthux 2, 3, 4 1790x7c 0x43 0x23 0x6e 180 181# CHECK: stw 2, 128(4) 1820x90 0x44 0x00 0x80 183 184# CHECK: stwx 2, 3, 4 1850x7c 0x43 0x21 0x2e 186 187# CHECK: stwu 2, 128(4) 1880x94 0x44 0x00 0x80 189 190# CHECK: stwux 2, 3, 4 1910x7c 0x43 0x21 0x6e 192 193# CHECK: std 2, 128(4) 1940xf8 0x44 0x00 0x80 195 196# CHECK: stdx 2, 3, 4 1970x7c 0x43 0x21 0x2a 198 199# CHECK: stdu 2, 128(4) 2000xf8 0x44 0x00 0x81 201 202# CHECK: stdux 2, 3, 4 2030x7c 0x43 0x21 0x6a 204 205# CHECK: lhbrx 2, 3, 4 2060x7c 0x43 0x26 0x2c 207 208# CHECK: sthbrx 2, 3, 4 2090x7c 0x43 0x27 0x2c 210 211# CHECK: lwbrx 2, 3, 4 2120x7c 0x43 0x24 0x2c 213 214# CHECK: stwbrx 2, 3, 4 2150x7c 0x43 0x25 0x2c 216 217# CHECK: ldbrx 2, 3, 4 2180x7c 0x43 0x24 0x28 219 220# CHECK: stdbrx 2, 3, 4 2210x7c 0x43 0x25 0x28 222 223# CHECK: lmw 2, 128(1) 2240xb8 0x41 0x00 0x80 225 226# CHECK: stmw 2, 128(1) 2270xbc 0x41 0x00 0x80 228 229# CHECK: addi 2, 3, 128 2300x38 0x43 0x00 0x80 231 232# CHECK: addis 2, 3, 128 2330x3c 0x43 0x00 0x80 234 235# CHECK: add 2, 3, 4 2360x7c 0x43 0x22 0x14 237 238# CHECK: add. 2, 3, 4 2390x7c 0x43 0x22 0x15 240 241# CHECK: subf 2, 3, 4 2420x7c 0x43 0x20 0x50 243 244# CHECK: subf. 2, 3, 4 2450x7c 0x43 0x20 0x51 246 247# CHECK: addic 2, 3, 128 2480x30 0x43 0x00 0x80 249 250# CHECK: addic. 2, 3, 128 2510x34 0x43 0x00 0x80 252 253# CHECK: subfic 2, 3, 4 2540x20 0x43 0x00 0x04 255 256# CHECK: addc 2, 3, 4 2570x7c 0x43 0x20 0x14 258 259# CHECK: addc. 2, 3, 4 2600x7c 0x43 0x20 0x15 261 262# CHECK: subfc 2, 3, 4 2630x7c 0x43 0x20 0x10 264 265# CHECK: subfc 2, 3, 4 2660x7c 0x43 0x20 0x10 267 268# CHECK: adde 2, 3, 4 2690x7c 0x43 0x21 0x14 270 271# CHECK: adde. 2, 3, 4 2720x7c 0x43 0x21 0x15 273 274# CHECK: subfe 2, 3, 4 2750x7c 0x43 0x21 0x10 276 277# CHECK: subfe. 2, 3, 4 2780x7c 0x43 0x21 0x11 279 280# CHECK: addme 2, 3 2810x7c 0x43 0x01 0xd4 282 283# CHECK: addme. 2, 3 2840x7c 0x43 0x01 0xd5 285 286# CHECK: subfme 2, 3 2870x7c 0x43 0x01 0xd0 288 289# CHECK: subfme. 2, 3 2900x7c 0x43 0x01 0xd1 291 292# CHECK: addze 2, 3 2930x7c 0x43 0x01 0x94 294 295# CHECK: addze. 2, 3 2960x7c 0x43 0x01 0x95 297 298# CHECK: subfze 2, 3 2990x7c 0x43 0x01 0x90 300 301# CHECK: subfze. 2, 3 3020x7c 0x43 0x01 0x91 303 304# CHECK: neg 2, 3 3050x7c 0x43 0x00 0xd0 306 307# CHECK: neg. 2, 3 3080x7c 0x43 0x00 0xd1 309 310# CHECK: mulli 2, 3, 128 3110x1c 0x43 0x00 0x80 312 313# CHECK: mulhw 2, 3, 4 3140x7c 0x43 0x20 0x96 315 316# CHECK: mulhw. 2, 3, 4 3170x7c 0x43 0x20 0x97 318 319# CHECK: mullw 2, 3, 4 3200x7c 0x43 0x21 0xd6 321 322# CHECK: mullw. 2, 3, 4 3230x7c 0x43 0x21 0xd7 324 325# CHECK: mulhwu 2, 3, 4 3260x7c 0x43 0x20 0x16 327 328# CHECK: mulhwu. 2, 3, 4 3290x7c 0x43 0x20 0x17 330 331# CHECK: divw 2, 3, 4 3320x7c 0x43 0x23 0xd6 333 334# CHECK: divw. 2, 3, 4 3350x7c 0x43 0x23 0xd7 336 337# CHECK: divwu 2, 3, 4 3380x7c 0x43 0x23 0x96 339 340# CHECK: divwu. 2, 3, 4 3410x7c 0x43 0x23 0x97 342 343# CHECK: divwe 2, 3, 4 3440x7c 0x43 0x23 0x56 345 346# CHECK: divwe. 2, 3, 4 3470x7c 0x43 0x23 0x57 348 349# CHECK: divweu 2, 3, 4 3500x7c 0x43 0x23 0x16 351 352# CHECK: divweu. 2, 3, 4 3530x7c 0x43 0x23 0x17 354 355# CHECK: mulld 2, 3, 4 3560x7c 0x43 0x21 0xd2 357 358# CHECK: mulld. 2, 3, 4 3590x7c 0x43 0x21 0xd3 360 361# CHECK: mulhd 2, 3, 4 3620x7c 0x43 0x20 0x92 363 364# CHECK: mulhd. 2, 3, 4 3650x7c 0x43 0x20 0x93 366 367# CHECK: mulhdu 2, 3, 4 3680x7c 0x43 0x20 0x12 369 370# CHECK: mulhdu. 2, 3, 4 3710x7c 0x43 0x20 0x13 372 373# CHECK: divd 2, 3, 4 3740x7c 0x43 0x23 0xd2 375 376# CHECK: divd. 2, 3, 4 3770x7c 0x43 0x23 0xd3 378 379# CHECK: divdu 2, 3, 4 3800x7c 0x43 0x23 0x92 381 382# CHECK: divdu. 2, 3, 4 3830x7c 0x43 0x23 0x93 384 385# CHECK: divde 2, 3, 4 3860x7c 0x43 0x23 0x52 387 388# CHECK: divde. 2, 3, 4 3890x7c 0x43 0x23 0x53 390 391# CHECK: divdeu 2, 3, 4 3920x7c 0x43 0x23 0x12 393 394# CHECK: divdeu. 2, 3, 4 3950x7c 0x43 0x23 0x13 396 397# CHECK: cmpdi 2, 3, 128 3980x2d 0x23 0x00 0x80 399 400# CHECK: cmpd 2, 3, 4 4010x7d 0x23 0x20 0x00 402 403# CHECK: cmpldi 2, 3, 128 4040x29 0x23 0x00 0x80 405 406# CHECK: cmpld 2, 3, 4 4070x7d 0x23 0x20 0x40 408 409# CHECK: cmpwi 2, 3, 128 4100x2d 0x03 0x00 0x80 411 412# CHECK: cmpw 2, 3, 4 4130x7d 0x03 0x20 0x00 414 415# CHECK: cmplwi 2, 3, 128 4160x29 0x03 0x00 0x80 417 418# CHECK: cmplw 2, 3, 4 4190x7d 0x03 0x20 0x40 420 421# CHECK: cmprb 3, 1, 7, 17 4220x7d 0xa7 0x89 0x80 423 424# CHECK: cmpeqb 3, 7, 17 4250x7d 0x87 0x89 0xc0 426 427# CHECK: cnttzw 7, 17 4280x7e 0x27 0x04 0x34 429 430# CHECK: cnttzw. 7, 17 4310x7e 0x27 0x04 0x35 432 433# CHECK: cnttzd 7, 17 4340x7e 0x27 0x04 0x74 435 436# CHECK: cnttzd. 7, 17 4370x7e 0x27 0x04 0x75 438 439# CHECK: twllti 3, 4 4400x0c 0x43 0x00 0x04 441 442# CHECK: twllt 3, 4 4430x7c 0x43 0x20 0x08 444 445# CHECK: tdllti 3, 4 4460x08 0x43 0x00 0x04 447 448# CHECK: tdllt 3, 4 4490x7c 0x43 0x20 0x88 450 451# CHECK: isel 2, 3, 4, 5 4520x7c 0x43 0x21 0x5e 453 454# CHECK: andi. 2, 3, 128 4550x70 0x62 0x00 0x80 456 457# CHECK: andis. 2, 3, 128 4580x74 0x62 0x00 0x80 459 460# CHECK: ori 2, 3, 128 4610x60 0x62 0x00 0x80 462 463# CHECK: oris 2, 3, 128 4640x64 0x62 0x00 0x80 465 466# CHECK: xori 2, 3, 128 4670x68 0x62 0x00 0x80 468 469# CHECK: xoris 2, 3, 128 4700x6c 0x62 0x00 0x80 471 472# CHECK: and 2, 3, 4 4730x7c 0x62 0x20 0x38 474 475# CHECK: and. 2, 3, 4 4760x7c 0x62 0x20 0x39 477 478# CHECK: xor 2, 3, 4 4790x7c 0x62 0x22 0x78 480 481# CHECK: xor. 2, 3, 4 4820x7c 0x62 0x22 0x79 483 484# CHECK: nand 2, 3, 4 4850x7c 0x62 0x23 0xb8 486 487# CHECK: nand. 2, 3, 4 4880x7c 0x62 0x23 0xb9 489 490# CHECK: or 2, 3, 4 4910x7c 0x62 0x23 0x78 492 493# CHECK: or. 2, 3, 4 4940x7c 0x62 0x23 0x79 495 496# CHECK: nor 2, 3, 4 4970x7c 0x62 0x20 0xf8 498 499# CHECK: nor. 2, 3, 4 5000x7c 0x62 0x20 0xf9 501 502# CHECK: eqv 2, 3, 4 5030x7c 0x62 0x22 0x38 504 505# CHECK: eqv. 2, 3, 4 5060x7c 0x62 0x22 0x39 507 508# CHECK: andc 2, 3, 4 5090x7c 0x62 0x20 0x78 510 511# CHECK: andc. 2, 3, 4 5120x7c 0x62 0x20 0x79 513 514# CHECK: orc 2, 3, 4 5150x7c 0x62 0x23 0x38 516 517# CHECK: orc. 2, 3, 4 5180x7c 0x62 0x23 0x39 519 520# CHECK: extsb 2, 3 5210x7c 0x62 0x07 0x74 522 523# CHECK: extsb. 2, 3 5240x7c 0x62 0x07 0x75 525 526# CHECK: extsh 2, 3 5270x7c 0x62 0x07 0x34 528 529# CHECK: extsh. 2, 3 5300x7c 0x62 0x07 0x35 531 532# CHECK: cntlzw 2, 3 5330x7c 0x62 0x00 0x34 534 535# CHECK: cntlzw. 2, 3 5360x7c 0x62 0x00 0x35 537 538# CHECK: popcntw 2, 3 5390x7c 0x62 0x02 0xf4 540 541# CHECK: extsw 2, 3 5420x7c 0x62 0x07 0xb4 543 544# CHECK: extsw. 2, 3 5450x7c 0x62 0x07 0xb5 546 547# CHECK: cntlzd 2, 3 5480x7c 0x62 0x00 0x74 549 550# CHECK: cntlzd. 2, 3 5510x7c 0x62 0x00 0x75 552 553# CHECK: popcntd 2, 3 5540x7c 0x62 0x03 0xf4 555 556# CHECK: bpermd 2, 3, 4 5570x7c 0x62 0x21 0xf8 558 559# CHECK: cmpb 7, 21, 4 5600x7e 0xa7 0x23 0xf8 561 562# CHECK: rlwinm 2, 3, 4, 5, 6 5630x54 0x62 0x21 0x4c 564 565# CHECK: rlwinm. 2, 3, 4, 5, 6 5660x54 0x62 0x21 0x4d 567 568# CHECK: rlwnm 2, 3, 4, 5, 6 5690x5c 0x62 0x21 0x4c 570 571# CHECK: rlwnm. 2, 3, 4, 5, 6 5720x5c 0x62 0x21 0x4d 573 574# CHECK: rlwimi 2, 3, 4, 5, 6 5750x50 0x62 0x21 0x4c 576 577# CHECK: rlwimi. 2, 3, 4, 5, 6 5780x50 0x62 0x21 0x4d 579 580# CHECK: rldicl 2, 3, 4, 5 5810x78 0x62 0x21 0x40 582 583# CHECK: rldicl. 2, 3, 4, 5 5840x78 0x62 0x21 0x41 585 586# CHECK: rldicr 2, 3, 4, 5 5870x78 0x62 0x21 0x44 588 589# CHECK: rldicr. 2, 3, 4, 5 5900x78 0x62 0x21 0x45 591 592# CHECK: rldic 2, 3, 4, 5 5930x78 0x62 0x21 0x48 594 595# CHECK: rldic. 2, 3, 4, 5 5960x78 0x62 0x21 0x49 597 598# CHECK: rldcl 2, 3, 4, 5 5990x78 0x62 0x21 0x50 600 601# CHECK: rldcl. 2, 3, 4, 5 6020x78 0x62 0x21 0x51 603 604# CHECK: rldcr 2, 3, 4, 5 6050x78 0x62 0x21 0x52 606 607# CHECK: rldcr. 2, 3, 4, 5 6080x78 0x62 0x21 0x53 609 610# CHECK: rldimi 2, 3, 4, 5 6110x78 0x62 0x21 0x4c 612 613# CHECK: rldimi. 2, 3, 4, 5 6140x78 0x62 0x21 0x4d 615 616# CHECK: slw 2, 3, 4 6170x7c 0x62 0x20 0x30 618 619# CHECK: slw. 2, 3, 4 6200x7c 0x62 0x20 0x31 621 622# CHECK: srw 2, 3, 4 6230x7c 0x62 0x24 0x30 624 625# CHECK: srw. 2, 3, 4 6260x7c 0x62 0x24 0x31 627 628# CHECK: srawi 2, 3, 4 6290x7c 0x62 0x26 0x70 630 631# CHECK: srawi. 2, 3, 4 6320x7c 0x62 0x26 0x71 633 634# CHECK: sraw 2, 3, 4 6350x7c 0x62 0x26 0x30 636 637# CHECK: sraw. 2, 3, 4 6380x7c 0x62 0x26 0x31 639 640# CHECK: sld 2, 3, 4 6410x7c 0x62 0x20 0x36 642 643# CHECK: sld. 2, 3, 4 6440x7c 0x62 0x20 0x37 645 646# CHECK: srd 2, 3, 4 6470x7c 0x62 0x24 0x36 648 649# CHECK: srd. 2, 3, 4 6500x7c 0x62 0x24 0x37 651 652# CHECK: sradi 2, 3, 4 6530x7c 0x62 0x26 0x74 654 655# CHECK: sradi. 2, 3, 4 6560x7c 0x62 0x26 0x75 657 658# CHECK: srad 2, 3, 4 6590x7c 0x62 0x26 0x34 660 661# CHECK: srad. 2, 3, 4 6620x7c 0x62 0x26 0x35 663 664# CHECK: mtspr 600, 2 6650x7c 0x58 0x93 0xa6 666 667# CHECK: mfspr 2, 600 6680x7c 0x58 0x92 0xa6 669 670# CHECK: mtcrf 123, 2 6710x7c 0x47 0xb1 0x20 672 673# CHECK: mfcr 2 6740x7c 0x40 0x00 0x26 675 676# CHECK: mtocrf 16, 2 6770x7c 0x51 0x01 0x20 678 679# CHECK: mfocrf 16, 8 6800x7e 0x10 0x80 0x26 681 682# CHECK: mcrxrx 7 6830x7f 0x80 0x04 0x80 684 685# CHECK: mtsrin 10, 12 6860x7d 0x40 0x61 0xe4 687 688# CHECK: mfsrin 10, 12 6890x7d 0x40 0x65 0x26 690 691# CHECK: copy 2, 19, 1 6920x7c 0x22 0x9e 0x0c 693 694# CHECK: paste 17, 1, 1 6950x7c 0x31 0x0f 0x0c 696 697# CHECK: cp_abort 6980x7c 0x00 0x06 0x8c 699 700# CHECK: msgsync 7010x7c 0x00 0x06 0xec 702 703# CHECK: slbieg 6, 21 7040x7c 0xc0 0xab 0xa4 705 706# CHECK: slbsync 7070x7c 0x00 0x02 0xa4 708 709# CHECK: stop 7100x4c 0x00 0x02 0xe4 711