HSETP2

Floating point instructions

fixed bit field field the encoding fixes should be

HSETP2 (reg)

6362616059585756555453525150494847464544434241403938373635343332
0101110100100
313029282726252423222120191817161514131211109876543210
Rbpred.notpredRa

bits 63:48: 0101 1101 0010 0---

Runs execute_HSETP2 with Form() 0.

HSETP2 (cbuf)

6362616059585756555453525150494847464544434241403938373635343332
01111111cbuf.bankcbuf.offset
313029282726252423222120191817161514131211109876543210
cbuf.offsetpred.notpredRa

bits 63:48: 0111 111- 1--- ----

Runs execute_HSETP2 with Form() 1.

HSETP2 (imm)

6362616059585756555453525150494847464544434241403938373635343332
0111111imm.sign0imm
313029282726252423222120191817161514131211109876543210
immpred.notpredRa

bits 63:48: 0111 111- 0--- ----

Runs execute_HSETP2 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_HSETP2
[54]54execute_HSETP2
lhs48:47execute_HSETP2
o046:45execute_HSETP2
lhs44execute_HSETP2
lhs43execute_HSETP2
predicate42execute_HSETP2
predicate41:39execute_HSETP2
[31]31execute_HSETP2
[30]30execute_HSETP2
rhs29:28execute_HSETP2
Rb27:20RegB()
pred.not19the decoder
pred18:16the decoder
Ra15:8RegA()
[5:3]5:3execute_HSETP2
[2:0]2:0execute_HSETP2

Operation Sail

HSETP2: each half pair compared, combined with the predicate at 39: into the predicates at 3 and 0, or with bit 49 (53) their AND and its negation

let f = Form();
let raw_b = if f == 0 then R_read(RegB()) else if f == 1 then CbufWord() else HalfImmediate();
let lhs = HalfPairMod(HalfPairOf(R_read(RegA()), UInt(Field(47, 2))), UInt(Field(44, 1)), UInt(Field(43, 1)));
let rhs = HalfPairMod(HalfPairOf(raw_b, if f == 0 then UInt(Field(28, 2)) else if f == 1 then 1 else 0),
                      if (f == 1 & Field(54, 1) == 0b1) | (f == 0 & Field(30, 1) == 0b1) then 1 else 0,
                      if f == 0 then UInt(Field(31, 1)) else if f == 1 then UInt(Field(56, 1)) else 0);
let predicate = PredRead(UInt(Field(39, 3)), UInt(Field(42, 1)));
let compare = UInt(Field(if f == 0 then 35 else 49, 4));
let o0 = Combine53(UInt(Field(45, 2)), FCompare(compare, Half2At(lhs, 0), Half2At(rhs, 0)), predicate);
let o1 = Combine53(UInt(Field(45, 2)), FCompare(compare, Half2At(lhs, 1), Half2At(rhs, 1)), predicate);
if Field(if f == 0 then 49 else 53, 1) == 0b1 then {
    let both = RawAnd(o0, o1);
    PredWrite(UInt(Field(3, 3)), both);
    PredWrite(UInt(Field(0, 3)), RawNot(both))
} else {
    PredWrite(UInt(Field(3, 3)), o0);
    PredWrite(UInt(Field(0, 3)), o1)
}

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