Source/Packages

Accelerator.SM86.InstructionEncoding

packages/hardware/architectures/nvidia-sm86/src/Accelerator/SM86/InstructionEncoding.alpha

2,401 lines164 declarations94.5 KiBSHA-256 92e7bf9c2555

def · lines 1441–1462

sm86EncodeLoadGlobalToShared

Full file
LDGSTS.E.BYPASS.128 [address + offset], [source.64 + sourceOffset], as ptxas encodes cp.async.cg ... 16 for sm_86 (nvdisasm -hex on the DGX Spark, 2026-09-26; research p4-hmma/cp_async*.cu): the shared address register at 16, the global pair at 24, the global offset at 32 (signed 12 bits in the silicon; this encoder admits 0..0x7ff, bit 43 clear), the shared offset at 44 (20 bits), and bits 64..95 0x0b901c44: BYPASS (bit 81 clear), the global-memory descriptor UR4 with its enable (0x44) -- the descriptor LDG's bits 32..39 name too. The compiler's native encoder (RuntimeMachine) is its twin.
1441def sm86EncodeLoadGlobalToShared =
1442  (lambda unrestricted guard : (family SM86InstructionGuard) .
1443    (lambda unrestricted address : (family SM86Register) .
1444      (lambda unrestricted offset : (family SM86Unsigned32) .
1445        (lambda unrestricted source : (family SM86Register) .
1446          (lambda unrestricted sourceOffset : (family SM86Unsigned32) .
1447            (lambda unrestricted control : (family SM86Control) .
1448              (sm86EncodeInstructionFields
1449                sm86OpcodeLoadGlobalToShared
1450                guard
1451                control
1452                (sm86InstructionPrependField sm86InstructionNaturalSixteen sm86InstructionNaturalEight
1453                  (sm86RegisterNatural address)
1454                  (sm86InstructionPrependField sm86InstructionNaturalTwentyFour sm86InstructionNaturalEight
1455                    (sm86RegisterNatural source)
1456                    (sm86InstructionPrependField sm86InstructionNaturalThirtyTwo (byte-to-nat (byte 11))
1457                      (sm86Unsigned32Natural sourceOffset)
1458                      (sm86InstructionPrependField (byte-to-nat (byte 44)) (byte-to-nat (byte 20))
1459                        (sm86Unsigned32Natural offset)
1460                        (sm86InstructionOneWord32Field
1461                          sm86InstructionNaturalSixtyFour
1462                          (constructor SM86Unsigned32 SM86Unsigned32Value (byte 68) (byte 28) (byte 144) (byte 11))))))))))))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.