STL

Constant buffer, local, shared and global memory instructions

fixed bit field field the encoding fixes should be

STL

6362616059585756555453525150494847464544434241403938373635343332
1110111101010
313029282726252423222120191817161514131211109876543210
pred.notpredRaRd

bits 63:48: 1110 1111 0101 0---

Runs execute_LDL with Form() 1.

Fields

The operation reads some of these fields in some forms alone (it chooses by Form()), so the diagrams show only the decoder's.

FieldBitsFrom
size50:48execute_LDL
immediate43:20execute_LDL
pred.not19the decoder
pred18:16the decoder
Ra15:8RegA()
Rd7:0Dst()

Operation Sail

LDL and STL: local memory, addressed as LDS is, its words wrapped to the array's; a byte's store a load and a store (the invocation's own memory)

let store = Form() == 1;
let immediate = Bits32(SignExtend(Field(20, 24), 32)); /* made before the register's read */
let address = if RegA() == RZ then immediate else R_read(RegA()) + immediate;
let first = address >> 2;
let size = UInt(Field(48, 3));
foreach (k from 0 to SizeWords(size) - 1) {
    let index0 = if k != 0 then first + to_bits(32, k) else first;
    let pointer = LocalPointer(index0 & to_bits(32, LocalWords() - 1));
    if size < 4 then {
        let bit_offset = SubwordOffset(address, size);
        let width = SubwordWidth(size);
        let old = Load(pointer);
        if store then Store(pointer, BitsInsert(old, R_read(Dst()), bit_offset, width))
        else R_write(Dst(), SubwordExtract(old, bit_offset, width, size))
    } else if store then Store(pointer, R_read(Dst() + k))
    else R_write(Dst() + k, Load(pointer))
}

Made from ScarletNX's Sail at 166ad3910f80. The Sail and the encodings' file are ScarletNX's (GPL-3.0-or-later); its encodings are from Eden's maxwell.inc (GPL-2.0-or-later).