FCMP

Floating point instructions

fixed bit field field the encoding fixes should be

FCMP (reg)

6362616059585756555453525150494847464544434241403938373635343332
010110111010
313029282726252423222120191817161514131211109876543210
Rbpred.notpredRaRd

bits 63:48: 0101 1011 1010 ----

Runs execute_FCMP with Form() 0.

FCMP (rc)

6362616059585756555453525150494847464544434241403938373635343332
010100111010
313029282726252423222120191817161514131211109876543210
Rbpred.notpredRaRd

bits 63:48: 0101 0011 1010 ----

Runs execute_FCMP with Form() 1.

FCMP (cr)

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

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

Runs execute_FCMP with Form() 2.

FCMP (imm)

6362616059585756555453525150494847464544434241403938373635343332
0011011imm.sign1010imm
313029282726252423222120191817161514131211109876543210
immpred.notpredRaRd

bits 63:48: 0011 011- 1010 ----

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

Operation Sail

FCMP: a where c (or the constant in the RC form) compares with 0.0 (48-51), else the second operand

let f = Form();
let third = R_readF(UInt(Field(39, 8)));
let comparison = if f == 1 then CbufF() else third;
let alternative = if f == 1 then R_read(UInt(Field(39, 8))) else if f == 2 then CbufWord()
                  else if f == 3 then ImmBits20() else R_read(RegB());
let test = FCompare(UInt(Field(48, 4)), comparison, FConst(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).