DMUL

Floating point instructions

fixed bit field field the encoding fixes should be

DMUL (reg)

6362616059585756555453525150494847464544434241403938373635343332
0101110010000
313029282726252423222120191817161514131211109876543210
pred.notpredRaRd

bits 63:48: 0101 1100 1000 0---

Runs execute_DARITH with Form() 3.

DMUL (cbuf)

6362616059585756555453525150494847464544434241403938373635343332
0100110010000
313029282726252423222120191817161514131211109876543210
pred.notpredRaRd

bits 63:48: 0100 1100 1000 0---

Runs execute_DARITH with Form() 4.

DMUL (imm)

6362616059585756555453525150494847464544434241403938373635343332
001110010000
313029282726252423222120191817161514131211109876543210
pred.notpredRaRd

bits 63:48: 0011 100- 1000 0---

Runs execute_DARITH with Form() 5.

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
right49execute_DARITH
left48execute_DARITH
left46execute_DARITH
right046:39execute_DARITH
right45execute_DARITH
[42]42execute_DARITH
[41:39]41:39execute_DARITH
pred.not19the decoder
pred18:16the decoder
Ra15:8RegA()
Rd7:0Dst()

Operation Sail

DADD, DMUL, DFMA and DMNMX of register pairs (DFMA's RC form c a pair at 39, its CR form b the constant's)

let f = Form(); /* 0-2 DADD, 3-5 DMUL, 6-9 DFMA (R, RC, CR, I), 10-12 DMNMX */
let left0 = DoubleRead(RegA());
let right0 = if f == 7 then DoubleRead(UInt(Field(39, 8))) else if f == 8 then DoubleSource(1)
             else if f >= 6 & f <= 9 then DoubleSource(if f == 9 then 2 else 0)
             else if f <= 2 then DoubleSource(f) else if f <= 5 then DoubleSource(f - 3) else DoubleSource(f - 10);
let value : f64 = if f <= 2 then {
    let left = DoubleMod(left0, UInt(Field(46, 1)), UInt(Field(48, 1)));
    let right = DoubleMod(right0, UInt(Field(49, 1)), UInt(Field(45, 1)));
    DAddNC(left, right)
} else if f <= 5 then {
    let left = DoubleMod(left0, 0, UInt(Field(48, 1)));
    DMulNC(left, right0)
} else if f <= 9 then {
    let right = DoubleMod(right0, 0, UInt(Field(48, 1)));
    let third = if f == 7 then DoubleSource(1) else DoubleRead(UInt(Field(39, 8)));
    let addend = DoubleMod(third, 0, UInt(Field(49, 1)));
    DFmaNC(left0, right, addend)
} else {
    let left = DoubleMod(left0, UInt(Field(46, 1)), UInt(Field(48, 1)));
    let right = DoubleMod(right0, UInt(Field(49, 1)), UInt(Field(45, 1)));
    /* as FMNMX: PT or !PT picks one as the program is translated */
    DMinMax(PredRead(UInt(Field(39, 3)), UInt(Field(42, 1))), left, right)
};
DoubleWrite(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).