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 | 1 | 0 | 1 | 1 | 1 | 1 | 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 | Rd | |||||||||||||||||||||||||||
bits 63:48: 0101 1011 1110 0---
Runs execute_LOP3 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 | 0 | 0 | 0 | 0 | 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: 0000 001- ---- ----
Runs execute_LOP3 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 | 0 | 1 | 1 | 1 | 1 | imm.sign | 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: 0011 11-- ---- ----
Runs execute_LOP3 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 |
|---|---|---|
| value | 55:48 | execute_LOP3 |
| [50:48] | 50:48 | execute_LOP3 |
| [47] | 47 | execute_LOP3 |
| third | 46:39 | execute_LOP3 |
| [37:36] | 37:36 | execute_LOP3 |
| value | 35:28 | execute_LOP3 |
| Rb | 27:20 | the right operand |
| pred.not | 19 | the decoder |
| pred | 18:16 | the decoder |
| Ra | 15:8 | RegA() |
| Rd | 7:0 | Dst() |
LOP3: the truth table (28-35 for the register form, else 48-55) of a, b and c, as the fewest operations that make it (lut3.sail); .CC (47) with .X (38 for the register form, 56 for the constant's, 57 for the immediate's); the register form's predicate at 48 by the mode at 36-37 as LOP's
let f = Form(); let first = R_read(RegA()); let second = RightOf(f); let third = R_read(UInt(Field(39, 8))); let value = Lut3(if f == 0 then Field(28, 8) else Field(48, 8), first, second, third); R_write(Dst(), value); if Field(47, 1) == 0b1 then FlagsLogicExtended(value, UInt(Field(if f == 0 then 38 else if f == 1 then 56 else 57, 1))); if f == 0 & UInt(Field(48, 3)) < 7 then PredWrite(UInt(Field(48, 3)), LopPredicate(value, UInt(Field(36, 2))))
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).