ICMP

Integer, logic, video and predicate instructions

fixed bit field field the encoding fixes should be

ICMP (reg)

6362616059585756555453525150494847464544434241403938373635343332
010110110100
313029282726252423222120191817161514131211109876543210
Rbpred.notpredRaRd

bits 63:48: 0101 1011 0100 ----

Runs execute_ICMP with Form() 0.

ICMP (rc)

6362616059585756555453525150494847464544434241403938373635343332
010100110100
313029282726252423222120191817161514131211109876543210
Rbpred.notpredRaRd

bits 63:48: 0101 0011 0100 ----

Runs execute_ICMP with Form() 1.

ICMP (cr)

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

bits 63:48: 0100 1011 0100 ----

Runs execute_ICMP with Form() 2.

ICMP (imm)

6362616059585756555453525150494847464544434241403938373635343332
0011011imm.sign0100imm
313029282726252423222120191817161514131211109876543210
immpred.notpredRaRd

bits 63:48: 0011 011- 0100 ----

Runs execute_ICMP with Form() 3.

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
third46:39execute_ICMP
Rb27:20RegB()
pred.not19the decoder
pred18:16the decoder
Ra15:8RegA()
Rd7:0Dst()

Operation Sail

ICMP: a where c (or the second operand in the RC form) compares with zero, else the other; ICMP has no .X: bit 43 is part of Rc

let f = Form();
let third = R_read(UInt(Field(39, 8)));
let right = if f == 1 | f == 2 then CbufWord() else if f == 3 then Right(2) else R_read(RegB());
let comparison = if f == 1 then right else third;
let alternative = if f == 1 then third else right;
let test = IntegerCompareNoX(comparison, 0x00000000);
R_write(Dst(), RawSelect(test, R_read(RegA()), alternative))

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