FSET

Floating point instructions

fixed bit field field the encoding fixes should be

FSET (reg)

6362616059585756555453525150494847464544434241403938373635343332
01011000
313029282726252423222120191817161514131211109876543210
Rbpred.notpredRaRd

bits 63:48: 0101 1000 ---- ----

Runs execute_FSET with Form() 0.

FSET (cbuf)

6362616059585756555453525150494847464544434241403938373635343332
01001000
313029282726252423222120191817161514131211109876543210
pred.notpredRaRd

bits 63:48: 0100 1000 ---- ----

Runs execute_FSET with Form() 1.

FSET (imm)

6362616059585756555453525150494847464544434241403938373635343332
0011000
313029282726252423222120191817161514131211109876543210
pred.notpredRaRd

bits 63:48: 0011 000- ---- ----

Runs execute_FSET 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
left54execute_FSET
right53execute_FSET
truth52execute_FSET
test051:48execute_FSET
[47]47execute_FSET
test46:45execute_FSET
right44execute_FSET
left43execute_FSET
pc42execute_FSET
pc41:39execute_FSET
Rb27:20RegB()
pred.not19the decoder
pred18:16the decoder
Ra15:8RegA()
Rd7:0Dst()

Operation Sail

FSET: 1.0 (52) or all ones where a and b compare, combined with the predicate at 39, else 0; .CC the flags

let f = Form();
let left0 = R_readF(RegA());
let right0 = if f == 1 then CbufF() else if f == 2 then Imm20F() else R_readF(RegB());
let left = FloatMod(left0, UInt(Field(54, 1)), UInt(Field(43, 1)));
let right = FloatMod(right0, UInt(Field(44, 1)), UInt(Field(53, 1)));
let test0 = FCompare(UInt(Field(48, 4)), left, right);
let pc = PredRead(UInt(Field(39, 3)), UInt(Field(42, 1)));
let test = Combine53(UInt(Field(45, 2)), test0, pc);
let truth = Bits32(if Field(52, 1) == 0b1 then 0x3f800000 else 0xffffffff);
let value = RawSelect(test, truth, 0x00000000);
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).