F2F.F64

Conversions

fixed bit field field the encoding fixes should be

Encoding

12712612512412312212112011911811711611511411311211111010910810710610510410310210110099989796
reusewaitrd_barwr_baryieldstall
9594939291908988878685848382818079787776757473727170696867666564
ssize[80]rnddsize
6362616059585756555453525150494847464544434241403938373635343332
313029282726252423222120191817161514131211109876543210
RaRdpred.notpredform100010000

bits 15:0: ---- 0011 0001 0000
bits 15:0: ---- 1001 0001 0000
bits 15:0: ---- 1011 0001 0000
bits 15:0: ---- 1101 0001 0000

Forms

Form (bits 11:9)bc
1 (001)Rb at 32Rc at 64
4 (100)immediate at 32Rc at 64
5 (101)constant buffer: offset at 38, bank at 54Rc at 64
6 (110)URb at 32Rc at 64

Runs execute_F2F64.

Fields

FieldBitsFrom
reuse125:122the decoder
wait121:116the decoder
rd_bar115:113the decoder
wr_bar112:110the decoder
yield109the decoder
stall108:105the decoder
ssize85:84execute_F2F64
[80]80execute_F2F64
rnd79:78execute_F2F64
dsize76:75execute_F2F64
Ra31:24the decoder
Rd23:16the decoder
pred.not15the decoder
pred14:12the decoder
form11:9the decoder

Operation Sail

F2F.F64 (NAK's OpF2F with a double on a side): the destination's log2 bytes at 75, the source's at 84, the rounding at 78 and FTZ at 80, as F2F's. A float to a double is exact; a double to a float is rounded by the mode

let dsize = UInt(Field(75, 2));
let ssize = UInt(Field(84, 2));
let rnd = UInt(Field(78, 2));
if not_bool(Float64()) then throw(Unsupported("F2F.F64 on a device without doubles"));
if Field(80, 1) == 0b1 then throw(Unsupported("F2F.F64.FTZ"));
if SrcIsImm(B) then throw(Unsupported("F2F.F64 with an immediate"));
if dsize == 3 & ssize == 2 then D_writeF64(F32ToF64(SrcF(B)))
else if dsize == 2 & ssize == 3 then D_write(RoundF64(rnd, SrcF64(B)))
else throw(Unsupported("F2F.F64 from %u to %u bytes", 1 << ssize, 1 << dsize))

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.