Integer, logic, video and predicate instructions
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 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | right | right | left | cmp | [46:45] | cmp | condition | condition | left | ||||||||||
| 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 |
| right | pred.not | pred | Ra | [5:3] | [2:0] | ||||||||||||||||||||||||||
bits 63:48: 0101 0000 1111 0---
Runs execute_VSETP with Form() 0.
| Field | Bits | From |
|---|---|---|
| right | 50 | execute_VSETP |
| right | 49 | execute_VSETP |
| left | 48 | execute_VSETP |
| cmp | 47 | execute_VSETP |
| [46:45] | 46:45 | execute_VSETP |
| cmp | 44:43 | execute_VSETP |
| condition | 42 | execute_VSETP |
| condition | 41:39 | execute_VSETP |
| left | 38:36 | execute_VSETP |
| [35:20] | 35:20 | execute_VSETP |
| right | 30:28 | execute_VSETP |
| pred.not | 19 | the decoder |
| pred | 18:16 | the decoder |
| Ra | 15:8 | RegA() |
| [5:3] | 5:3 | execute_VSETP |
| [2:0] | 2:0 | execute_VSETP |
VSETP: Each operand is independently sign- or zero-extended to 33 bits before comparing
let left = VmSelect(R_read(RegA()), UInt(Field(36, 3)) + 8 * UInt(Field(48, 1)));
let right = if Field(50, 1) == 0b1 then VmSelect(R_read(RegB()), UInt(Field(28, 3)) + 8 * UInt(Field(49, 1)))
else VmSelect(Bits32(ZeroExtend(Field(20, 16), 32)), 4 + 8 * UInt(Field(49, 1)));
let left64 = I64Of(left, UInt(Field(48, 1)));
let right64 = I64Of(right, UInt(Field(49, 1)));
let less = I64Greater(right64, left64);
let greater = I64Greater(left64, right64);
let equal = I64Equal(left64, right64);
let cmp = UInt(Field(43, 2)) + 4 * UInt(Field(47, 1));
let result = match cmp {
0 => false, 1 => less, 2 => equal, 3 => not_bool(greater), 4 => greater, 5 => not_bool(equal),
6 => not_bool(less), _ => true
};
let condition = PredRead(UInt(Field(39, 3)), UInt(Field(42, 1)));
PredWrite(UInt(Field(3, 3)), Combine53(UInt(Field(45, 2)), result, condition));
PredWrite(UInt(Field(0, 3)), Combine53(UInt(Field(45, 2)), not_bool(result), condition))
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).