System registers, votes, shuffles and barriers
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 | 0 | 1 | 1 | mode | [47:45] | value | value | |||||||||||||||
| 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 |
| pred.not | pred | Rd | |||||||||||||||||||||||||||||
bits 63:48: 0101 0000 1101 1---
Runs execute_VOTE with Form() 0.
| Field | Bits | From |
|---|---|---|
| mode | 49:48 | execute_VOTE |
| [47:45] | 47:45 | execute_VOTE |
| value | 42 | execute_VOTE |
| value | 41:39 | execute_VOTE |
| pred.not | 19 | the decoder |
| pred | 18:16 | the decoder |
| Rd | 7:0 | Dst() |
VOTE: the ballot of the predicate at 39 into d, and ALL (0), ANY (1) or EQ (2) of it (48-49) into the predicate at 45. The lane model's warp is its lane alone: its ballot is its own bit
let value = PredRead(UInt(Field(39, 3)), UInt(Field(42, 1)));
let one = Bits32(0x00000001); /* made here, as the translator made it */
let lane_model = LaneModel();
let lane = if lane_model then LoneLane() else SubgroupLane();
let own = if not_bool(lane_model) then 0x00000000 else if QuadLaneModel() then one << lane else one;
let mask = if lane_model then (if value then own else 0x00000000) else BallotWord(lane, value);
let mode = UInt(Field(48, 2));
if mode < 3 then {
let any = mask != 0x00000000;
let result = if mode == 1 then any else {
let active = if lane_model then own else BallotWord(lane, true);
let all = mask == active;
if mode == 0 then all else all | not_bool(any)
};
PredWrite(UInt(Field(45, 3)), result)
};
R_write(Dst(), mask)
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).