1 # RUN: llvm-mc --disassemble %s -triple=xcore-xmos-elf | FileCheck %s 2 3 # 0r instructions 4 5 # CHECK: clre 6 0xed 0x07 7 8 # CHECK: get r11, id 9 0xee 0x17 10 11 # CHECK: get r11, ed 12 0xfe 0x0f 13 14 # CHECK: get r11, et 15 0xff 0x0f 16 17 # CHECK: ssync 18 0xee 0x07 19 20 # CHECK: waiteu 21 0xec 0x07 22 23 # CHECK: dcall 24 0xfc 0x07 25 26 # CHECK: dentsp 27 0xec 0x17 28 29 # CHECK: drestsp 30 0xed 0x17 31 32 # CHECK: dret 33 0xfe 0x07 34 35 # CHECK: freet 36 0xef 0x07 37 38 # CHECK: get r11, kep 39 0xef 0x17 40 41 # CHECK: get r11, ksp 42 0xfc 0x17 43 44 # CHECK: kret 45 0xfd 0x07 46 47 # CHECK: ldw et, sp[4] 48 0xfe 0x17 49 50 # CHECK: ldw sed, sp[3] 51 0xfd 0x17 52 53 # CHECK: ldw spc, sp[1] 54 0xec 0x0f 55 56 # CHECK: ldw ssr, sp[2] 57 0xee 0x0f 58 59 # CHECK: set kep, r11 60 0xff 0x07 61 62 # CHECK: stw et, sp[4] 63 0xfd 0x0f 64 65 # CHECK: stw sed, sp[3] 66 0xfc 0x0f 67 68 # CHECK: stw spc, sp[1] 69 0xed 0x0f 70 71 # CHECK: stw ssr, sp[2] 72 0xef 0x0f 73 74 # 1r instructions 75 76 # CHECK: msync res[r0] 77 0xf0 0x1f 78 79 # CHECK: mjoin res[r1] 80 0xf1 0x17 81 82 # CHECK: bau r2 83 0xf2 0x27 84 85 # CHECK: set sp, r3 86 0xf3 0x2f 87 88 # CHECK: ecallt r4 89 0xf4 0x4f 90 91 # CHECK: ecallf r5 92 0xe5 0x4f 93 94 # CHECK: bla r6 95 0xe6 0x27 96 97 # CHECK: bru r8 98 0xe8 0x2f 99 100 # CHECK: syncr res[r7] 101 0xf7 0x87 102 103 # CHECK: freer res[r8] 104 0xe8 0x17 105 106 # CHECK: setv res[r9], r11 107 0xf9 0x47 108 109 # CHECK: setev res[r10], r11 110 0xfa 0x3f 111 112 # CHECK: eeu res[r11] 113 0xfb 0x07 114 115 # CHECK: set dp, r5 116 0xe5 0x37 117 118 # CHECK: set cp, r0 119 0xf0 0x37 120 121 # CHECK: dgetreg r11 122 0xeb 0x3f 123 124 # CHECK: edu res[r8] 125 0xe8 0x07 126 127 # CHECK: kcall r2 128 0xe2 0x47 129 130 # CHECK: waitef r10 131 0xfa 0x0f 132 133 # CHECK: waitet r7 134 0xe7 0x0f 135 136 # CHECK: start t[r4] 137 0xe4 0x1f 138 139 # CHECK: clrpt res[r9] 140 0xe9 0x87 141 142 # 2r instructions 143 144 # CHECK: not r1, r8 145 0x24 0x8f 146 147 # CHECK: neg r7, r6 148 0xce 0x97 149 150 # CHECK: andnot r10, r11 151 0xab 0x2f 152 153 # CHECK: mkmsk r11, r0 154 0x4c 0xa7 155 156 # CHECK: getts r8, res[r1] 157 0x41 0x3f 158 159 # CHECK: setpt res[r2], r3 160 0xde 0x3e 161 162 # CHECK: outct res[r1], r2 163 0xc6 0x4e 164 165 # CHECK: outt res[r5], r4 166 0xd1 0x0f 167 168 # CHECK: out res[r9], r10 169 0xa9 0xaf 170 171 # CHECK: outshr res[r0], r2 172 0xd8 0xae 173 174 # CHECK: inct r7, res[r4] 175 0xdc 0x87 176 177 # CHECK: int r8, res[r3] 178 0x53 0x8f 179 180 # CHECK: in r10, res[r0] 181 0x48 0xb7 182 183 # CHECK: inshr r4, res[r2] 184 0x12 0xb7 185 186 # CHECK: chkct res[r6], r0 187 0x08 0xcf 188 189 # CHECK: testct r8, res[r3] 190 0x53 0xbf 191 192 # CHECK: testwct r2, res[r9] 193 0x39 0xc7 194 195 # CHECK: setd res[r3], r4 196 0x13 0x17 197 198 # CHECK: getst r7, res[r1] 199 0x1d 0x07 200 201 # CHECK: init t[r1]:sp, r2 202 0xc9 0x16 203 204 # CHECK: init t[r10]:pc, r1 205 0x26 0x07 206 207 # CHECK: init t[r2]:cp, r10 208 0x4a 0x1f 209 210 # CHECK: init t[r2]:dp, r3 211 0xce 0x0e 212 213 # CHECK: setpsc res[r8], r2 214 0x28 0xc7 215 216 # CHECK: zext r3, r8 217 0x2c 0x47 218 219 # CHECK: sext r9, r1 220 0x45 0x37 221 222 # CHECK: tsetmr r7, r3 223 0x1f 0x1f 224 225 # CHECK: eef r1, res[r6] 226 0x96 0x2f 227 228 # CHECK: eet r11, res[r0] 229 0x5c 0x27 230 231 # rus instructions 232 233 # CHECK: chkct res[r1], 8 234 0x34 0xcf 235 236 # CHECK: getr r11, 2 237 0x4e 0x87 238 239 # CHECK: mkmsk r4, 24 240 0x72 0xa7 241 242 # CHECK: outct res[r3], 0 243 0xdc 0x4e 244 245 # CHECK: sext r8, 16 246 0xb1 0x37 247 248 # CHECK: zext r2, 32 249 0xd8 0x46 250 251 # CHECK: peek r0, res[r5] 252 0x81 0xbf 253 254 # CHECK: endin r10, res[r1] 255 0x59 0x97 256 257 # l2r instructions 258 259 # CHECK: bitrev r1, r10 260 0x26 0xff 0xec 0x07 261 262 # CHECK: byterev r4, r1 263 0x11 0xff 0xec 0x07 264 265 # CHECK: clz r11, r10 266 0xae 0xff 0xec 0x0f 267 268 # CHECK: get r3, ps[r6] 269 0x9e 0xff 0xec 0x17 270 271 # CHECK: setc res[r5], r9 272 0x75 0xff 0xec 0x2f 273 274 # CHECK: init t[r2]:lr, r1 275 0xc6 0xfe 0xec 0x17 276 277 # CHECK: setclk res[r2], r1 278 0xd6 0xfe 0xec 0x0f 279 280 # CHECK: set ps[r9], r10 281 0xa9 0xff 0xec 0x1f 282 283 # CHECK: setrdy res[r3], r1 284 0xc7 0xfe 0xec 0x2f 285 286 # CHECK: settw res[r7], r2 287 0x9b 0xff 0xec 0x27 288 289 # CHECK: getd r8, res[r3] 290 0x53 0xff 0xec 0x1f 291 292 # CHECK: getn r10, res[r11] 293 0xbb 0xff 0xec 0x37 294 295 # CHECK: testlcl r2, res[r0] 296 0xc8 0xfe 0xec 0x27 297 298 # CHECK: setn res[r9], r7 299 0x6d 0xff 0xec 0x37 300 301 # 3r instructions 302 303 # CHECK: add r1, r2, r3 304 0x1b 0x10 305 306 # CHECK: and r11, r10, r9 307 0xb9 0x3e 308 309 # CHECK: eq r6, r1, r2 310 0x66 0x30 311 312 # CHECK: ld16s r8, r3[r4] 313 0xcc 0x82 314 315 # CHECK: ld8u r9, r1[r10] 316 0x16 0x8d 317 318 # CHECK: ldw r9, r4[r5] 319 0x91 0x4b 320 321 # CHECK: lss r7, r3, r0 322 0x7c 0xc0 323 324 # CHECK: lsu r5, r8, r6 325 0x12 0xcc 326 327 # CHECK: or r1, r3, r2 328 0x1e 0x40 329 330 # CHECK: shl r8, r2, r4 331 0xc8 0x22 332 333 # CHECK: shr r9, r7, r1 334 0x5d 0x29 335 336 # CHECK: sub r4, r2, r5 337 0x89 0x1a 338 339 # CHECK: set t[r0]:r1, r2 340 0x18 0xb8 341 342 # 2rus instructions 343 344 # CHECK: add r10, r2, 5 345 0xe9 0x92 346 347 # CHECK: eq r2, r1, 0 348 0x24 0xb0 349 350 # CHECK: ldw r5, r6[1] 351 0x19 0x09 352 353 # CHECK: shl r6, r5, 24 354 0xa6 0xa5 355 356 # CHECK: shr r3, r8, 5 357 0xf1 0xab 358 359 # CHECK: stw r3, r2[0] 360 0x38 0x00 361 362 # CHECK: sub r2, r4, 11 363 0x63 0x9d 364 365 # l3r instructions 366 367 # CHECK: ashr r5, r1, r11 368 0xd7 0xfc 0xec 0x17 369 370 # CHECK: crc32 r5, r6, r1 371 0x19 0xf9 0xec 0xaf 372 373 # CHECK: divu r9, r1, r3 374 0x97 0xf8 0xec 0x4f 375 376 # CHECK: divs r6, r7, r2 377 0x2e 0xf9 0xec 0x47 378 379 # CHECK: lda16 r11, r2[r1] 380 0xb9 0xf8 0xec 0x2f 381 382 # CHECK: lda16 r9, r3[-r11] 383 0x1f 0xfd 0xec 0x37 384 385 # CHECK: ldaw r9, r1[r2] 386 0x96 0xf8 0xec 0x1f 387 388 # CHECK: ldaw r8, r7[-r11] 389 0xcf 0xfd 0xec 0x27 390 391 # CHECK: mul r0, r4, r2 392 0xc2 0xf8 0xec 0x3f 393 394 # CHECK: remu r1, r2, r3 395 0x1b 0xf8 0xec 0xcf 396 397 # CHECK: rems r11, r10, r9 398 0xb9 0xfe 0xec 0xc7 399 400 # CHECK: st16 r5, r3[r8] 401 0xdc 0xfc 0xec 0x87 402 403 # CHECK: st8 r9, r1[r3] 404 0x97 0xf8 0xec 0x8f 405 406 # CHECK: stw r7, r10[r1] 407 0xf9 0xf9 0xec 0x07 408 409 # CHECK: xor r4, r3, r9 410 0xcd 0xfc 0xec 0x0f 411 412 # l2rus instructions 413 414 # CHECK: ashr r5, r1, 3 415 0x57 0xf8 0xec 0x97 416 417 # CHECK: ldaw r11, r10[6] 418 0x7a 0xfc 0xec 0x9f 419 420 # CHECK: ldaw r8, r2[-9] 421 0x09 0xfd 0xec 0xa7 422 423 # CHECK: inpw r6, res[r1], 8 424 0xe4 0xfc 0xee 0x97 425 426 # CHECK: outpw res[r3], r0, 2 427 0x0e 0xf8 0xed 0x97 428 429 # ru6 / lru6 instructions 430 431 # CHECK: bt r6, -5 432 0x85 0x75 433 434 # CHECK: bt r10, -451 435 0x07 0xf0 0x83 0x76 436 437 # CHECK: bt r8, 10 438 0x0a 0x72 439 440 # CHECK: bt r1, 6451 441 0x64 0xf0 0x73 0x70 442 443 # CHECK: bf r5, 8 444 0x48 0x79 445 446 # CHECK: bf r6, 65 447 0x01 0xf0 0x81 0x79 448 449 # CHECK: bf r1, 53 450 0x75 0x78 451 452 # CHECK: bf r10, 101 453 0x01 0xf0 0xa5 0x7a 454 455 # CHECK: ldaw r11, dp[63] 456 0xff 0x62 457 458 # CHECK: ldaw r1, dp[456] 459 0x07 0xf0 0x48 0x60 460 461 # CHECK: ldaw cp, dp[5] 462 0x05 0x63 463 464 # CHECK: ldaw sp, dp[9929] 465 0x9b 0xf0 0x89 0x63 466 467 # CHECK: ldaw r3, sp[2] 468 0xc2 0x64 469 470 # CHECK: ldaw r8, sp[65535] 471 0xff 0xf3 0x3f 0x66 472 473 # CHECK: ldaw sp, sp[41] 474 0xa9 0x67 475 476 # CHECK: ldaw sp, sp[13121] 477 0xcd 0xf0 0x81 0x67 478 479 # CHECK: ldc r3, 30 480 0xde 0x68 481 482 # CHECK: ldc r11, 1000 483 0x0f 0xf0 0xe8 0x6a 484 485 # CHECK: ldc sp, 0 486 0x80 0x6b 487 488 # CHECK: ldc lr, 81 489 0x01 0xf0 0xd1 0x6b 490 491 # CHECK: ldw r0, cp[4] 492 0x04 0x6c 493 494 # CHECK: ldw r1, cp[32345] 495 0xf9 0xf1 0x59 0x6c 496 497 # CHECK: ldw cp, cp[8] 498 0x08 0x6f 499 500 # CHECK: ldw sp, cp[10222] 501 0x9f 0xf0 0xae 0x6f 502 503 # CHECK: ldw r10, dp[16] 504 0x90 0x5a 505 506 # CHECK: ldw r10, dp[76] 507 0x01 0xf0 0x8c 0x5a 508 509 # CHECK: ldw lr, dp[8] 510 0xc8 0x5b 511 512 # CHECK: ldw dp, dp[33221] 513 0x07 0xf2 0x45 0x5b 514 515 # CHECK: ldw r8, sp[51] 516 0x33 0x5e 517 518 # CHECK: ldw r8, sp[1225] 519 0x13 0xf0 0x09 0x5e 520 521 # CHECK: ldw cp, sp[31] 522 0x1f 0x5f 523 524 # CHECK: ldw sp, sp[1000] 525 0x0f 0xf0 0xa8 0x5f 526 527 # CHECK: setc res[r5], 36 528 0x64 0xe9 529 530 # CHECK: setc res[r2], 40312 531 0x75 0xf2 0xb8 0xe8 532 533 # CHECK: stw r8, dp[14] 534 0x0e 0x52 535 536 # CHECK: stw r9, dp[654] 537 0x0a 0xf0 0x4e 0x52 538 539 # CHECK: stw lr, dp[23] 540 0xd7 0x53 541 542 # CHECK: stw sp, dp[44442] 543 0xb6 0xf2 0x9a 0x53 544 545 # CHECK: stw r1, sp[32] 546 0x60 0x54 547 548 # CHECK: stw r0, sp[8761] 549 0x88 0xf0 0x39 0x54 550 551 # CHECK: stw cp, sp[63] 552 0x3f 0x57 553 554 # CHECK: stw lr, sp[4391] 555 0x44 0xf0 0xe7 0x57 556 557 # u6 / lu6 instructions 558 559 # CHECK: bu -20 560 0x14 0x77 561 562 # CHECK: bu -1000 563 0x0f 0xf0 0x28 0x77 564 565 # CHECK: bu 24 566 0x18 0x73 567 568 # CHECK: bu 2231 569 0x22 0xf0 0x37 0x73 570 571 # CHECK: extsp 9 572 0x89 0x77 573 574 # CHECK: extsp 5721 575 0x59 0xf0 0x99 0x77 576 577 # CHECK: clrsr 60 578 0x3c 0x7b 579 580 # CHECK: clrsr 64391 581 0xee 0xf3 0x07 0x7b 582 583 # CHECK: entsp 1 584 0x41 0x77 585 586 # CHECK: entsp 70 587 0x01 0xf0 0x46 0x77 588 589 # CHECK: ldaw r11, cp[5] 590 0x45 0x7f 591 592 # CHECK: ldaw r11, cp[33000] 593 0x03 0xf2 0x68 0x7f 594 595 # CHECK: retsp 40 596 0xe8 0x77 597 598 # CHECK: retsp 52010 599 0x2c 0xf3 0xea 0x77 600 601 # CHECK: setsr 42 602 0x6a 0x7b 603 604 # CHECK: setsr 21863 605 0x55 0xf1 0x67 0x7b 606 607 # CHECK: extdp 4 608 0x84 0x73 609 610 # CHECK: extdp 554 611 0x08 0xf0 0xaa 0x73 612 613 # CHECK: blat 9 614 0x49 0x73 615 616 # CHECK: blat 61212 617 0xbc 0xf3 0x5c 0x73 618 619 # CHECK: getsr r11, 54 620 0x36 0x7f 621 622 # CHECK: getsr r11, 442 623 0x06 0xf0 0x3a 0x7f 624 625 # CHECK: kcall 11 626 0xcb 0x73 627 628 # CHECK: kcall 4001 629 0x3e 0xf0 0xe1 0x73 630 631 # CHECK: kentsp 22 632 0x96 0x7b 633 634 # CHECK: kentsp 8793 635 0x89 0xf0 0x99 0x7b 636 637 # CHECK: krestsp 0 638 0xc0 0x7b 639 640 # CHECK: krestsp 55312 641 0x60 0xf3 0xd0 0x7b 642 643 # u10 / lu10 instructions 644 645 # CHECK: ldap r11, 40 646 0x28 0xd8 647 648 # CHECK: ldap r11, 53112 649 0x33 0xf0 0x78 0xdb 650 651 # CHECK: ldap r11, -22 652 0x16 0xdc 653 654 # CHECK: ldap r11, -9999 655 0x09 0xf0 0x0f 0xdf 656 657 # CHECK: bl 8 658 0x08 0xd0 659 660 # CHECK: bl 38631 661 0x25 0xf0 0xe7 0xd2 662 663 # CHECK: bl -222 664 0xde 0xd4 665 666 # CHECK: bl -55132 667 0x35 0xf0 0x5c 0xd7 668 669 # CHECK: bla cp[500] 670 0xf4 0xe1 671 672 # CHECK: bla cp[413742] 673 0x94 0xf1 0x2e 0xe0 674 675 # CHECK: ldw r11, cp[132] 676 0x84 0xe4 677 678 # CHECK: ldw r11, cp[102741] 679 0x64 0xf0 0x55 0xe5 680 681 # l6r instructions 682 683 # CHECK: lmul r11, r0, r2, r5, r8, r10 684 0xf9 0xfa 0x02 0x06 685 686 # l5r instructions 687 688 # CHECK: ladd r10, r2, r5, r1, r7 689 0xe5 0xf8 0xfb 0x06 690 691 # CHECK: ldivu r5, r6, r3, r9, r8 692 0x54 0xfe 0x0b 0x07 693 694 # CHECK: lsub r1, r8, r7, r11, r5 695 0xcf 0xfd 0x85 0x0f 696 697 # l4r instructions 698 699 # CHECK: crc8 r6, r3, r4, r11 700 0x73 0xfd 0xe6 0x07 701 702 # CHECK: maccs r11, r8, r2, r4 703 0xf8 0xfa 0xe8 0x0f 704 705 # CHECK: maccu r0, r2, r5, r8 706 0x44 0xfd 0xf2 0x07 707