Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/blob/main/om/disasm/sm121_dis.om # CUDApp CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / om / disasm / sm121_dis.om` 1376 lines · 25888 bytes Raw Blame History 1 note sm121_dis.om: Omega's own sm_121 (GB10) disassembler, row C6 of docs/OMEGA.md (CUDA++ C6, DRA-475). 2 note It turns one 128-bit instruction word into the text nvdisasm 13.0.85 prints for it. It replaces the decoder 3 note of src/omega_sm121_disasm.c, which stays compiled only behind CUDAPP_MIGRATION_PENDING_C_DISASM (and the 4 note DIFF build) as the differential oracle. nvdisasm is an offline oracle only (tools/sm121dis/check.sh). 5 note 6 note Layout of a word (lo = bits 0..63, hi = bits 64..127): opcode bits 0..11; guard predicate bits 12..14 with 7 note its negation at 15 (7 and no negation = no guard); registers at 16, 24, 32 and hi 0; modifiers in hi 8..40; 8 note control from hi 41 on (stall, barriers, yield, reuse), which is not part of the text. 9 note 10 note A row is one instruction form: its fixed bits (lov, hiv) and a format, the exact C format string packed 11 note eight ASCII bytes per ulong, little-endian. Each %x code names the bits it reads (fn fld). Every other 12 note bit of lo and of hi 0..40 (outside the guard) must equal the row's fixed value, or the row does not match. 13 note Rows are tried in the C table's order; only the rows of the word's opcode are built (fn rows), which is 14 note the same order restricted to the rows that can match. The row table (fns rowsa, rowsb, rowsc) was 15 note generated by Wolfram from the C ROWS table (evidence/C6-DISASM-OM/wolfram-rows.txt). 16 note The rows of the #280 integration (ATOMG.E.MIN.64 and the conversions and binary64 forms of BlackwellIR ops 17 note 64..79) were added on 2026-11-10; their constants are Wolfram's (evidence/INTEG-280-`20261110`/wolfram-rows.txt). 18 note A word that matches no form prints ?? 0x (16 hex digits each) and is reported, never guessed. 19 note The C file's float immediate form (%f) is used by no row; here %f refuses (overflow flag) instead. 20 note 21 note Call: sm121_dis lo hi pc out. pc is the byte address of the word. out receives the text, no trailing 22 note semicolon. Result: bits 0..15 the text length, bit 16 set when no form matched, bit 17 set when the word 23 note is an EXIT (opcode 0x94d, any guard), bit 18 set when the text did not fit 255 bytes. 24 note State s: 0 lo, 1 hi, 2 pc, 3 write position, 4 refused (overflow or an unknown code), 5 a field value the 25 note oracle names but this decoder does not (the word is then reported as ??). 26 27 const HIM ulong `2199023255551` 28 const P31 ulong `2147483648` 29 const P55 ulong `36028797018963968` 30 const SX56 ulong `18374686479671623680` 31 const SX32 ulong `18446744069414584320` 32 33 note bits at .. at+n-1 of v (n below 64) 34 fn bits v ulong at ulong n ulong to ulong 35 ret and shr v at sub shl ulong 1 n 1 36 end 37 38 note append one byte; past 255 bytes mark the text refused 39 fn pc1 o edit uchar 256 s edit ulong 8 c ulong to void 40 a = get s 3 41 if lt a 255 42 put o a uchar c 43 put s 3 add a 1 44 else 45 put s 4 1 46 end 47 end 48 49 note append up to eight bytes packed little-endian in v, stopping at the first zero byte 50 fn lit o edit uchar 256 s edit ulong 8 v ulong to void 51 x = v 52 for k ulong 8 53 if eq x 0 54 break 55 end 56 pc1 o s and x 255 57 x = shr x 8 58 end 59 end 60 61 note unsigned decimal 62 fn dec o edit uchar 256 s edit ulong 8 v ulong to void 63 d = new ulong 20 0 64 x = v 65 n = ulong 0 66 for k ulong 20 67 put d n rem x 10 68 n = add n 1 69 x = div x 10 70 if eq x 0 71 break 72 end 73 end 74 for k ulong 20 75 if eq n 0 76 break 77 end 78 n = sub n 1 79 pc1 o s add 48 get d n 80 end 81 end 82 83 fn hexd d ulong to ulong 84 if lt d 10 85 ret add d 48 86 end 87 ret add d 87 88 end 89 90 note lowercase hex without leading zeros, no prefix 91 fn hexn o edit uchar 256 s edit ulong 8 v ulong to void 92 n = ulong 1 93 for k ulong 15 94 if eq shr v mul n 4 0 95 break 96 end 97 n = add n 1 98 end 99 for k ulong 16 100 if eq n 0 101 break 102 end 103 n = sub n 1 104 pc1 o s hexd and shr v mul n 4 15 105 end 106 end 107 108 note 0x and lowercase hex (printf 0x%x) 109 fn hexu o edit uchar 256 s edit ulong 8 v ulong to void 110 lit o s 30768 111 hexn o s v 112 end 113 114 note exactly 16 hex digits (printf %016llx) 115 fn hex16 o edit uchar 256 s edit ulong 8 v ulong to void 116 n = ulong 16 117 for k ulong 16 118 n = sub n 1 119 pc1 o s hexd and shr v mul n 4 15 120 end 121 end 122 123 note v read as an n-bit two's complement number: -0x... or 0x... 124 fn hexs o edit uchar 256 s edit ulong 8 v ulong n ulong to void 125 if ge v shl ulong 1 sub n 1 126 pc1 o s 45 127 hexu o s sub shl ulong 1 n v 128 ret 129 end 130 hexu o s v 131 end 132 133 note a predicate: ! when negated, PT for 7, else P and the number 134 fn prd o edit uchar 256 s edit ulong 8 p ulong ng ulong to void 135 if ne ng 0 136 pc1 o s 33 137 end 138 if eq p 7 139 lit o s 21584 140 ret 141 end 142 pc1 o s 80 143 dec o s p 144 end 145 146 note a register with prefix pf (R or UR): Z for 255, else the number 147 fn reg o edit uchar 256 s edit ulong 8 pf ulong v ulong to void 148 lit o s pf 149 if eq v 255 150 pc1 o s 90 151 ret 152 end 153 dec o s v 154 end 155 156 note the special registers nvdisasm 13.0.85 prints by name (107 of 256, an S2R sweep; Wolfram bitmap): one the 157 note table above does not name is reported (s 5 set, the word prints ??), never printed as SR and its number 158 fn srnamed v ulong to bool 159 w = ulong 0 160 q = div v 64 161 if eq q 0 162 w = `9223363172042244111` 163 end 164 if eq q 1 165 w = `18446744069418713119` 166 end 167 if eq q 2 168 w = 61247 169 end 170 if eq q 3 171 w = `9223372036854775808` 172 end 173 ret ne and shr w rem v 64 1 0 174 end 175 176 note special register names nvdisasm prints, else SR and the number 177 fn srn o edit uchar 256 s edit ulong 8 v ulong to void 178 if eq v 33 179 lit o s `6354091206005183059` 180 ret 181 end 182 if eq v 34 183 lit o s `6426148800043110995` 184 ret 185 end 186 if eq v 35 187 lit o s `6498206394081038931` 188 ret 189 end 190 if eq v 37 191 lit o s `4920535898042356307` 192 lit o s 22574 193 ret 194 end 195 if eq v 38 196 lit o s `4920535898042356307` 197 lit o s 22830 198 ret 199 end 200 if eq v 39 201 lit o s `4920535898042356307` 202 lit o s 23086 203 ret 204 end 205 if eq v 0 206 lit o s `5279712180522930771` 207 lit o s 68 208 ret 209 end 210 if eq v 80 211 lit o s `5423265565250638419` 212 lit o s 20300 213 ret 214 end 215 if eq v 81 216 lit o s `5423265565250638419` 217 lit o s 18760 218 ret 219 end 220 note the device-side trace emitter's timer pair, SR_GLOBALTIMERLO and SR_GLOBALTIMERHI 221 if eq v 82 222 lit o s `4702408149961757267` 223 lit o s `5714032484829189196` 224 ret 225 end 226 if eq v 83 227 lit o s `4702408149961757267` 228 lit o s `5280561020694778956` 229 ret 230 end 231 if srnamed v 232 put s 5 1 233 ret 234 end 235 lit o s 21075 236 dec o s v 237 end 238 239 note float compare names 0..15: F LT EQ LE GT NE GE NUM NAN LTU EQU LEU GTU NEU GEU T 240 fn fcmp v ulong to ulong 241 if eq v 0 242 ret 70 243 end 244 if eq v 1 245 ret 21580 246 end 247 if eq v 2 248 ret 20805 249 end 250 if eq v 3 251 ret 17740 252 end 253 if eq v 4 254 ret 21575 255 end 256 if eq v 5 257 ret 17742 258 end 259 if eq v 6 260 ret 17735 261 end 262 if eq v 7 263 ret `5068110` 264 end 265 if eq v 8 266 ret `5128526` 267 end 268 if eq v 9 269 ret `5592140` 270 end 271 if eq v 10 272 ret `5591365` 273 end 274 if eq v 11 275 ret `5588300` 276 end 277 if eq v 12 278 ret `5592135` 279 end 280 if eq v 13 281 ret `5588302` 282 end 283 if eq v 14 284 ret `5588295` 285 end 286 ret 84 287 end 288 289 note integer compare names 0..7: F LT EQ LE GT NE GE T (the float names, T for 7) 290 fn icmp v ulong to ulong 291 if eq v 7 292 ret 84 293 end 294 ret fcmp v 295 end 296 297 note memory access sizes 0..7: .U8 .S8 .U16 .S16 (none) .64 .128 .U.128 298 fn msz v ulong to ulong 299 if eq v 0 300 ret `3691822` 301 end 302 if eq v 1 303 ret `3691310` 304 end 305 if eq v 2 306 ret `909202734` 307 end 308 if eq v 3 309 ret `909202222` 310 end 311 if eq v 4 312 ret 0 313 end 314 if eq v 5 315 ret `3421742` 316 end 317 if eq v 6 318 ret `942813486` 319 end 320 ret `61788224640302` 321 end 322 323 fn pk h ulong at ulong n ulong to ulong 324 ret add add mul h 65536 mul at 256 n 325 end 326 327 note operand code c: hi word flag, first bit and width packed by pk; 0 for a code without a field 328 fn fld c ulong to ulong 329 note d a b c (R registers) and D A B C (uniform registers) 330 if or eq c 100 eq c 68 331 ret pk 0 16 8 332 end 333 if or eq c 97 eq c 65 334 ret pk 0 24 8 335 end 336 if or eq c 98 eq c 66 337 ret pk 0 32 8 338 end 339 if or eq c 99 eq c 67 340 ret pk 1 0 8 341 end 342 note i s f j Y: a 32-bit immediate (unsigned, signed, float, ISETP signed, BSSY distance) 343 if or or eq c 105 eq c 115 eq c 102 344 ret pk 0 32 32 345 end 346 if or eq c 106 eq c 89 347 ret pk 0 32 32 348 end 349 note K c[bank][offset] offset 38..53 bank 54..58; U the uniform load, offset 37..53 350 if eq c 75 351 ret pk 0 38 21 352 end 353 if eq c 85 354 ret pk 0 37 22 355 end 356 note o signed 24-bit address offset; y convergence barrier 357 if eq c 111 358 ret pk 0 40 24 359 end 360 if eq c 121 361 ret pk 0 16 4 362 end 363 note P Q R predicates, R with its negation at hi 26 364 if eq c 80 365 ret pk 1 17 3 366 end 367 if eq c 81 368 ret pk 1 20 3 369 end 370 if eq c 82 371 ret pk 1 23 4 372 end 373 note l LOP3 table and S special register at hi 8; h m SHFL lane distance and clamp 374 if or eq c 108 eq c 83 375 ret pk 1 8 8 376 end 377 if eq c 104 378 ret pk 0 53 5 379 end 380 if eq c 109 381 ret pk 0 40 13 382 end 383 note G g integer and float compare; Z ISETP signed flag; z memory size; N M IADD3 negations 384 if eq c 71 385 ret pk 1 12 3 386 end 387 if eq c 103 388 ret pk 1 12 4 389 end 390 if eq c 90 391 ret pk 1 9 1 392 end 393 if eq c 122 394 ret pk 1 9 3 395 end 396 if eq c 78 397 ret pk 1 8 1 398 end 399 if eq c 77 400 ret pk 0 63 1 401 end 402 ret 0 403 end 404 405 note the bits field f reads, in lo (h 0) or hi (h 1) 406 fn fmsk f ulong h ulong to ulong 407 if eq f 0 408 ret 0 409 end 410 if ne shr f 16 h 411 ret 0 412 end 413 ret shl sub shl ulong 1 and f 255 1 and shr f 8 255 414 end 415 416 note the BRA distance: 4-byte units, low 8 bits at 16..23, the rest at 34..63 and hi 0..17 417 fn tmsk h ulong to ulong 418 if eq h 0 419 ret or shl ulong 255 16 shl sub shl ulong 1 30 1 34 420 end 421 ret sub shl ulong 1 18 1 422 end 423 424 note the value field f reads from the word in s 425 fn fval s view ulong 8 f ulong to ulong 426 v = get s 0 427 if ne shr f 16 0 428 v = get s 1 429 end 430 ret bits v and shr f 8 255 and f 255 431 end 432 433 note byte i of row r's format 434 fn fb t view ulong 80 r ulong i ulong to ulong 435 w = get t add add mul r 10 2 div i 8 436 ret and shr w mul rem i 8 8 255 437 end 438 439 note the bits row r's format reads, in lo (h 0) or hi (h 1) 440 fn rmask t view ulong 80 r ulong h ulong to ulong 441 m = ulong 0 442 i = ulong 0 443 for k ulong 64 444 if ge i 63 445 break 446 end 447 c = fb t r i 448 if eq c 0 449 break 450 end 451 if eq c 37 452 i = add i 1 453 d = fb t r i 454 if eq d 84 455 m = or m tmsk h 456 else 457 m = or m fmsk fld d h 458 end 459 end 460 i = add i 1 461 end 462 ret m 463 end 464 465 note row r matches when every bit outside its fields and the guard equals the row's 466 fn hit t view ulong 80 r ulong lb ulong hb ulong to bool 467 b = mul r 10 468 lm = not or rmask t r 0 61440 469 hm = and HIM not rmask t r 1 470 if ne and lb lm and get t b lm 471 ret false 472 end 473 ret eq and hb hm and get t add b 1 hm 474 end 475 476 note print the signed 56-bit BRA target and the BSSY target as unsigned byte addresses 477 fn btgt s view ulong 8 to ulong 478 lo = get s 0 479 u = or or bits lo 16 8 shl bits lo 34 30 8 shl bits get s 1 0 18 38 480 if ge u P55 481 u = or u SX56 482 end 483 ret add add get s 2 16 mul u 4 484 end 485 486 fn ytgt s view ulong 8 to ulong 487 v = bits get s 0 32 32 488 if ge v P31 489 v = or v SX32 490 end 491 ret add add get s 2 16 v 492 end 493 494 note one operand 495 fn opd o edit uchar 256 s edit ulong 8 c ulong to void 496 v = fval s fld c 497 if or or or eq c 100 eq c 97 eq c 98 eq c 99 498 reg o s 82 v 499 ret 500 end 501 if or or or eq c 68 eq c 65 eq c 66 eq c 67 502 reg o s 21077 v 503 ret 504 end 505 if or or or eq c 105 eq c 108 eq c 104 eq c 109 506 hexu o s v 507 ret 508 end 509 if or eq c 115 eq c 106 510 hexs o s v 32 511 ret 512 end 513 if eq c 75 514 lit o s `2016435043` 515 hexn o s bits get s 0 54 5 516 lit o s `2016435037` 517 hexn o s bits get s 0 38 16 518 pc1 o s 93 519 ret 520 end 521 if eq c 85 522 lit o s `2016435043` 523 hexn o s bits get s 0 54 5 524 lit o s `2016435037` 525 hexn o s bits get s 0 37 17 526 pc1 o s 93 527 ret 528 end 529 if eq c 111 530 if ne v 0 531 pc1 o s 43 532 hexs o s v 24 533 end 534 ret 535 end 536 if eq c 89 537 hexu o s ytgt s 538 ret 539 end 540 if eq c 121 541 pc1 o s 66 542 dec o s v 543 ret 544 end 545 if or eq c 80 eq c 81 546 prd o s v 0 547 ret 548 end 549 if eq c 82 550 prd o s and v 7 and shr v 3 1 551 ret 552 end 553 if eq c 83 554 srn o s v 555 ret 556 end 557 if eq c 71 558 lit o s icmp v 559 ret 560 end 561 if eq c 103 562 lit o s fcmp v 563 ret 564 end 565 if eq c 90 566 if eq v 0 567 lit o s `842224942` 568 end 569 ret 570 end 571 if eq c 122 572 lit o s msz v 573 ret 574 end 575 if or eq c 78 eq c 77 576 if ne v 0 577 pc1 o s 45 578 end 579 ret 580 end 581 if eq c 84 582 hexu o s btgt s 583 ret 584 end 585 put s 4 1 586 end 587 588 note write row r's text 589 fn rend o edit uchar 256 s edit ulong 8 t view ulong 80 r ulong to void 590 i = ulong 0 591 for k ulong 64 592 if ge i 64 593 break 594 end 595 c = fb t r i 596 if eq c 0 597 break 598 end 599 if eq c 37 600 i = add i 1 601 if ge i 64 602 put s 4 1 603 ret 604 end 605 opd o s fb t r i 606 else 607 pc1 o s c 608 end 609 i = add i 1 610 end 611 end 612 613 note IMAD with an immediate: nvdisasm names the special cases. CUDA 13.0 -b SM121 on 2^1..2^31 with Rc = RZ 614 note (2026-10-27): plain IMAD for 2^16 and 2^31, .SHL for every other power. 615 fn imadn imm ulong c ulong to ulong 616 if eq imm 0 617 ret 1 618 end 619 if eq imm 1 620 if eq c 255 621 ret 1 622 end 623 ret 2 624 end 625 if ne c 255 626 ret 0 627 end 628 if ne and imm sub imm 1 0 629 ret 0 630 end 631 n = ulong 0 632 x = imm 633 for k ulong 32 634 if ne and x 1 0 635 break 636 end 637 x = shr x 1 638 n = add n 1 639 end 640 if or eq n 16 eq n 31 641 ret 0 642 end 643 ret 3 644 end 645 646 fn imadi o edit uchar 256 s edit ulong 8 lb ulong hb ulong to bool 647 if ne and lb 4095 2084 648 ret false 649 end 650 if ne and hb not ulong 255 `126747136` 651 ret false 652 end 653 imm = bits lb 32 32 654 c = and hb 255 655 k = imadn imm c 656 if eq k 0 657 lit o s `1145130313` 658 end 659 if eq k 1 660 lit o s `6219274471530909001` 661 end 662 if eq k 2 663 lit o s `4918292731127745865` 664 lit o s 68 665 end 666 if eq k 3 667 lit o s `5496734803384421705` 668 end 669 pc1 o s 32 670 reg o s 82 bits lb 16 8 671 lit o s 8236 672 reg o s 82 bits lb 24 8 673 lit o s 8236 674 hexs o s imm 32 675 lit o s 8236 676 reg o s 82 c 677 ret true 678 end 679 680 fn rowsa op ulong t edit ulong 80 to ulong 681 if eq op 2050 682 note MOV %d, %i 683 put t 0 30722 684 put t 1 3840 685 put t 2 `2318338018808057677` 686 put t 3 26917 687 ret 1 688 end 689 if eq op 514 690 note MOV %d, %b 691 put t 0 `4278219266` 692 put t 1 3840 693 put t 2 `2318338018808057677` 694 put t 3 25125 695 note MOV %d, %b 696 put t 10 29186 697 put t 11 3840 698 put t 12 `2318338018808057677` 699 put t 13 25125 700 ret 2 701 end 702 if eq op 2329 703 note S2R %d, %S 704 put t 0 31001 705 put t 2 `2318338018807788115` 706 put t 3 21285 707 ret 1 708 end 709 if eq op 2946 710 note LDC %d, %K 711 put t 0 `4278221698` 712 put t 1 2048 713 put t 2 `2318338018806809676` 714 put t 3 19237 715 note LDC.64 %d, %K 716 put t 10 `4278221698` 717 put t 11 2560 718 put t 12 `2675195585967113292` 719 put t 13 `322745412708` 720 ret 2 721 end 722 if eq op 1964 723 note LDCU %D, %U 724 put t 0 `4278220716` 725 put t 1 `134219776` 726 put t 2 `3189715256884806732` 727 put t 3 `5580064` 728 note LDCU.64 %D, %U 729 put t 10 `4278220716` 730 put t 11 `134220288` 731 put t 12 `2320539280629515340` 732 put t 13 `93617941922853` 733 ret 2 734 end 735 if eq op 548 736 note IMAD %d, %a, %b, %c 737 put t 0 29220 738 put t 1 `126747136` 739 put t 2 `3198722455854206281` 740 put t 3 `3198159505500218656` 741 put t 4 `6497568` 742 ret 1 743 end 744 if eq op 3108 745 note IMAD %d, %a, %B, %c 746 put t 0 31780 747 put t 1 `260964864` 748 put t 2 `3198722455854206281` 749 put t 3 `3189152306245477664` 750 put t 4 `6497568` 751 ret 1 752 end 753 if eq op 2085 754 note IMAD.WIDE.U32 %d, %a, %s, %c 755 put t 0 30757 756 put t 1 `126746624` 757 put t 2 `4920559924104219977` 758 put t 3 `7216209377912761925` 759 put t 4 `8297073263480479788` 760 put t 5 `1663377452` 761 ret 1 762 end 763 if eq op 551 764 note IMAD.HI.U32 %d, %a, %b, %c 765 put t 0 29223 766 put t 1 `126746624` 767 put t 2 `3335276362595388745` 768 put t 3 `2318338018805691221` 769 put t 4 `2318335819782054181` 770 put t 5 25381 771 ret 1 772 end 773 if eq op 528 774 note IADD3 %d, PT, PT, %N%a, %M%b, %c 775 put t 0 29200 776 put t 1 `134209536` 777 put t 2 `7216209382491832649` 778 put t 3 `6075391272087986220` 779 put t 4 `2318334721041702956` 780 put t 5 `7144151758890421541` 781 ret 1 782 end 783 if eq op 2064 784 note IADD3 %d, PT, PT, %N%a, %s, %c 785 put t 0 30736 786 put t 1 `134209536` 787 put t 2 `7216209382491832649` 788 put t 3 `6075391272087986220` 789 put t 4 `2318334721041702956` 790 put t 5 `109011104723749` 791 ret 1 792 end 793 if eq op 530 794 note LOP3.LUT %d, %a, %b, %c, %l, %R 795 put t 0 29202 796 put t 1 917504 797 put t 2 `6076847033519460172` 798 put t 3 `3197878030523704608` 799 put t 4 `3198440980476994848` 800 put t 5 `23121768204739872` 801 ret 1 802 end 803 if eq op 2066 804 note LOP3.LUT %d, %a, %i, %c, %l, %R 805 put t 0 30738 806 put t 1 917504 807 put t 2 `6076847033519460172` 808 put t 3 `3197878030523704608` 809 put t 4 `3198440980477453600` 810 put t 5 `23121768204739872` 811 ret 1 812 end 813 if eq op 2073 814 note SHF.R.U32.HI %d, %a, %i, %c 815 put t 0 30745 816 put t 1 71168 817 put t 2 `3698913599453284435` 818 put t 3 `3198722455938543154` 819 put t 4 `3200129830337193248` 820 put t 5 `6497568` 821 note SHF.L.U32 %d, %a, %i, %c 822 put t 10 30745 823 put t 11 1536 824 put t 12 `3698913573683480659` 825 put t 13 `7000036570848108594` 826 put t 14 `7144151759007850540` 827 ret 2 828 end 829 if eq op 537 830 note SHF.R.U32.HI %d, %a, %b, %c 831 put t 0 29209 832 put t 1 71168 833 put t 2 `3698913599453284435` 834 put t 3 `3198722455938543154` 835 put t 4 `3198159505500218656` 836 put t 5 `6497568` 837 note SHF.L.U32 %d, %a, %b, %c 838 put t 10 29209 839 put t 11 1536 840 put t 12 `3698913573683480659` 841 put t 13 `7000036570848108594` 842 put t 14 `7144151758890410028` 843 ret 2 844 end 845 ret 0 846 end 847 848 fn rowsb op ulong t edit ulong 80 to ulong 849 if eq op 524 850 note ISETP.%G%Z.AND %P, %Q, %a, %b, %R 851 put t 0 29196 852 put t 1 112 853 put t 2 `5126554673377268553` 854 put t 3 `2675213281549769253` 855 put t 4 `2675186905684913232` 856 put t 5 `2675186978699357281` 857 put t 6 82 858 ret 1 859 end 860 if eq op 2060 861 note ISETP.%G%Z.AND %P, %Q, %a, %j, %R 862 put t 0 30732 863 put t 1 112 864 put t 2 `5126554673377268553` 865 put t 3 `2675213281549769253` 866 put t 4 `2675186905684913232` 867 put t 5 `2675187013059095649` 868 put t 6 82 869 ret 1 870 end 871 if eq op 3084 872 note ISETP.%G%Z.AND %P, %Q, %a, %B, %R 873 put t 0 31756 874 put t 1 `134217840` 875 put t 2 `5126554673377268553` 876 put t 3 `2675213281549769253` 877 put t 4 `2675186905684913232` 878 put t 5 `2675186841260403809` 879 put t 6 82 880 ret 1 881 end 882 if eq op 519 883 note SEL %d, %a, %b, %R 884 put t 0 29191 885 put t 2 `2318338018807399763` 886 put t 3 `2318335819782054181` 887 put t 4 21029 888 ret 1 889 end 890 if eq op 2055 891 note SEL %d, %a, %i, %R 892 put t 0 30727 893 put t 2 `2318338018807399763` 894 put t 3 `2318343516363448613` 895 put t 4 21029 896 ret 1 897 end 898 if eq op 545 899 note FADD %d, %a, %b 900 put t 0 29217 901 put t 2 `3198722455854399814` 902 put t 3 `27625367831389472` 903 note FADD %d, %a, -%b 904 put t 10 `9223372036854805025` 905 put t 12 `3198722455854399814` 906 put t 13 `7072108406061999392` 907 ret 2 908 end 909 if eq op 544 910 note FMUL %d, %a, %b 911 put t 0 29216 912 put t 1 `4194304` 913 put t 2 `3198722455989734726` 914 put t 3 `27625367831389472` 915 ret 1 916 end 917 if eq op 547 918 note FFMA %d, %a, %b, %c 919 put t 0 29219 920 put t 2 `3198722455804659270` 921 put t 3 `3198159505500218656` 922 put t 4 `6497568` 923 ret 1 924 end 925 if eq op 521 926 note FMNMX %d, %a, %b, %R 927 put t 0 29193 928 put t 2 `7216209541557275974` 929 put t 3 `7072094164835704876` 930 put t 4 `1378164780` 931 ret 1 932 end 933 if eq op 523 934 note FSETP.%g.AND %P, %Q, %a, %b, %R 935 put t 0 29195 936 put t 2 `7432397682590962502` 937 put t 3 `3193092956320842030` 938 put t 4 `3197878030522459424` 939 put t 5 `23121768204084512` 940 ret 1 941 end 942 if eq op 581 943 note I2FP.F32.U32 %d, %b 944 put t 0 29253 945 put t 1 `2101248` 946 put t 2 `3617312090437857865` 947 put t 3 `3198722455551300910` 948 put t 4 `6432032` 949 note I2FP.F32.S32 %d, %b 950 put t 10 29253 951 put t 11 `2102272` 952 put t 12 `3617312090437857865` 953 put t 13 `3198722455551300398` 954 put t 14 `6432032` 955 ret 2 956 end 957 if eq op 773 958 note F2I.U32.TRUNC.NTZ %d, %b 959 put t 0 29445 960 put t 1 `2158592` 961 put t 2 `3328779515522003526` 962 put t 3 `6074843813981278804` 963 put t 4 `7072094164886036570` 964 ret 1 965 end 966 if eq op 574 967 note F2FP.SATFINITE.E4M3.F32.PACK_AB_MERGE_C %d, %a, %b, %c 968 put t 0 29246 969 put t 1 `75526144` 970 put t 2 `6071225231052517958` 971 put t 3 `4984998065855154502` 972 put t 4 `3328779451096059188` 973 put t 5 `6864120659606454608` 974 put t 6 `2324806583807264077` 975 put t 7 `2318334720270427173` 976 put t 8 `109011104719397` 977 note F2FP.BF16.F32.PACK_AB %d, %a, %b 978 put t 10 29246 979 put t 11 4351 980 put t 12 `3550598122910921286` 981 put t 13 `4706312403745648182` 982 put t 14 `7216209446867782467` 983 put t 15 `7072094164835704876` 984 ret 2 985 end 986 if eq op 572 987 note HMMA.16816.F32.BF16 %d, %a, %b, %c 988 put t 0 29244 989 put t 1 268288 990 put t 2 `4050478989600181576` 991 put t 3 `4768804251234088497` 992 put t 4 `2318338018805952838` 993 put t 5 `2318335819782054181` 994 put t 6 25381 995 note HMMA.16816.F32 %d, %a, %b, %c 996 put t 10 29244 997 put t 11 6144 998 put t 12 `4050478989600181576` 999 put t 13 `2675193374460229169` 1000 put t 14 `2675186974404389988` 1001 put t 15 `425824627810` 1002 ret 2 1003 end 1004 if eq op 634 1005 note QMMA.16832.F32.E4M3.E4M3 %d, %a, %b, %c 1006 put t 0 29306 1007 put t 1 11264 1008 put t 2 `4050478989600181585` 1009 put t 3 `4984977033347871283` 1010 put t 4 `3696668340873547060` 1011 put t 5 `3197878030523704608` 1012 put t 6 `27906842808165664` 1013 ret 1 1014 end 1015 ret 0 1016 end 1017 1018 fn rowsc op ulong t edit ulong 80 to ulong 1019 if eq op 776 1020 note MUFU.EX2 %d, %b 1021 put t 0 29448 1022 put t 1 2048 1023 put t 2 `3627725565148419405` 1024 put t 3 `27625367831586080` 1025 note MUFU.RCP %d, %b 1026 put t 10 29448 1027 put t 11 4096 1028 put t 12 `5783556705426494797` 1029 put t 13 `27625367831586080` 1030 note MUFU.RSQ %d, %b 1031 put t 20 29448 1032 put t 21 5120 1033 put t 22 `5860117899091793229` 1034 put t 23 `27625367831586080` 1035 note MUFU.LG2 %d, %b 1036 put t 30 29448 1037 put t 31 3072 1038 put t 32 `3622948187125732685` 1039 put t 33 `27625367831586080` 1040 note MUFU.RCP64H %d, %b 1041 put t 40 29448 1042 put t 41 6144 1043 put t 42 `5783556705426494797` 1044 put t 43 `2318338018807133238` 1045 put t 44 25125 1046 note MUFU.RSQ64H %d, %b 1047 put t 50 29448 1048 put t 51 7168 1049 put t 52 `5860117899091793229` 1050 put t 53 `2318338018807133238` 1051 put t 54 25125 1052 ret 6 1053 end 1054 if eq op 2433 1055 note LDG.E%z %d, desc[%B][%a.64%o] 1056 put t 0 31105 1057 put t 1 `203297024` 1058 put t 2 `2340223935431787596` 1059 put t 3 `7166182912787506213` 1060 put t 4 `3341993472822486363` 1061 put t 5 `401296667702` 1062 note LDG.E.STRONG.SYS %d, desc[%B][%a.64%o] 1063 put t 10 31105 1064 put t 11 `203380992` 1065 put t 12 `6076251196916974668` 1066 put t 13 `6005923036305182546` 1067 put t 14 `8315162376355980576` 1068 put t 15 `7000101651917134691` 1069 put t 16 `102731946931758` 1070 note LDG.E.MMIO.GPU %d, desc[%B][%a.64%o] 1071 put t 20 31105 1072 put t 21 `203364608` 1073 put t 22 `5570159188791215180` 1074 put t 23 `2675231981938036553` 1075 put t 24 `6585233959454518372` 1076 put t 25 `3904164740051321381` 1077 put t 26 `1567565108` 1078 ret 3 1079 end 1080 if eq op 2438 1081 note STG.E%z desc[%C][%a.64%o], %b 1082 put t 0 31110 1083 put t 1 `202379520` 1084 put t 2 `2340223935431791699` 1085 put t 3 `6720256143407670628` 1086 put t 4 `8008864919659291995` 1087 put t 5 `421529660509` 1088 note STG.E.STRONG.SYS desc[%C][%a.64%o], %b 1089 put t 10 31110 1090 put t 11 `202463488` 1091 put t 12 `6076251196916978771` 1092 put t 13 `6005923036305182546` 1093 put t 14 `4838373857375380512` 1094 put t 15 `2680827251018521437` 1095 put t 16 `107911593090415` 1096 ret 2 1097 end 1098 if eq op 2472 1099 note ATOMG.E.ADD.STRONG.SYS PT, %d, desc[%C][%a.64], %b 1100 put t 0 `9223372036854806952` 1101 put t 1 `136270080` 1102 put t 2 `3334121982912320577` 1103 put t 3 `5715723593321825345` 1104 put t 4 `5773706365401712462` 1105 put t 5 `7214815411678751828` 1106 put t 6 `6583492058011628389` 1107 put t 7 `2318330387017654565` 1108 put t 8 25125 1109 note ATOMG.E.MIN.64.STRONG.SYS PT, %d, desc[%C][%a.64], %b 1110 put t 10 `9223372036854806952` 1111 put t 11 `144659712` 1112 put t 12 `3334121982912320577` 1113 put t 13 `5993785561386469709` 1114 put t 14 `6436539176233947732` 1115 put t 15 `7216209352696275027` 1116 put t 16 `2691854549557452844` 1117 put t 17 `3762245533488078147` 1118 put t 18 `421529660509` 1119 note ATOMG.E.EXCH.STRONG.SYS PT, %d, desc[%C][%a.64], %b 1120 put t 20 `9223372036854806952` 1121 put t 21 `203378944` 1122 put t 22 `3334121982912320577` 1123 put t 23 `5932458067399759941` 1124 put t 24 `2329303646074261071` 1125 put t 25 `2318338018805306448` 1126 put t 26 `6720256143407670628` 1127 put t 27 `3196768717813917019` 1128 put t 28 `6432032` 1129 ret 3 1130 end 1131 if eq op 2436 1132 note LDS %d, [%a+%B] 1133 put t 0 31108 1134 put t 1 `134219776` 1135 put t 2 `2318338018807858252` 1136 put t 3 `26249900243101019` 1137 note LDS%z %d, [%a%o] 1138 put t 10 31108 1139 put t 12 `7216209686915400780` 1140 put t 13 `6732641067110965292` 1141 ret 2 1142 end 1143 if eq op 2440 1144 note STS [%a+%C], %b 1145 put t 0 31112 1146 put t 1 `134219776` 1147 put t 2 `3125820689686418515` 1148 put t 3 `27625367831135013` 1149 ret 1 1150 end 1151 if eq op 2450 1152 note MEMBAR.ALL.SYS 1153 put t 0 31122 1154 put t 1 45056 1155 put t 2 `4696781901632718157` 1156 put t 3 `91643112737868` 1157 ret 1 1158 end 1159 if eq op 3977 1160 note SHFL.DOWN PT, %d, %a, %h, %m 1161 put t 0 `576460752303456137` 1162 put t 1 917504 1163 put t 2 `6291322170098731091` 1164 put t 3 `7216209352696275022` 1165 put t 4 `7504439729063272492` 1166 put t 5 `1831149612` 1167 note SHFL.BFLY PT, %d, %a, %h, %m 1168 put t 10 `864691128455167881` 1169 put t 11 917504 1170 put t 12 `5496153161867872339` 1171 put t 13 `7216209352696275033` 1172 put t 14 `7504439729063272492` 1173 put t 15 `1831149612` 1174 ret 2 1175 end 1176 if eq op 2328 1177 note NOP 1178 put t 0 31000 1179 put t 2 `5263182` 1180 ret 1 1181 end 1182 if eq op 2381 1183 note EXIT 1184 put t 0 31053 1185 put t 1 `58720256` 1186 put t 2 `1414092869` 1187 ret 1 1188 end 1189 if eq op 2375 1190 note BRA %T 1191 put t 0 31047 1192 put t 1 `58720256` 1193 put t 2 `92518431674946` 1194 ret 1 1195 end 1196 if eq op 2373 1197 note BSSY.RECONVERGENT %y, %Y 1198 put t 0 31045 1199 put t 1 `58720768` 1200 put t 2 `4847370932954813250` 1201 put t 3 `5639992527027588687` 1202 put t 4 `6423575818897006676` 1203 ret 1 1204 end 1205 if eq op 2369 1206 note BSYNC.RECONVERGENT %y 1207 put t 0 31041 1208 put t 1 `58720768` 1209 put t 2 `4995105803319464770` 1210 put t 3 `4992049169717677891` 1211 put t 4 `520313918542` 1212 ret 1 1213 end 1214 if eq op 2845 1215 note BAR.SYNC.DEFER_BLOCKING 0x0 1216 put t 0 31517 1217 put t 1 65536 1218 put t 2 `4849912062518903106` 1219 put t 3 `4782631786775921710` 1220 put t 4 `2325913809262432076` 1221 put t 5 `3176496` 1222 ret 1 1223 end 1224 note The #280 integration's conversions and binary64 forms (BlackwellIR ops 65..79): only the exact forms its 1225 note encoder writes, checked with nvdisasm 13.0.85 -b SM121 on 2026-11-10 (om/disasm/opmove_test.om). 1226 if eq op 560 1227 note HADD2.F32 %d, -RZ, %b.H0_H0 1228 put t 0 `2305843013491913264` 1229 put t 1 16640 1230 put t 2 `3694691337732637000` 1231 put t 3 `5921424460092874802` 1232 put t 4 `3479081711208246362` 1233 put t 5 `3164255` 1234 ret 1 1235 end 1236 if eq op 772 1237 note F2F.F16.F32 %d, %b 1238 put t 0 29444 1239 put t 1 `2099200` 1240 put t 2 `3329903151980884550` 1241 put t 3 `2318338018805691206` 1242 put t 4 25125 1243 ret 1 1244 end 1245 if eq op 553 1246 note DADD %d, %a, %c 1247 put t 0 29225 1248 put t 1 0 1249 put t 2 `3198722455854399812` 1250 put t 3 `27906842808100128` 1251 ret 1 1252 end 1253 if eq op 552 1254 note DMUL %d, %a, %b 1255 put t 0 29224 1256 put t 1 0 1257 put t 2 `3198722455989734724` 1258 put t 3 `27625367831389472` 1259 ret 1 1260 end 1261 if eq op 555 1262 note DFMA %d, %a, %b, %c 1263 put t 0 29227 1264 put t 1 0 1265 put t 2 `3198722455804659268` 1266 put t 3 `3198159505500218656` 1267 put t 4 `6497568` 1268 ret 1 1269 end 1270 if eq op 554 1271 note DSETP.%g.AND %P, %Q, %a, %b, %R 1272 put t 0 29226 1273 put t 1 0 1274 put t 2 `7432397682590962500` 1275 put t 3 `3193092956320842030` 1276 put t 4 `3197878030522459424` 1277 put t 5 `23121768204084512` 1278 ret 1 1279 end 1280 if eq op 784 1281 note F2F.F64.F32 %d, %b 1282 put t 0 29456 1283 put t 1 `2103296` 1284 put t 2 `3329345699585602118` 1285 put t 3 `2318338018805691206` 1286 put t 4 25125 1287 note F2F.F32.F64 %d, %b 1288 put t 10 29456 1289 put t 11 `3149824` 1290 put t 12 `3328779451097297478` 1291 put t 13 `2318338018805823046` 1292 put t 14 25125 1293 ret 2 1294 end 1295 if eq op 786 1296 note I2F.F64 %d, %b 1297 put t 0 29458 1298 put t 1 `2104320` 1299 put t 2 `2320539383054611017` 1300 put t 3 `107911593092133` 1301 note I2F.F64.U32 %d, %b 1302 put t 10 29458 1303 put t 11 `2103296` 1304 put t 12 `3329345699585602121` 1305 put t 13 `2318338018805691221` 1306 put t 14 25125 1307 ret 2 1308 end 1309 if eq op 785 1310 note F2I.F64.TRUNC %d, %b 1311 put t 0 29457 1312 put t 1 `3199232` 1313 put t 2 `3329345699585798726` 1314 put t 3 `7216209451380200020` 1315 put t 4 `1646600236` 1316 ret 1 1317 end 1318 ret 0 1319 end 1320 1321 1322 note the rows of opcode op, in the C table's order, written to t (stride 10); their count 1323 fn rows op ulong t edit ulong 80 to ulong 1324 n = rowsa op t 1325 if ne n 0 1326 ret n 1327 end 1328 n = rowsb op t 1329 if ne n 0 1330 ret n 1331 end 1332 ret rowsc op t 1333 end 1334 1335 fn fin s view ulong 8 x ulong to ulong 1336 ret or or get s 3 x mul get s 4 262144 1337 end 1338 1339 fn sm121_dis lo ulong hi ulong pc ulong o edit uchar 256 to ulong 1340 s = new ulong 8 0 1341 t = new ulong 80 0 1342 put s 0 lo 1343 put s 1 hi 1344 put s 2 pc 1345 g = bits lo 12 3 1346 gn = bits lo 15 1 1347 if or ne g 7 ne gn 0 1348 pc1 o s 64 1349 prd o s g gn 1350 pc1 o s 32 1351 end 1352 lb = and lo not ulong 61440 1353 hb = and hi HIM 1354 x = ulong 0 1355 if eq and lo 4095 2381 1356 x = 131072 1357 end 1358 if imadi o s lb hb 1359 ret fin s x 1360 end 1361 n = rows and lb 4095 t 1362 for r ulong n 1363 if hit t r lb hb 1364 rend o s t r 1365 if eq get s 5 0 1366 ret fin s x 1367 end 1368 break 1369 end 1370 end 1371 put s 3 0 1372 lit o s `516203495231` 1373 hex16 o s hi 1374 hex16 o s lo 1375 ret fin s or x 65536 1376 end