IMNMX

Integer, logic, video and predicate instructions

fixed bit field field the encoding fixes should be

IMNMX (reg)

6362616059585756555453525150494847464544434241403938373635343332
0101110000100
313029282726252423222120191817161514131211109876543210
Rbpred.notpredRaRd

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

Runs execute_IMNMX with Form() 0.

IMNMX (cbuf)

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

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

Runs execute_IMNMX with Form() 1.

IMNMX (imm)

6362616059585756555453525150494847464544434241403938373635343332
0011100imm.sign00100imm
313029282726252423222120191817161514131211109876543210
immpred.notpredRaRd

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

Runs execute_IMNMX 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
less48execute_IMNMX
[47]47execute_IMNMX
choose_min42execute_IMNMX
choose_min41:39execute_IMNMX
Rb27:20the right operand
pred.not19the decoder
pred18:16the decoder
Ra15:8RegA()
Rd7:0Dst()

Operation Sail

IMNMX: the minimum of a and b where the predicate at 39 holds, else the maximum, signed with 48

let left = R_read(RegA());
let right = RightOf(Form());
let less = if Field(48, 1) == 0b1 then SGreater(right, left) else UInt(left) < UInt(right);
let choose_min = PredRead(UInt(Field(39, 3)), UInt(Field(42, 1)));
let value = MinMax(choose_min, less, left, right);
if Field(47, 1) == 0b1 then FlagsLogic(value);
R_write(Dst(), value)

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