fixed bit field field the encoding fixes should be
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| 0 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | |||||||||||||||||||
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| Rb | pred.not | pred | Ra | ||||||||||||||||||||||||||||
bits 63:48: 0101 1101 0010 0---
Runs execute_HSETP2 with Form() 0.
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | cbuf.bank | cbuf.offset | ||||||||||||||||||||||
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| cbuf.offset | pred.not | pred | Ra | ||||||||||||||||||||||||||||
bits 63:48: 0111 111- 1--- ----
Runs execute_HSETP2 with Form() 1.
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| 0 | 1 | 1 | 1 | 1 | 1 | 1 | imm.sign | 0 | imm | ||||||||||||||||||||||
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| imm | pred.not | pred | Ra | ||||||||||||||||||||||||||||
bits 63:48: 0111 111- 0--- ----
Runs execute_HSETP2 with Form() 2.
The operation reads some of these fields in some forms alone (it chooses by Form()), so the diagrams show only the decoder's.
| Field | Bits | From |
|---|---|---|
| [56] | 56 | execute_HSETP2 |
| [54] | 54 | execute_HSETP2 |
| lhs | 48:47 | execute_HSETP2 |
| o0 | 46:45 | execute_HSETP2 |
| lhs | 44 | execute_HSETP2 |
| lhs | 43 | execute_HSETP2 |
| predicate | 42 | execute_HSETP2 |
| predicate | 41:39 | execute_HSETP2 |
| [31] | 31 | execute_HSETP2 |
| [30] | 30 | execute_HSETP2 |
| rhs | 29:28 | execute_HSETP2 |
| Rb | 27:20 | RegB() |
| pred.not | 19 | the decoder |
| pred | 18:16 | the decoder |
| Ra | 15:8 | RegA() |
| [5:3] | 5:3 | execute_HSETP2 |
| [2:0] | 2:0 | execute_HSETP2 |
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).