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 | 0 | 1 | 1 | |||||||||||||||||||
| 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 | Rd | |||||||||||||||||||||||||||
bits 63:48: 0101 1101 0001 1---
Runs execute_HSET2 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 | 0 | 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 | Rd | |||||||||||||||||||||||||||
bits 63:48: 0111 110- 1--- ----
Runs execute_HSET2 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 | 0 | 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 | Rd | |||||||||||||||||||||||||||
bits 63:48: 0111 110- 0--- ----
Runs execute_HSET2 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_HSET2 |
| lhs | 48:47 | execute_HSET2 |
| test | 46:45 | execute_HSET2 |
| lhs | 44 | execute_HSET2 |
| lhs | 43 | execute_HSET2 |
| predicate | 42 | execute_HSET2 |
| predicate | 41:39 | execute_HSET2 |
| [31] | 31 | execute_HSET2 |
| [30] | 30 | execute_HSET2 |
| rhs | 29:28 | execute_HSET2 |
| Rb | 27:20 | RegB() |
| pred.not | 19 | the decoder |
| pred | 18:16 | the decoder |
| Ra | 15:8 | RegA() |
| Rd | 7:0 | Dst() |
HSET2: each half pair compared (35-38, else 49-52), combined with the predicate at 39, as 1.0 (49, else 53) or all ones in its half
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 == 0 then UInt(Field(30, 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 truth = if Field(if f == 0 then 49 else 53, 1) == 0b1 then 15360 else 65535; /* 0x3c00, 0xffff */
var result : bits(32) = 0x00000000;
foreach (lane from 0 to 1) {
let left = Half2At(lhs, lane);
let right = Half2At(rhs, lane);
let test0 = FCompare(compare, left, right);
let test = Combine53(UInt(Field(45, 2)), test0, predicate);
let bits = RawSelect(test, to_bits(32, truth * 65536 ^ lane), 0x00000000);
result = result | bits
};
R_write(Dst(), result)
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).