LOP

Integer, logic, video and predicate instructions

fixed bit field field the encoding fixes should be

LOP (reg)

6362616059585756555453525150494847464544434241403938373635343332
0101110001000
313029282726252423222120191817161514131211109876543210
Rbpred.notpredRaRd

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

Runs execute_LOP with Form() 0.

LOP (cbuf)

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

bits 63:48: 0100 1100 0100 0---

Runs execute_LOP with Form() 1.

LOP (imm)

6362616059585756555453525150494847464544434241403938373635343332
0011100imm.sign01000imm
313029282726252423222120191817161514131211109876543210
immpred.notpredRaRd

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

Runs execute_LOP 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
[50:48]50:48execute_LOP
[47]47execute_LOP
[45:44]45:44execute_LOP
[43]43execute_LOP
value42:41execute_LOP
right40execute_LOP
left39execute_LOP
Rb27:20the right operand
pred.not19the decoder
pred18:16the decoder
Ra15:8RegA()
Rd7:0Dst()

Operation Sail

let left0 = R_read(RegA());
let right0 = RightOf(Form());
let left = if Field(39, 1) == 0b1 then not_vec(left0) else left0;
let right = if Field(40, 1) == 0b1 then not_vec(right0) else right0;
let value = Logic(UInt(Field(41, 2)), left, right);
R_write(Dst(), value);
if Field(47, 1) == 0b1 then FlagsLogicExtended(value, UInt(Field(43, 1)));
if UInt(Field(48, 3)) < 7 then PredWrite(UInt(Field(48, 3)), LopPredicate(value, UInt(Field(44, 2))))

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