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
CUDApp / om / core / ampere.om
| 1 | om2 |
| 2 | note Generated by om/core/native.sh from canonical local Omega sources. |
| 3 | note Explicit SM86 encoder; SM121 uses its separate bw_enc_sm121.om unit. |
| 4 | note Input layout matches bw_enc_sm121.om. Global addresses are plain 64-bit registers, |
| 5 | note not Blackwell descriptors. Parameter constants move from byte 896 to byte 352. |
| 6 | note The final preflight validates every operand and instruction before storing any output. |
| 7 | note Native binding compiler SHA256 2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f. |
| 8 | note New opcode constants: Wolfram FromDigits hexadecimal conversion, parent AmperePort receipt. |
| 9 | note SM86 words independently researched with nvdisasm -b SM86, never submitted to a GPU. |
| 10 | |
| 11 | const NEG ulong 9223372036854775808 |
| 12 | const NOPW ulong 31000 |
| 13 | const NOPC ulong 1032192 |
| 14 | |
| 15 | fn put4 w edit ulong 4 a ulong b ulong c ulong d ulong to void |
| 16 | put w 0 a |
| 17 | put w 1 b |
| 18 | put w 2 c |
| 19 | put w 3 d |
| 20 | end |
| 21 | |
| 22 | note the physical register of one operand field: phys + subreg, or dflt when the vreg is negative |
| 23 | fn preg phys view ulong 288 v ulong sb ulong dflt ulong to ulong |
| 24 | if ge v NEG |
| 25 | ret dflt |
| 26 | end |
| 27 | ret add get phys v sb |
| 28 | end |
| 29 | |
| 30 | note 1 when a vreg field is given (not negative), else 0 |
| 31 | fn pres v ulong to ulong |
| 32 | if ge v NEG |
| 33 | ret 0 |
| 34 | end |
| 35 | ret 1 |
| 36 | end |
| 37 | |
| 38 | fn isuld op ulong to bool |
| 39 | ret or eq op 6 eq op 7 |
| 40 | end |
| 41 | |
| 42 | fn param op ulong imm ulong to ulong |
| 43 | if and ge op 4 le op 7 |
| 44 | if ge imm 896 |
| 45 | ret add sub imm 896 352 |
| 46 | end |
| 47 | end |
| 48 | ret imm |
| 49 | end |
| 50 | |
| 51 | fn opnds ins view ulong 8192 i ulong phys view ulong 288 o edit ulong 16 to void |
| 52 | b = mul i 8 |
| 53 | f = get ins add b 7 |
| 54 | put o 0 get ins b |
| 55 | put o 1 preg phys get ins add b 1 and shr f 16 255 0 |
| 56 | put o 2 preg phys get ins add b 2 and shr f 24 255 0 |
| 57 | put o 3 preg phys get ins add b 3 and shr f 32 255 0 |
| 58 | put o 4 preg phys get ins add b 4 and shr f 40 255 255 |
| 59 | u = get ins add b 5 |
| 60 | put o 5 0 |
| 61 | if lt u NEG |
| 62 | put o 5 get phys add u 256 |
| 63 | end |
| 64 | put o 14 pres u |
| 65 | x = get ins add b 6 |
| 66 | put o 6 param get o 0 and x 4294967295 |
| 67 | put o 7 shr x 32 |
| 68 | put o 8 and f 1 |
| 69 | put o 9 and shr f 1 1 |
| 70 | put o 10 and shr f 2 1 |
| 71 | put o 11 and shr f 8 255 |
| 72 | put o 12 pres get ins add b 2 |
| 73 | put o 13 pres get ins add b 3 |
| 74 | d = get ins add b 1 |
| 75 | if and isuld get o 0 lt d NEG |
| 76 | put o 1 get phys add d 256 |
| 77 | end |
| 78 | end |
| 79 | |
| 80 | note the control word: the instruction's own, else the op's default |
| 81 | fn ctl o view ulong 16 dflt ulong to ulong |
| 82 | c = get o 7 |
| 83 | if ne c 0 |
| 84 | ret c |
| 85 | end |
| 86 | ret dflt |
| 87 | end |
| 88 | |
| 89 | note low 8 bits of operand slot k |
| 90 | fn rb o view ulong 16 k ulong to ulong |
| 91 | ret and get o k 255 |
| 92 | end |
| 93 | |
| 94 | note slot k when its vreg (presence slot h) is given, else RZ |
| 95 | fn rz o view ulong 16 k ulong h ulong to ulong |
| 96 | if ne get o h 0 |
| 97 | ret rb o k |
| 98 | end |
| 99 | ret 255 |
| 100 | end |
| 101 | |
| 102 | fn wd o view ulong 16 base ulong to ulong |
| 103 | ret or base shl rb o 1 16 |
| 104 | end |
| 105 | |
| 106 | fn wa o view ulong 16 base ulong to ulong |
| 107 | ret or base shl rb o 2 24 |
| 108 | end |
| 109 | |
| 110 | fn wda o view ulong 16 base ulong to ulong |
| 111 | ret or wd o base shl rb o 2 24 |
| 112 | end |
| 113 | |
| 114 | note the 4-bit guard predicate field: 7 always, 0 @P0, 8 @!P0 |
| 115 | fn pred o view ulong 16 to ulong |
| 116 | if eq get o 9 0 |
| 117 | ret 7 |
| 118 | end |
| 119 | if eq get o 10 0 |
| 120 | ret 0 |
| 121 | end |
| 122 | ret 8 |
| 123 | end |
| 124 | |
| 125 | note a signed 24-bit byte offset (imm read as int32) fits |
| 126 | fn off24 imm ulong to bool |
| 127 | ret or lt imm 8388608 ge imm 4286578688 |
| 128 | end |
| 129 | |
| 130 | note ops 0..14: moves, constants, integer multiply-add, compares and global memory |
| 131 | fn enc_a o view ulong 16 w edit ulong 4 to ulong |
| 132 | op = get o 0 |
| 133 | imm = get o 6 |
| 134 | if eq op 0 |
| 135 | put4 w NOPW 0 0 ctl o NOPC |
| 136 | ret 0 |
| 137 | end |
| 138 | if eq op 1 |
| 139 | put4 w wd o 29186 255 3840 ctl o 1040896 |
| 140 | ret 0 |
| 141 | end |
| 142 | if eq op 2 |
| 143 | put4 w wd o 30722 imm 3840 ctl o 1040896 |
| 144 | ret 0 |
| 145 | end |
| 146 | if eq op 3 |
| 147 | put4 w wd o 31001 0 shl and imm 255 8 ctl o 926208 |
| 148 | ret 0 |
| 149 | end |
| 150 | if eq op 4 |
| 151 | put4 w wd o 4278221698 and shl imm 6 16776960 2048 ctl o 1040896 |
| 152 | ret 0 |
| 153 | end |
| 154 | if eq op 5 |
| 155 | put4 w wd o 4278221698 and shl imm 6 16776960 2560 ctl o 926208 |
| 156 | ret 0 |
| 157 | end |
| 158 | if eq op 6 |
| 159 | put4 w wd o 31417 and shl imm 6 16776960 2048 ctl o 926208 |
| 160 | ret 0 |
| 161 | end |
| 162 | if eq op 7 |
| 163 | put4 w wd o 31417 and shl imm 6 16776960 2560 ctl o 945664 |
| 164 | ret 0 |
| 165 | end |
| 166 | if eq op 8 |
| 167 | if ne get o 13 0 |
| 168 | put4 w wda o 29220 rb o 3 or 126747136 rb o 4 ctl o 2083328 |
| 169 | ret 0 |
| 170 | end |
| 171 | if and ne get o 8 0 ne get o 14 0 |
| 172 | put4 w wda o 31780 rb o 5 or 260964864 rb o 4 ctl o 2083328 |
| 173 | ret 0 |
| 174 | end |
| 175 | put4 w wda o 30756 imm or 126747136 rb o 4 ctl o 2083328 |
| 176 | ret 0 |
| 177 | end |
| 178 | if eq op 9 |
| 179 | put4 w wda o 30757 imm or 126746624 rb o 4 ctl o 2083840 |
| 180 | ret 0 |
| 181 | end |
| 182 | if eq op 10 |
| 183 | if and ne get o 8 0 ne get o 14 0 |
| 184 | put4 w wda o 31756 rb o 5 200302704 ctl o 3136000 |
| 185 | ret 0 |
| 186 | end |
| 187 | put4 w wda o 30732 imm 66085488 ctl o 2087424 |
| 188 | ret 0 |
| 189 | end |
| 190 | if eq op 11 |
| 191 | put4 w wda o 31105 0 203299072 ctl o 991744 |
| 192 | ret 0 |
| 193 | end |
| 194 | if eq op 12 |
| 195 | if not off24 imm |
| 196 | ret 1 |
| 197 | end |
| 198 | put4 w wa o 31110 or rb o 3 shl and imm 16777215 8 202381568 ctl o 1040896 |
| 199 | ret 0 |
| 200 | end |
| 201 | if eq op 13 |
| 202 | put4 w wa o 31110 rb o 3 202447104 ctl o 1040896 |
| 203 | ret 0 |
| 204 | end |
| 205 | if eq op 14 |
| 206 | put4 w wda o 29200 rb o 3 134209791 ctl o 17811968 |
| 207 | ret 0 |
| 208 | end |
| 209 | ret 1 |
| 210 | end |
| 211 | |
| 212 | note ops 15..29: tensor core, shifts, wide and strong loads, stores, fences, atomics |
| 213 | fn enc_b o view ulong 16 w edit ulong 4 to ulong |
| 214 | op = get o 0 |
| 215 | imm = get o 6 |
| 216 | if or eq op 15 eq op 16 |
| 217 | p = ulong 0 |
| 218 | if eq op 16 |
| 219 | p = 262144 |
| 220 | end |
| 221 | put4 w wda o 29244 rb o 3 or or rb o 4 6144 p ctl o 1040896 |
| 222 | ret 0 |
| 223 | end |
| 224 | if eq op 17 |
| 225 | put4 w or wd o 30745 4278190080 imm or 71168 rb o 2 ctl o 2083328 |
| 226 | ret 0 |
| 227 | end |
| 228 | if eq op 18 |
| 229 | put4 w wda o 30738 imm 126796031 ctl o 2083328 |
| 230 | ret 0 |
| 231 | end |
| 232 | if eq op 19 |
| 233 | put4 w wda o 31105 0 203298048 ctl o 991744 |
| 234 | ret 0 |
| 235 | end |
| 236 | if eq op 20 |
| 237 | put4 w wda o 31105 0 203380992 ctl o 991744 |
| 238 | ret 0 |
| 239 | end |
| 240 | if eq op 21 |
| 241 | put4 w wda o 31105 0 203364608 ctl o 991744 |
| 242 | ret 0 |
| 243 | end |
| 244 | if eq op 22 |
| 245 | a = wa o 31110 |
| 246 | if ne get o 9 0 |
| 247 | a = or wa o 2438 shl pred o 12 |
| 248 | end |
| 249 | put4 w a rb o 3 202463488 ctl o 1040896 |
| 250 | ret 0 |
| 251 | end |
| 252 | if eq op 23 |
| 253 | put4 w 31122 0 45056 ctl o 1043456 |
| 254 | ret 0 |
| 255 | end |
| 256 | if eq op 24 |
| 257 | put4 w 31122 0 12288 ctl o 1043456 |
| 258 | ret 0 |
| 259 | end |
| 260 | if eq op 25 |
| 261 | put4 w 4278221199 0 33554432 ctl o 1042432 |
| 262 | ret 0 |
| 263 | end |
| 264 | if eq op 26 |
| 265 | put4 w wda o 31144 rb o 3 136266111 ctl o 3284480 |
| 266 | ret 0 |
| 267 | end |
| 268 | if eq op 27 |
| 269 | put4 w wda o 31144 rb o 3 203374975 ctl o 3284480 |
| 270 | ret 0 |
| 271 | end |
| 272 | if eq op 28 |
| 273 | put4 w wa o 29196 rb o 3 66084976 ctl o 2087424 |
| 274 | ret 0 |
| 275 | end |
| 276 | if eq op 29 |
| 277 | put4 w wda o 29202 rb o 3 126762239 ctl o 2083328 |
| 278 | ret 0 |
| 279 | end |
| 280 | ret 1 |
| 281 | end |
| 282 | |
| 283 | note ops 30..45: floating point, special functions, shuffles, shared memory, exit |
| 284 | fn enc_c o view ulong 16 w edit ulong 4 to ulong |
| 285 | op = get o 0 |
| 286 | imm = get o 6 |
| 287 | if eq op 30 |
| 288 | put4 w wda o 29217 rb o 3 0 ctl o 5227520 |
| 289 | ret 0 |
| 290 | end |
| 291 | if eq op 31 |
| 292 | put4 w wda o 29217 or rb o 3 2147483648 0 ctl o 5227520 |
| 293 | ret 0 |
| 294 | end |
| 295 | if eq op 32 |
| 296 | put4 w wda o 29216 rb o 3 4194304 ctl o 5227520 |
| 297 | ret 0 |
| 298 | end |
| 299 | if eq op 33 |
| 300 | put4 w wda o 29219 rb o 3 rb o 4 ctl o 5227520 |
| 301 | ret 0 |
| 302 | end |
| 303 | if eq op 34 |
| 304 | c = ulong 66084864 |
| 305 | if ne imm 0 |
| 306 | c = imm |
| 307 | end |
| 308 | a = or or 29195 shl and get o 1 7 16 shl rb o 2 24 |
| 309 | put4 w a rb o 3 c ctl o 5227520 |
| 310 | ret 0 |
| 311 | end |
| 312 | if eq op 35 |
| 313 | put4 w wda o 29192 rb o 3 and get o 4 7 ctl o 1034752 |
| 314 | ret 0 |
| 315 | end |
| 316 | if eq op 36 |
| 317 | put4 w wda o 29193 rb o 3 58720256 ctl o 5227520 |
| 318 | ret 0 |
| 319 | end |
| 320 | if eq op 37 |
| 321 | if eq imm 1177681920 |
| 322 | put4 w wda o 29246 rb o 3 4351 ctl o 5227520 |
| 323 | ret 0 |
| 324 | end |
| 325 | put4 w wda o 29193 rb o 3 125829120 ctl o 5227520 |
| 326 | ret 0 |
| 327 | end |
| 328 | if eq op 38 |
| 329 | put4 w wd o 29253 rb o 2 2102272 ctl o 5235200 |
| 330 | ret 0 |
| 331 | end |
| 332 | if eq op 39 |
| 333 | put4 w wd o 29445 rb o 2 2158848 ctl o 5120512 |
| 334 | ret 0 |
| 335 | end |
| 336 | if eq op 40 |
| 337 | put4 w wd o 29448 rb o 2 4096 ctl o 926720 |
| 338 | ret 0 |
| 339 | end |
| 340 | if eq op 41 |
| 341 | put4 w wd o 29448 rb o 2 5120 ctl o 926720 |
| 342 | ret 0 |
| 343 | end |
| 344 | if eq op 42 |
| 345 | a = or 134225664 shl and imm 31 21 |
| 346 | if ne and imm 2147483648 0 |
| 347 | a = or a shl ulong 1 26 |
| 348 | end |
| 349 | put4 w wda o 32649 a 917504 ctl o 926720 |
| 350 | ret 0 |
| 351 | end |
| 352 | if eq op 43 |
| 353 | put4 w wda o 31108 0 and imm 65535 ctl o 1040896 |
| 354 | ret 0 |
| 355 | end |
| 356 | if eq op 44 |
| 357 | put4 w wa o 29576 rb o 3 and imm 65535 ctl o 1040896 |
| 358 | ret 0 |
| 359 | end |
| 360 | if eq op 45 |
| 361 | a = ulong 31053 |
| 362 | if ne get o 9 0 |
| 363 | a = 2381 |
| 364 | end |
| 365 | put4 w a 0 58720256 ctl o 1042944 |
| 366 | ret 0 |
| 367 | end |
| 368 | ret 1 |
| 369 | end |
| 370 | |
| 371 | note SM86 BRA stores the signed byte displacement in w1 and low 18 bits of w2, not the SM121 split field. |
| 372 | fn enc_bra o view ulong 16 w edit ulong 4 to ulong |
| 373 | imm = get o 6 |
| 374 | rel = and sub imm 1 4294967295 |
| 375 | s = and shl rel 4 4294967295 |
| 376 | c = or 58720256 shr rel 28 |
| 377 | if ge rel 2147483648 |
| 378 | c = or 58982384 shr rel 28 |
| 379 | end |
| 380 | d = get o 7 |
| 381 | if eq d 0 |
| 382 | d = 1042944 |
| 383 | if and eq imm 0 eq get o 9 0 |
| 384 | d = NOPC |
| 385 | end |
| 386 | end |
| 387 | a = or 2375 shl pred o 12 |
| 388 | put4 w a s c d |
| 389 | ret 0 |
| 390 | end |
| 391 | |
| 392 | note ops 46..59: branches, reconvergence, barriers, wide shared loads, three-source integer ops |
| 393 | fn enc_d o view ulong 16 w edit ulong 4 to ulong |
| 394 | op = get o 0 |
| 395 | imm = get o 6 |
| 396 | bar = get o 11 |
| 397 | if eq op 46 |
| 398 | ret enc_bra o w |
| 399 | end |
| 400 | if eq op 47 |
| 401 | put4 w wd o 29448 rb o 2 2048 ctl o 926720 |
| 402 | ret 0 |
| 403 | end |
| 404 | if eq op 48 |
| 405 | put4 w 31517 0 65536 ctl o 1043456 |
| 406 | ret 0 |
| 407 | end |
| 408 | if eq op 49 |
| 409 | put4 w wda o 31108 255 134219776 ctl o 927744 |
| 410 | ret 0 |
| 411 | end |
| 412 | if eq op 50 |
| 413 | put4 w wa o 31112 rb o 3 134220031 ctl o 1040896 |
| 414 | ret 0 |
| 415 | end |
| 416 | if eq op 51 |
| 417 | a = or or 29202 shl rb o 1 16 shl rz o 2 12 24 |
| 418 | put4 w a rz o 3 13 or or 126746624 shl and imm 255 8 rb o 4 ctl o 2083328 |
| 419 | ret 0 |
| 420 | end |
| 421 | if eq op 52 |
| 422 | a = or or 29209 shl rb o 1 16 shl rz o 2 12 24 |
| 423 | put4 w a rz o 3 13 or 1536 rb o 4 ctl o 2083328 |
| 424 | ret 0 |
| 425 | end |
| 426 | if eq op 53 |
| 427 | a = or or 29223 shl rb o 1 16 shl rz o 2 12 24 |
| 428 | put4 w a rz o 3 13 or 126746624 rb o 4 ctl o 2083328 |
| 429 | ret 0 |
| 430 | end |
| 431 | if eq op 54 |
| 432 | if or or lt imm 2 ge imm 2147483648 ge bar 16 |
| 433 | ret 1 |
| 434 | end |
| 435 | a = or or 2373 shl pred o 12 shl bar 16 |
| 436 | put4 w a and mul sub imm 1 16 4294967295 58720768 ctl o 1040896 |
| 437 | ret 0 |
| 438 | end |
| 439 | if eq op 55 |
| 440 | if ge bar 16 |
| 441 | ret 1 |
| 442 | end |
| 443 | a = or or 2369 shl pred o 12 shl bar 16 |
| 444 | put4 w a 0 58720768 ctl o 1042944 |
| 445 | ret 0 |
| 446 | end |
| 447 | if eq op 56 |
| 448 | if not off24 imm |
| 449 | ret 1 |
| 450 | end |
| 451 | put4 w wda o 31105 shl and imm 16777215 8 203299584 ctl o 991744 |
| 452 | ret 0 |
| 453 | end |
| 454 | if eq op 57 |
| 455 | if not off24 imm |
| 456 | ret 1 |
| 457 | end |
| 458 | put4 w wda o 31105 shl and imm 16777215 8 203300096 ctl o 991744 |
| 459 | ret 0 |
| 460 | end |
| 461 | if eq op 58 |
| 462 | if ge imm 8388608 |
| 463 | ret 1 |
| 464 | end |
| 465 | put4 w wda o 31108 shl and imm 16777215 8 3072 ctl o 1042432 |
| 466 | ret 0 |
| 467 | end |
| 468 | if eq op 59 |
| 469 | put4 w wd o 29448 rb o 2 3072 ctl o 926720 |
| 470 | ret 0 |
| 471 | end |
| 472 | ret 1 |
| 473 | end |
| 474 | |
| 475 | fn enc1 o view ulong 16 w edit ulong 4 to ulong |
| 476 | op = get o 0 |
| 477 | if lt op 15 |
| 478 | ret enc_a o w |
| 479 | end |
| 480 | if lt op 30 |
| 481 | ret enc_b o w |
| 482 | end |
| 483 | if lt op 46 |
| 484 | ret enc_c o w |
| 485 | end |
| 486 | ret enc_d o w |
| 487 | end |
| 488 | |
| 489 | note the 16 bytes of instruction i, each word little-endian |
| 490 | fn store code edit uchar 16384 i ulong w view ulong 4 to void |
| 491 | for k ulong 4 |
| 492 | x = get w k |
| 493 | q = add mul i 16 mul k 4 |
| 494 | for j ulong 4 |
| 495 | put code add q j uchar and shr x mul j 8 255 |
| 496 | end |
| 497 | end |
| 498 | end |
| 499 | |
| 500 | note Full preflight: no destination byte changes on any refusal, including a late opcode. |
| 501 | fn valid ins view ulong 8192 phys view ulong 288 i ulong to bool |
| 502 | b = mul i 8 |
| 503 | op = get ins b |
| 504 | f = get ins add b 7 |
| 505 | imm = and get ins add b 6 4294967295 |
| 506 | if gt op 59 |
| 507 | ret false |
| 508 | end |
| 509 | note Blackwell native FP8 QMMA and FP8 pack have no SM86 instruction. |
| 510 | if and eq op 16 eq imm 1362114610 |
| 511 | ret false |
| 512 | end |
| 513 | if and eq op 37 eq imm 1178940467 |
| 514 | ret false |
| 515 | end |
| 516 | if and ge op 4 le op 7 |
| 517 | if or ge imm 65536 ne rem imm 4 0 |
| 518 | ret false |
| 519 | end |
| 520 | end |
| 521 | if or or eq op 12 eq op 56 eq op 57 |
| 522 | if not off24 imm |
| 523 | ret false |
| 524 | end |
| 525 | end |
| 526 | if and eq op 58 ge imm 8388608 |
| 527 | ret false |
| 528 | end |
| 529 | if and eq op 54 or lt imm 2 ge imm 2147483648 |
| 530 | ret false |
| 531 | end |
| 532 | if and or eq op 54 eq op 55 ge and shr f 8 255 16 |
| 533 | ret false |
| 534 | end |
| 535 | for j ulong 4 |
| 536 | v = get ins add add b 1 j |
| 537 | if lt v NEG |
| 538 | sb = and shr f add 16 mul j 8 255 |
| 539 | if and eq j 0 or eq op 6 eq op 7 |
| 540 | if ge v 32 |
| 541 | ret false |
| 542 | end |
| 543 | p = get phys add v 256 |
| 544 | if or ge p 64 ge add p sb 64 |
| 545 | ret false |
| 546 | end |
| 547 | else |
| 548 | if ge v 256 |
| 549 | ret false |
| 550 | end |
| 551 | p = get phys v |
| 552 | if or ge p 255 ge add p sb 255 |
| 553 | ret false |
| 554 | end |
| 555 | end |
| 556 | end |
| 557 | end |
| 558 | u = get ins add b 5 |
| 559 | if lt u NEG |
| 560 | if ge u 32 |
| 561 | ret false |
| 562 | end |
| 563 | if ge get phys add u 256 64 |
| 564 | ret false |
| 565 | end |
| 566 | end |
| 567 | ret true |
| 568 | end |
| 569 | |
| 570 | fn isdesc o view ulong 16 to bool |
| 571 | ret and eq get o 0 7 eq get o 6 856 |
| 572 | end |
| 573 | |
| 574 | export fn ampere_enc_sm86 ins view ulong 8192 phys view ulong 288 n ulong pad ulong code edit uchar 16384 to ulong |
| 575 | o = new ulong 16 0 |
| 576 | w = new ulong 4 0 |
| 577 | if gt n 1024 |
| 578 | ret 0 |
| 579 | end |
| 580 | for i ulong n |
| 581 | if not valid ins phys i |
| 582 | ret 0 |
| 583 | end |
| 584 | end |
| 585 | cnt = n |
| 586 | if ne pad 0 |
| 587 | cnt = mul div add n 7 8 8 |
| 588 | if lt cnt 32 |
| 589 | cnt = 32 |
| 590 | end |
| 591 | end |
| 592 | for i ulong cnt |
| 593 | if lt i n |
| 594 | opnds ins i phys edit o |
| 595 | note Blackwell descriptor preamble is unused by Ampere memory instructions |
| 596 | note Keep its slot for branch deltas but do not read beyond CB0 |
| 597 | if isdesc view o |
| 598 | put4 edit w NOPW 0 0 NOPC |
| 599 | else |
| 600 | if ne enc1 view o edit w 0 |
| 601 | ret 0 |
| 602 | end |
| 603 | end |
| 604 | else |
| 605 | put4 edit w NOPW 0 0 NOPC |
| 606 | end |
| 607 | store code i view w |
| 608 | end |
| 609 | ret mul cnt 16 |
| 610 | end |
| 611 |