MATCH

Moves and predicates

fixed bit field field the encoding fixes should be

Encoding

12712612512412312212112011911811711611511411311211111010910810710610510410310210110099989796
reusewaitrd_barwr_baryieldstall
9594939291908988878685848382818079787776757473727170696867666564
[83:81]anypair
6362616059585756555453525150494847464544434241403938373635343332
313029282726252423222120191817161514131211109876543210
rRdpred.notpred001110100001

bits 15:0: ---- 0011 1010 0001

NAK encodes UMOV as a uniform ALU instruction: form 4 an immediate (0x882), form 6 a uniform register (0xc82)

Runs execute_MATCH.

Fields

FieldBitsFrom
reuse125:122the decoder
wait121:116the decoder
rd_bar115:113the decoder
wr_bar112:110the decoder
yield109the decoder
stall108:105the decoder
[83:81]83:81execute_MATCH
any79execute_MATCH
pair73execute_MATCH
r31:24execute_MATCH
Rd23:16the decoder
pred.not15the decoder
pred14:12the decoder

Operation Sail

MATCH: NAK's OpMatch, the lanes of the invocation's 32 whose value (a pair with bit 73) is the same. ANY (bit 79) gives them; ALL gives all the active lanes when they all are, else 0, and the predicate

let any = Field(79, 1) == 0b1;
let pair = Field(73, 1) == 0b1;
let r = UInt(Field(24, 8));
let lo = R_read(r);
let hi = if pair then R_read(if r >= RZ then r else r + 1) else 0x00000000;
var mask : bits(32) = 0x00000000;
if Lone() then {
    mask = 0x00000001 /* the lane itself, lane 0 */
} else {
    let base = SystemValue(0) & 0xffffffe0;
    Capability(65);
    Capability(64);
    foreach (j from 0 to 31) {
        let lane = base | to_bits(32, j);
        let same_lo = Shuffle(lo, lane) == lo;
        let same = if pair then same_lo & (Shuffle(hi, lane) == hi) else same_lo;
        mask = mask | (if same then to_bits(32, 2 ^ j) else 0x00000000)
    }
};
let active = Ballot32(true);
let m = mask & active;
if any then R_write(Dst(), m) else {
    let all = m == active;
    R_write(Dst(), if all then m else 0x00000000);
    PredWrite(UInt(Field(81, 3)), all, 0)
}

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 Mesa's NAK (sm70_encode.rs, MIT) and CuAssembler's sm_86 records.