UIMAD.WIDE

The uniform datapath

fixed bit field field the encoding fixes should be

Encoding

12712612512412312212112011911811711611511411311211111010910810710610510410310210110099989796
reusewaitrd_barwr_baryieldstall
9594939291908988878685848382818079787776757473727170696867666564
CarryIn(87)CarryIn(87)[83:81][74]is_signed
6362616059585756555453525150494847464544434241403938373635343332
313029282726252423222120191817161514131211109876543210
URaURdpred.notpredform010100101

bits 15:0: ---- 0010 1010 0101
bits 15:0: ---- 0100 1010 0101
bits 15:0: ---- 1000 1010 0101

Forms

Form (bits 11:9)bc
1 (001)URb at 32URc at 64
2 (010)URb at 64immediate at 32
4 (100)immediate at 32URc at 64

Runs execute_IMAD_WIDE.

Fields

FieldBitsFrom
reuse125:122the decoder
wait121:116the decoder
rd_bar115:113the decoder
wr_bar112:110the decoder
yield109the decoder
stall108:105the decoder
CarryIn(87)90CarryIn(87)
CarryIn(87)89:87CarryIn(87)
[83:81]83:81execute_IMAD_WIDE
[74]74execute_IMAD_WIDE
is_signed73execute_IMAD_WIDE
URa29:24the decoder
URd21:16the decoder
pred.not15the decoder
pred14:12the decoder
form11:9the decoder

Operation Sail

IMAD.WIDE and UIMAD.WIDE: NAK's OpIMad64, a * b (bit 73 signed) + the pair at c, into the pair at the destination. The carry out of the 64-bit sum goes to the predicate at 81-83 as IADD3's first (nvdisasm: IMAD.WIDE.U32 R14, P0, R10, R19, R14): one game's 64-bit division chains IMAD.WIDE ..., P0 into IMAD.X. With .X (bit 74; nvdisasm: IMAD.WIDE.U32.X R6, RZ, R5, R6, P1) the carry predicate at 87-90 joins the sum. A constant buffer's c is the pair of words there: a compute program and a fragment program of one game add c[1][0x0] (IMAD.WIDE R14, R12, R15, c[1][0x0]), and their work was skipped

let is_signed = Field(73, 1) == 0b1;
Int64();
let a32 = SrcInt(A);
let b32 = SrcInt(B);
let a64 = if is_signed then SignExtend(a32, 64) else ZeroExtend(a32, 64);
let b64 = if is_signed then SignExtend(b32, 64) else ZeroExtend(b32, 64);
if SrcIsImm(C) then throw(Unsupported("%s with c an immediate", OpName()));
let chi = SrcNext(C);
let product = a64 * b64;
let clo = SrcBits(C);
var sum : bits(64) = product + (chi @ clo);
var carry : bool = UInt(sum) < UInt(product);
if Field(74, 1) == 0b1 then {
    let more = sum + CarryIn(87);
    carry = (if carry then true else UInt(more) < UInt(sum));
    sum = more
};
PredWrite(UInt(Field(81, 3)), carry, Uniform());
D_write(sum[31 .. 0]);
if DstHasNext() then D_writeNext(sum[63 .. 32])

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.