SHL

Integer, logic, video and predicate instructions

fixed bit field field the encoding fixes should be

SHL (reg)

6362616059585756555453525150494847464544434241403938373635343332
0101110001001
313029282726252423222120191817161514131211109876543210
Rbpred.notpredRaRd

bits 63:48: 0101 1100 0100 1---

Runs execute_SHL with Form() 0.

SHL (cbuf)

6362616059585756555453525150494847464544434241403938373635343332
0100110001001cbuf.bankcbuf.offset
313029282726252423222120191817161514131211109876543210
cbuf.offsetpred.notpredRaRd

bits 63:48: 0100 1100 0100 1---

Runs execute_SHL with Form() 1.

SHL (imm)

6362616059585756555453525150494847464544434241403938373635343332
0011100imm.sign01001imm
313029282726252423222120191817161514131211109876543210
immpred.notpredRaRd

bits 63:48: 0011 100- 0100 1---

Runs execute_SHL with Form() 2.

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
wrap39execute_SHL
Rb27:20the right operand
pred.not19the decoder
pred18:16the decoder
Ra15:8RegA()
Rd7:0Dst()

Operation Sail

SHL: a << b, the count wrapped to 5 bits with 39, else 0 from 32 on

let shift = RightOf(Form());
let wrap = Field(39, 1) == 0b1;
let safe = if wrap then shift & 0x0000001f else shift;
let value = R_read(RegA()) << safe;
if wrap then R_write(Dst(), value) else {
    let bound = Bits32(0x00000020);
    let valid = UInt(shift) < UInt(bound);
    R_write(Dst(), if valid then value else 0x00000000)
}

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).