FSETP

Floating point instructions

fixed bit field field the encoding fixes should be

FSETP (reg)

6362616059585756555453525150494847464544434241403938373635343332
010110111011
313029282726252423222120191817161514131211109876543210
Rbpred.notpredRa

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

Runs execute_FSETP with Form() 0.

FSETP (cbuf)

6362616059585756555453525150494847464544434241403938373635343332
010010111011
313029282726252423222120191817161514131211109876543210
pred.notpredRa

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

Runs execute_FSETP with Form() 1.

FSETP (imm)

6362616059585756555453525150494847464544434241403938373635343332
00110111011
313029282726252423222120191817161514131211109876543210
pred.notpredRa

bits 63:48: 0011 011- 1011 ----

Runs execute_FSETP 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
[56]56execute_FSETP
test51:48execute_FSETP
op_bool46:45execute_FSETP
right44execute_FSETP
left43execute_FSETP
pc42execute_FSETP
pc41:39execute_FSETP
[38:20]38:20execute_FSETP
Rb27:20RegB()
pred.not19the decoder
pred18:16the decoder
Ra15:8RegA()
left7execute_FSETP
right6execute_FSETP
[5:3]5:3execute_FSETP
[2:0]2:0execute_FSETP

Operation Sail

FSETP: a and b compared (48-51), combined with the predicate at 39 into the one at 3 and its negation into the one at 0; the immediate is the float of its 19 bits as the high ones

let f = Form();
let left = FloatMod(R_readF(RegA()), UInt(Field(7, 1)), UInt(Field(43, 1)));
let right0 = if f == 1 then CbufF()
             else if f == 2 then FConst(UInt(Field(20, 19)) * 4096 + UInt(Field(56, 1)) * 2147483648)
             else R_readF(RegB());
let right = FloatMod(right0, UInt(Field(44, 1)), UInt(Field(6, 1)));
let test = FCompare(UInt(Field(48, 4)), left, right);
let pc = PredRead(UInt(Field(39, 3)), UInt(Field(42, 1)));
let op_bool = UInt(Field(45, 2));
let yes = Combine53(op_bool, test, pc);
let inverse = RawNot(test);
let no = Combine53(op_bool, inverse, pc);
PredWrite(UInt(Field(3, 3)), yes);
PredWrite(UInt(Field(0, 3)), no)

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