VOTE

System registers, votes, shuffles and barriers

fixed bit field field the encoding fixes should be

VOTE

6362616059585756555453525150494847464544434241403938373635343332
0101000011011mode[47:45]valuevalue
313029282726252423222120191817161514131211109876543210
pred.notpredRd

bits 63:48: 0101 0000 1101 1---

Runs execute_VOTE with Form() 0.

Fields

FieldBitsFrom
mode49:48execute_VOTE
[47:45]47:45execute_VOTE
value42execute_VOTE
value41:39execute_VOTE
pred.not19the decoder
pred18:16the decoder
Rd7:0Dst()

Operation Sail

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).