fixed bit field field the encoding fixes should be
| 63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
| 0 | 0 | 1 | 1 | 0 | pred | skipinv | dest_type | syncstart | dest_ext | end | src1_ext | repeat_count | nosched | op | src_type | src1_mod | src_comp | dest_bank | |||||||||||||
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| src1_bank | dest_n | src1_n | mask | ||||||||||||||||||||||||||||
bits 63:0: 0011 0xxx xxxx xxx- xxxx xxxx xxxx x-xx xx-- xxxx xxx- ---- --xx xxxx x--- xxxx
Runs execute_VCOMP with Form() 0.
| Field | Bits | The Sail reads it in |
|---|---|---|
| pred | 58:56 | |
| skipinv | 55 | |
| dest_type | 54:53 | execute_VCOMP |
| syncstart | 52 | |
| dest_ext | 51 | Bit(51) |
| end | 50 | |
| src1_ext | 49 | Bit(49) |
| repeat_count | 47:44 | execute_VCOMP |
| nosched | 43 | |
| op | 42:41 | execute_VCOMP |
| src_type | 40:39 | execute_VCOMP |
| src1_mod | 38:37 | execute_VCOMP |
| src_comp | 36:35 | execute_VCOMP |
| dest_bank | 33:32 | execute_VCOMP |
| src1_bank | 31:30 | execute_VCOMP |
| dest_n | 27:21 | execute_VCOMP |
| src1_n | 13:7 | execute_VCOMP |
| mask | 3:0 | execute_VCOMP |
let dest_type = VcompType(UInt(Field(53, 2)));
let src_type = VcompType(UInt(Field(39, 2)));
if dest_type == T_UNK | src_type == T_UNK then throw(Refuse("VCOMP with type 3"));
let op = UInt(Field(41, 2));
Dest(DEST, UInt(Field(21, 7)), UInt(Field(32, 2)), Bit(51), 1, 8);
Src12(SRC1, UInt(Field(7, 7)), UInt(Field(30, 2)), Bit(49), 1, 8);
SetFlags(SRC1, Modifier(UInt(Field(37, 2))));
SetType(SRC1, src_type);
SetType(DEST, dest_type);
foreach (r from 0 to UInt(Field(44, 4))) {
if not_bool(Failed()) then {
Load(A, SRC1, 2 ^ UInt(Field(35, 2)), Rep(SRC1, r, O_SRC1, R_SLMSI));
if not_bool(Failed()) then {
let x = At(A, 0);
Reset(R, 1, K_FLOAT);
if op == 0 then Put(R, 0, FDiv(One(), x))
else if op == 1 then Put(R, 0, FInvSqrt(x))
else if op == 2 then Put(R, 0, FLog2(x))
else {
let nan = FIsNaN(x);
let one = One();
let e = FExp2(x);
Put(R, 0, if nan then one else e)
};
Store(DEST, R, UInt(Field(0, 4)), Rep(DEST, r, O_DEST, R_SLMSI))
}
}
}
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 Vita3K's usse_translator_entry.cpp (GPL-2.0-or-later).