F2IP

Conversions

fixed bit field field the encoding fixes should be

Encoding

12712612512412312212112011911811711611511411311211111010910810710610510410310210110099989796
reusewaitrd_barwr_baryieldstall
9594939291908988878685848382818079787776757473727170696867666564
flags[71:64]
6362616059585756555453525150494847464544434241403938373635343332
p1
313029282726252423222120191817161514131211109876543210
RaRdpred.notpred001001000011

bits 15:0: ---- 0010 0100 0011

Forms

Form (bits 11:9)bc
1 (001)Rb at 32Rc at 64

F2IP (0x243): two floats to 8-bit integers, packed. Form 1 alone: a at 24, b at 32, c at 64, as CuAssembler's sm_86 records "F2IP.U8.F32.NTZ R9, RZ, R4, RZ" (0x00000000000004ff_00000004ff097243) and "F2IP.S8.F32.NTZ R6, R15, R6, R4" give

Runs execute_F2IP.

Fields

FieldBitsFrom
reuse125:122the decoder
wait121:116the decoder
rd_bar115:113the decoder
wr_bar112:110the decoder
yield109the decoder
stall108:105the decoder
flags79:72execute_F2IP
[71:64]71:64execute_F2IP
p139:32execute_F2IP
Ra31:24the decoder
Rd23:16the decoder
pred.not15the decoder
pred14:12the decoder
form11:9the decoder

Operation Sail

let flags = Field(72, 8);
if (flags & not_vec(0xd8)) != 0x04 then throw(Unsupported("F2IP with flags 0x%x", flags));
let s8 = flags[4] == 0b1;
let relu = flags[3] == 0b1;
let lo = if s8 & not_bool(relu) then 0xc3000000 else 0x00000000;
let hi = if s8 then 0x42fe0000 else 0x437f0000;
let p0 = F2ipPart(UInt(Field(24, 8)), s8, lo, hi, UInt(flags[7 .. 6]));
let p1 = F2ipPart(UInt(Field(32, 8)), s8, lo, hi, UInt(flags[7 .. 6]));
let v = (p0 << 8) | p1;
R_write(Dst(), (R_read(UInt(Field(64, 8))) << 16) | v)

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.