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 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 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 | Rd | ||||||||||||||||||||||||||||
bits 63:48: 0101 1100 0011 0---
Runs execute_FLO 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 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 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 | Rd | ||||||||||||||||||||||||||||
bits 63:48: 0100 1100 0011 0---
Runs execute_FLO 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 | 0 | 0 | imm.sign | 0 | 0 | 1 | 1 | 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 | Rd | ||||||||||||||||||||||||||||
bits 63:48: 0011 100- 0011 0---
Runs execute_FLO 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 |
|---|---|---|
| [48] | 48 | execute_FLO |
| [41] | 41 | execute_FLO |
| [40] | 40 | execute_FLO |
| Rb | 27:20 | the right operand |
| pred.not | 19 | the decoder |
| pred | 18:16 | the decoder |
| Rd | 7:0 | Dst() |
FLO: the highest bit set (of the inverse with bit 40; of a negative value's inverse when signed, 48), its distance from 31 with bit 41 (none: 0xffffffff), from the bits spread below it and counted
var value : bits(32) = RightOf(Form());
if Field(40, 1) == 0b1 then { value = not_vec(value) };
if Field(48, 1) == 0b1 then {
let negative = Negative(value);
value = if negative then not_vec(value) else value
};
var spread : bits(32) = value;
foreach (k from 0 to 4) { spread = spread | (spread >> to_bits(32, 2 ^ k)) };
let index = PopCount(spread) - 0x00000001;
if Field(41, 1) == 0b1 then {
let found = value != 0x00000000;
R_write(Dst(), if found then 0x0000001f - index else index)
} else R_write(Dst(), index)
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).