VMAD

Integer, logic, video and predicate instructions

fixed bit field field the encoding fixes should be

VMAD

6362616059585756555453525150494847464544434241403938373635343332
01011111rightrightleft[46:39]left
313029282726252423222120191817161514131211109876543210
rightpred.notpredRaRd

bits 63:48: 0101 1111 ---- ----

Runs execute_VMAD with Form() 0.

Fields

FieldBitsFrom
right50execute_VMAD
right49execute_VMAD
left48execute_VMAD
[46:39]46:39execute_VMAD
left38:36execute_VMAD
[35:20]35:20execute_VMAD
right30:28execute_VMAD
pred.not19the decoder
pred18:16the decoder
Ra15:8RegA()
Rd7:0Dst()

Operation Sail

let left = VmSelect(R_read(RegA()), UInt(Field(36, 3)) + 8 * UInt(Field(48, 1)));
let right = if Field(50, 1) == 0b1 then VmSelect(R_read(RegB()), UInt(Field(28, 3)) + 8 * UInt(Field(49, 1)))
            else VmSelect(Bits32(ZeroExtend(Field(20, 16), 32)), 4 + 8 * UInt(Field(49, 1)));
let product = left * right;
R_write(Dst(), product + R_read(UInt(Field(39, 8))))

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