1 # RUN: llvm-mc --disassemble %s -triple powerpc64le-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 20 0x20 0x18 0x8a 0x4c 21 22 # CHECK: bclr 4, 10 23 0x20 0x00 0x8a 0x4c 24 25 # CHECK: bclrl 4, 10, 3 26 0x21 0x18 0x8a 0x4c 27 28 # CHECK: bclrl 4, 10 29 0x21 0x00 0x8a 0x4c 30 31 # CHECK: bcctr 4, 10, 3 32 0x20 0x1c 0x8a 0x4c 33 34 # CHECK: bcctr 4, 10 35 0x20 0x04 0x8a 0x4c 36 37 # CHECK: bcctrl 4, 10, 3 38 0x21 0x1c 0x8a 0x4c 39 40 # CHECK: bcctrl 4, 10 41 0x21 0x04 0x8a 0x4c 42 43 # CHECK: crand 2, 3, 4 44 0x02 0x22 0x43 0x4c 45 46 # CHECK: crnand 2, 3, 4 47 0xc2 0x21 0x43 0x4c 48 49 # CHECK: cror 2, 3, 4 50 0x82 0x23 0x43 0x4c 51 52 # CHECK: crxor 2, 3, 4 53 0x82 0x21 0x43 0x4c 54 55 # CHECK: crnor 2, 3, 4 56 0x42 0x20 0x43 0x4c 57 58 # CHECK: creqv 2, 3, 4 59 0x42 0x22 0x43 0x4c 60 61 # CHECK: crandc 2, 3, 4 62 0x02 0x21 0x43 0x4c 63 64 # CHECK: crorc 2, 3, 4 65 0x42 0x23 0x43 0x4c 66 67 # CHECK: mcrf 2, 3 68 0x00 0x00 0x0c 0x4d 69 70 # CHECK: sc 1 71 0x22 0x00 0x00 0x44 72 73 # CHECK: sc 74 0x02 0x00 0x00 0x44 75 76 # CHECK: clrbhrb 77 0x5c 0x03 0x00 0x7c 78 79 # CHECK: mfbhrbe 9, 983 80 0x5c 0xba 0x3e 0x7d 81 82 # CHECK: rfebb 1 83 0x24 0x09 0x00 0x4c 84 85 # CHECK: lbz 2, 128(4) 86 0x80 0x00 0x44 0x88 87 88 # CHECK: lbzx 2, 3, 4 89 0xae 0x20 0x43 0x7c 90 91 # CHECK: lbzu 2, 128(4) 92 0x80 0x00 0x44 0x8c 93 94 # CHECK: lbzux 2, 3, 4 95 0xee 0x20 0x43 0x7c 96 97 # CHECK: lhz 2, 128(4) 98 0x80 0x00 0x44 0xa0 99 100 # CHECK: lhzx 2, 3, 4 101 0x2e 0x22 0x43 0x7c 102 103 # CHECK: lhzu 2, 128(4) 104 0x80 0x00 0x44 0xa4 105 106 # CHECK: lhzux 2, 3, 4 107 0x6e 0x22 0x43 0x7c 108 109 # CHECK: lha 2, 128(4) 110 0x80 0x00 0x44 0xa8 111 112 # CHECK: lhax 2, 3, 4 113 0xae 0x22 0x43 0x7c 114 115 # CHECK: lhau 2, 128(4) 116 0x80 0x00 0x44 0xac 117 118 # CHECK: lhaux 2, 3, 4 119 0xee 0x22 0x43 0x7c 120 121 # CHECK: lwz 2, 128(4) 122 0x80 0x00 0x44 0x80 123 124 # CHECK: lwzx 2, 3, 4 125 0x2e 0x20 0x43 0x7c 126 127 # CHECK: lwzu 2, 128(4) 128 0x80 0x00 0x44 0x84 129 130 # CHECK: lwzux 2, 3, 4 131 0x6e 0x20 0x43 0x7c 132 133 # CHECK: lwa 2, 128(4) 134 0x82 0x00 0x44 0xe8 135 136 # CHECK: lwax 2, 3, 4 137 0xaa 0x22 0x43 0x7c 138 139 # CHECK: lwaux 2, 3, 4 140 0xea 0x22 0x43 0x7c 141 142 # CHECK: ld 2, 128(4) 143 0x80 0x00 0x44 0xe8 144 145 # CHECK: ldx 2, 3, 4 146 0x2a 0x20 0x43 0x7c 147 148 # CHECK: ldu 2, 128(4) 149 0x81 0x00 0x44 0xe8 150 151 # CHECK: ldux 2, 3, 4 152 0x6a 0x20 0x43 0x7c 153 154 # CHECK: stb 2, 128(4) 155 0x80 0x00 0x44 0x98 156 157 # CHECK: stbx 2, 3, 4 158 0xae 0x21 0x43 0x7c 159 160 # CHECK: stbu 2, 128(4) 161 0x80 0x00 0x44 0x9c 162 163 # CHECK: stbux 2, 3, 4 164 0xee 0x21 0x43 0x7c 165 166 # CHECK: sth 2, 128(4) 167 0x80 0x00 0x44 0xb0 168 169 # CHECK: sthx 2, 3, 4 170 0x2e 0x23 0x43 0x7c 171 172 # CHECK: sthu 2, 128(4) 173 0x80 0x00 0x44 0xb4 174 175 # CHECK: sthux 2, 3, 4 176 0x6e 0x23 0x43 0x7c 177 178 # CHECK: stw 2, 128(4) 179 0x80 0x00 0x44 0x90 180 181 # CHECK: stwx 2, 3, 4 182 0x2e 0x21 0x43 0x7c 183 184 # CHECK: stwu 2, 128(4) 185 0x80 0x00 0x44 0x94 186 187 # CHECK: stwux 2, 3, 4 188 0x6e 0x21 0x43 0x7c 189 190 # CHECK: std 2, 128(4) 191 0x80 0x00 0x44 0xf8 192 193 # CHECK: stdx 2, 3, 4 194 0x2a 0x21 0x43 0x7c 195 196 # CHECK: stdu 2, 128(4) 197 0x81 0x00 0x44 0xf8 198 199 # CHECK: stdux 2, 3, 4 200 0x6a 0x21 0x43 0x7c 201 202 # CHECK: lhbrx 2, 3, 4 203 0x2c 0x26 0x43 0x7c 204 205 # CHECK: sthbrx 2, 3, 4 206 0x2c 0x27 0x43 0x7c 207 208 # CHECK: lwbrx 2, 3, 4 209 0x2c 0x24 0x43 0x7c 210 211 # CHECK: stwbrx 2, 3, 4 212 0x2c 0x25 0x43 0x7c 213 214 # CHECK: ldbrx 2, 3, 4 215 0x28 0x24 0x43 0x7c 216 217 # CHECK: stdbrx 2, 3, 4 218 0x28 0x25 0x43 0x7c 219 220 # CHECK: lmw 2, 128(1) 221 0x80 0x00 0x41 0xb8 222 223 # CHECK: stmw 2, 128(1) 224 0x80 0x00 0x41 0xbc 225 226 # CHECK: addi 2, 3, 128 227 0x80 0x00 0x43 0x38 228 229 # CHECK: addis 2, 3, 128 230 0x80 0x00 0x43 0x3c 231 232 # CHECK: add 2, 3, 4 233 0x14 0x22 0x43 0x7c 234 235 # CHECK: add. 2, 3, 4 236 0x15 0x22 0x43 0x7c 237 238 # CHECK: subf 2, 3, 4 239 0x50 0x20 0x43 0x7c 240 241 # CHECK: subf. 2, 3, 4 242 0x51 0x20 0x43 0x7c 243 244 # CHECK: addic 2, 3, 128 245 0x80 0x00 0x43 0x30 246 247 # CHECK: addic. 2, 3, 128 248 0x80 0x00 0x43 0x34 249 250 # CHECK: subfic 2, 3, 4 251 0x04 0x00 0x43 0x20 252 253 # CHECK: addc 2, 3, 4 254 0x14 0x20 0x43 0x7c 255 256 # CHECK: addc. 2, 3, 4 257 0x15 0x20 0x43 0x7c 258 259 # CHECK: subfc 2, 3, 4 260 0x10 0x20 0x43 0x7c 261 262 # CHECK: subfc 2, 3, 4 263 0x10 0x20 0x43 0x7c 264 265 # CHECK: adde 2, 3, 4 266 0x14 0x21 0x43 0x7c 267 268 # CHECK: adde. 2, 3, 4 269 0x15 0x21 0x43 0x7c 270 271 # CHECK: subfe 2, 3, 4 272 0x10 0x21 0x43 0x7c 273 274 # CHECK: subfe. 2, 3, 4 275 0x11 0x21 0x43 0x7c 276 277 # CHECK: addme 2, 3 278 0xd4 0x01 0x43 0x7c 279 280 # CHECK: addme. 2, 3 281 0xd5 0x01 0x43 0x7c 282 283 # CHECK: subfme 2, 3 284 0xd0 0x01 0x43 0x7c 285 286 # CHECK: subfme. 2, 3 287 0xd1 0x01 0x43 0x7c 288 289 # CHECK: addze 2, 3 290 0x94 0x01 0x43 0x7c 291 292 # CHECK: addze. 2, 3 293 0x95 0x01 0x43 0x7c 294 295 # CHECK: subfze 2, 3 296 0x90 0x01 0x43 0x7c 297 298 # CHECK: subfze. 2, 3 299 0x91 0x01 0x43 0x7c 300 301 # CHECK: neg 2, 3 302 0xd0 0x00 0x43 0x7c 303 304 # CHECK: neg. 2, 3 305 0xd1 0x00 0x43 0x7c 306 307 # CHECK: mulli 2, 3, 128 308 0x80 0x00 0x43 0x1c 309 310 # CHECK: mulhw 2, 3, 4 311 0x96 0x20 0x43 0x7c 312 313 # CHECK: mulhw. 2, 3, 4 314 0x97 0x20 0x43 0x7c 315 316 # CHECK: mullw 2, 3, 4 317 0xd6 0x21 0x43 0x7c 318 319 # CHECK: mullw. 2, 3, 4 320 0xd7 0x21 0x43 0x7c 321 322 # CHECK: mulhwu 2, 3, 4 323 0x16 0x20 0x43 0x7c 324 325 # CHECK: mulhwu. 2, 3, 4 326 0x17 0x20 0x43 0x7c 327 328 # CHECK: divw 2, 3, 4 329 0xd6 0x23 0x43 0x7c 330 331 # CHECK: divw. 2, 3, 4 332 0xd7 0x23 0x43 0x7c 333 334 # CHECK: divwu 2, 3, 4 335 0x96 0x23 0x43 0x7c 336 337 # CHECK: divwu. 2, 3, 4 338 0x97 0x23 0x43 0x7c 339 340 # CHECK: divwe 2, 3, 4 341 0x56 0x23 0x43 0x7c 342 343 # CHECK: divwe. 2, 3, 4 344 0x57 0x23 0x43 0x7c 345 346 # CHECK: divweu 2, 3, 4 347 0x16 0x23 0x43 0x7c 348 349 # CHECK: divweu. 2, 3, 4 350 0x17 0x23 0x43 0x7c 351 352 # CHECK: mulld 2, 3, 4 353 0xd2 0x21 0x43 0x7c 354 355 # CHECK: mulld. 2, 3, 4 356 0xd3 0x21 0x43 0x7c 357 358 # CHECK: mulhd 2, 3, 4 359 0x92 0x20 0x43 0x7c 360 361 # CHECK: mulhd. 2, 3, 4 362 0x93 0x20 0x43 0x7c 363 364 # CHECK: mulhdu 2, 3, 4 365 0x12 0x20 0x43 0x7c 366 367 # CHECK: mulhdu. 2, 3, 4 368 0x13 0x20 0x43 0x7c 369 370 # CHECK: divd 2, 3, 4 371 0xd2 0x23 0x43 0x7c 372 373 # CHECK: divd. 2, 3, 4 374 0xd3 0x23 0x43 0x7c 375 376 # CHECK: divdu 2, 3, 4 377 0x92 0x23 0x43 0x7c 378 379 # CHECK: divdu. 2, 3, 4 380 0x93 0x23 0x43 0x7c 381 382 # CHECK: divde 2, 3, 4 383 0x52 0x23 0x43 0x7c 384 385 # CHECK: divde. 2, 3, 4 386 0x53 0x23 0x43 0x7c 387 388 # CHECK: divdeu 2, 3, 4 389 0x12 0x23 0x43 0x7c 390 391 # CHECK: divdeu. 2, 3, 4 392 0x13 0x23 0x43 0x7c 393 394 # CHECK: cmpdi 2, 3, 128 395 0x80 0x00 0x23 0x2d 396 397 # CHECK: cmpd 2, 3, 4 398 0x00 0x20 0x23 0x7d 399 400 # CHECK: cmpldi 2, 3, 128 401 0x80 0x00 0x23 0x29 402 403 # CHECK: cmpld 2, 3, 4 404 0x40 0x20 0x23 0x7d 405 406 # CHECK: cmpwi 2, 3, 128 407 0x80 0x00 0x03 0x2d 408 409 # CHECK: cmpw 2, 3, 4 410 0x00 0x20 0x03 0x7d 411 412 # CHECK: cmplwi 2, 3, 128 413 0x80 0x00 0x03 0x29 414 415 # CHECK: cmplw 2, 3, 4 416 0x40 0x20 0x03 0x7d 417 418 # CHECK: twllti 3, 4 419 0x04 0x00 0x43 0x0c 420 421 # CHECK: twllt 3, 4 422 0x08 0x20 0x43 0x7c 423 424 # CHECK: tdllti 3, 4 425 0x04 0x00 0x43 0x08 426 427 # CHECK: tdllt 3, 4 428 0x88 0x20 0x43 0x7c 429 430 # CHECK: isel 2, 3, 4, 5 431 0x5e 0x21 0x43 0x7c 432 433 # CHECK: andi. 2, 3, 128 434 0x80 0x00 0x62 0x70 435 436 # CHECK: andis. 2, 3, 128 437 0x80 0x00 0x62 0x74 438 439 # CHECK: ori 2, 3, 128 440 0x80 0x00 0x62 0x60 441 442 # CHECK: oris 2, 3, 128 443 0x80 0x00 0x62 0x64 444 445 # CHECK: xori 2, 3, 128 446 0x80 0x00 0x62 0x68 447 448 # CHECK: xoris 2, 3, 128 449 0x80 0x00 0x62 0x6c 450 451 # CHECK: and 2, 3, 4 452 0x38 0x20 0x62 0x7c 453 454 # CHECK: and. 2, 3, 4 455 0x39 0x20 0x62 0x7c 456 457 # CHECK: xor 2, 3, 4 458 0x78 0x22 0x62 0x7c 459 460 # CHECK: xor. 2, 3, 4 461 0x79 0x22 0x62 0x7c 462 463 # CHECK: nand 2, 3, 4 464 0xb8 0x23 0x62 0x7c 465 466 # CHECK: nand. 2, 3, 4 467 0xb9 0x23 0x62 0x7c 468 469 # CHECK: or 2, 3, 4 470 0x78 0x23 0x62 0x7c 471 472 # CHECK: or. 2, 3, 4 473 0x79 0x23 0x62 0x7c 474 475 # CHECK: nor 2, 3, 4 476 0xf8 0x20 0x62 0x7c 477 478 # CHECK: nor. 2, 3, 4 479 0xf9 0x20 0x62 0x7c 480 481 # CHECK: eqv 2, 3, 4 482 0x38 0x22 0x62 0x7c 483 484 # CHECK: eqv. 2, 3, 4 485 0x39 0x22 0x62 0x7c 486 487 # CHECK: andc 2, 3, 4 488 0x78 0x20 0x62 0x7c 489 490 # CHECK: andc. 2, 3, 4 491 0x79 0x20 0x62 0x7c 492 493 # CHECK: orc 2, 3, 4 494 0x38 0x23 0x62 0x7c 495 496 # CHECK: orc. 2, 3, 4 497 0x39 0x23 0x62 0x7c 498 499 # CHECK: extsb 2, 3 500 0x74 0x07 0x62 0x7c 501 502 # CHECK: extsb. 2, 3 503 0x75 0x07 0x62 0x7c 504 505 # CHECK: extsh 2, 3 506 0x34 0x07 0x62 0x7c 507 508 # CHECK: extsh. 2, 3 509 0x35 0x07 0x62 0x7c 510 511 # CHECK: cntlzw 2, 3 512 0x34 0x00 0x62 0x7c 513 514 # CHECK: cntlzw. 2, 3 515 0x35 0x00 0x62 0x7c 516 517 # CHECK: popcntw 2, 3 518 0xf4 0x02 0x62 0x7c 519 520 # CHECK: extsw 2, 3 521 0xb4 0x07 0x62 0x7c 522 523 # CHECK: extsw. 2, 3 524 0xb5 0x07 0x62 0x7c 525 526 # CHECK: cntlzd 2, 3 527 0x74 0x00 0x62 0x7c 528 529 # CHECK: cntlzd. 2, 3 530 0x75 0x00 0x62 0x7c 531 532 # CHECK: popcntd 2, 3 533 0xf4 0x03 0x62 0x7c 534 535 # CHECK: bpermd 2, 3, 4 536 0xf8 0x21 0x62 0x7c 537 538 # CHECK: cmpb 7, 21, 4 539 0xf8 0x23 0xa7 0x7e 540 541 # CHECK: rlwinm 2, 3, 4, 5, 6 542 0x4c 0x21 0x62 0x54 543 544 # CHECK: rlwinm. 2, 3, 4, 5, 6 545 0x4d 0x21 0x62 0x54 546 547 # CHECK: rlwnm 2, 3, 4, 5, 6 548 0x4c 0x21 0x62 0x5c 549 550 # CHECK: rlwnm. 2, 3, 4, 5, 6 551 0x4d 0x21 0x62 0x5c 552 553 # CHECK: rlwimi 2, 3, 4, 5, 6 554 0x4c 0x21 0x62 0x50 555 556 # CHECK: rlwimi. 2, 3, 4, 5, 6 557 0x4d 0x21 0x62 0x50 558 559 # CHECK: rldicl 2, 3, 4, 5 560 0x40 0x21 0x62 0x78 561 562 # CHECK: rldicl. 2, 3, 4, 5 563 0x41 0x21 0x62 0x78 564 565 # CHECK: rldicr 2, 3, 4, 5 566 0x44 0x21 0x62 0x78 567 568 # CHECK: rldicr. 2, 3, 4, 5 569 0x45 0x21 0x62 0x78 570 571 # CHECK: rldic 2, 3, 4, 5 572 0x48 0x21 0x62 0x78 573 574 # CHECK: rldic. 2, 3, 4, 5 575 0x49 0x21 0x62 0x78 576 577 # CHECK: rldcl 2, 3, 4, 5 578 0x50 0x21 0x62 0x78 579 580 # CHECK: rldcl. 2, 3, 4, 5 581 0x51 0x21 0x62 0x78 582 583 # CHECK: rldcr 2, 3, 4, 5 584 0x52 0x21 0x62 0x78 585 586 # CHECK: rldcr. 2, 3, 4, 5 587 0x53 0x21 0x62 0x78 588 589 # CHECK: rldimi 2, 3, 4, 5 590 0x4c 0x21 0x62 0x78 591 592 # CHECK: rldimi. 2, 3, 4, 5 593 0x4d 0x21 0x62 0x78 594 595 # CHECK: slw 2, 3, 4 596 0x30 0x20 0x62 0x7c 597 598 # CHECK: slw. 2, 3, 4 599 0x31 0x20 0x62 0x7c 600 601 # CHECK: srw 2, 3, 4 602 0x30 0x24 0x62 0x7c 603 604 # CHECK: srw. 2, 3, 4 605 0x31 0x24 0x62 0x7c 606 607 # CHECK: srawi 2, 3, 4 608 0x70 0x26 0x62 0x7c 609 610 # CHECK: srawi. 2, 3, 4 611 0x71 0x26 0x62 0x7c 612 613 # CHECK: sraw 2, 3, 4 614 0x30 0x26 0x62 0x7c 615 616 # CHECK: sraw. 2, 3, 4 617 0x31 0x26 0x62 0x7c 618 619 # CHECK: sld 2, 3, 4 620 0x36 0x20 0x62 0x7c 621 622 # CHECK: sld. 2, 3, 4 623 0x37 0x20 0x62 0x7c 624 625 # CHECK: srd 2, 3, 4 626 0x36 0x24 0x62 0x7c 627 628 # CHECK: srd. 2, 3, 4 629 0x37 0x24 0x62 0x7c 630 631 # CHECK: sradi 2, 3, 4 632 0x74 0x26 0x62 0x7c 633 634 # CHECK: sradi. 2, 3, 4 635 0x75 0x26 0x62 0x7c 636 637 # CHECK: srad 2, 3, 4 638 0x34 0x26 0x62 0x7c 639 640 # CHECK: srad. 2, 3, 4 641 0x35 0x26 0x62 0x7c 642 643 # CHECK: mtspr 600, 2 644 0xa6 0x93 0x58 0x7c 645 646 # CHECK: mfspr 2, 600 647 0xa6 0x92 0x58 0x7c 648 649 # CHECK: mtcrf 123, 2 650 0x20 0xb1 0x47 0x7c 651 652 # CHECK: mfcr 2 653 0x26 0x00 0x40 0x7c 654 655 # CHECK: mtocrf 16, 2 656 0x20 0x01 0x51 0x7c 657 658 # CHECK: mfocrf 16, 8 659 0x26 0x80 0x10 0x7e 660 661 # CHECK: mtsrin 10, 12 662 0xe4 0x61 0x40 0x7d 663 # CHECK: mfsrin 10, 12 664 0x26 0x65 0x40 0x7d 665