DSET

Floating point instructions

fixed bit field field the encoding fixes should be

DSET (reg)

6362616059585756555453525150494847464544434241403938373635343332
010110010
313029282726252423222120191817161514131211109876543210
pred.notpredRaRd

bits 63:48: 0101 1001 0--- ----

Runs execute_DSET with Form() 0.

DSET (cbuf)

6362616059585756555453525150494847464544434241403938373635343332
010010010
313029282726252423222120191817161514131211109876543210
pred.notpredRaRd

bits 63:48: 0100 1001 0--- ----

Runs execute_DSET with Form() 1.

DSET (imm)

6362616059585756555453525150494847464544434241403938373635343332
00110010
313029282726252423222120191817161514131211109876543210
pred.notpredRaRd

bits 63:48: 0011 001- 0--- ----

Runs execute_DSET 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_DSET
[53]53execute_DSET
truth52execute_DSET
comparison51:48execute_DSET
[47]47execute_DSET
test46:45execute_DSET
right44execute_DSET
left43execute_DSET
predicate42execute_DSET
predicate41:39execute_DSET
pred.not19the decoder
pred18:16the decoder
Ra15:8RegA()
Rd7:0Dst()
left7execute_DSET
[6]6execute_DSET
[5:3]5:3execute_DSET
[2:0]2:0execute_DSET

Operation Sail

DSET and DSETP: doubles compared, as FSET and FSETP

let is_set = Form() <= 2;
let left = DoubleMod(DoubleRead(RegA()), if is_set then UInt(Field(54, 1)) else UInt(Field(7, 1)), UInt(Field(43, 1)));
let right = DoubleMod(DoubleSource(if is_set then Form() else Form() - 3), UInt(Field(44, 1)),
                      if is_set then UInt(Field(53, 1)) else UInt(Field(6, 1)));
let comparison = DCompare(UInt(Field(48, 4)), left, right);
let predicate = PredRead(UInt(Field(39, 3)), UInt(Field(42, 1)));
if is_set then {
    let test = Combine53(UInt(Field(45, 2)), comparison, predicate);
    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)
} else {
    let inverse = RawNot(comparison);
    PredWrite(UInt(Field(3, 3)), Combine53(UInt(Field(45, 2)), comparison, predicate));
    PredWrite(UInt(Field(0, 3)), Combine53(UInt(Field(45, 2)), inverse, predicate))
}

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