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