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 | 0 | 1 | 1 | pred | skipinv | gpi1_swiz_ext | 1 | opcode2 | dest_ext | end | src1_ext | repeat_mode | gpi0_abs | repeat_count | nosched | mask | src1_neg | src1_abs | gpi1_neg | gpi1_abs | gpi0_swiz_ext | 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 | gpi0_n | dest_n | gpi0_swiz | gpi1_swiz | gpi1_n | gpi0_neg | src1_swiz_ext | src1_swiz | src1_n | ||||||||||||||||||||||
bits 63:0: 0001 1xxx xx1x xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
Runs execute_VMAD with Form() 0.
| Field | Bits | The Sail reads it in |
|---|---|---|
| pred | 58:56 | |
| skipinv | 55 | |
| gpi1_swiz_ext | 54 | Bit(54) |
| opcode2 | 52 | Bit(52) |
| dest_ext | 51 | Bit(51) |
| end | 50 | |
| src1_ext | 49 | Bit(49) |
| repeat_mode | 48:47 | execute_VMAD |
| gpi0_abs | 46 | Bit(46) |
| repeat_count | 45:44 | execute_VMAD |
| nosched | 43 | |
| mask | 42:39 | execute_VMAD |
| src1_neg | 38 | Bit(38) |
| src1_abs | 37 | Bit(37) |
| gpi1_neg | 36 | Bit(36) |
| gpi1_abs | 35 | Bit(35) |
| gpi0_swiz_ext | 34 | Bit(34) |
| dest_bank | 33:32 | execute_VMAD |
| src1_bank | 31:30 | execute_VMAD |
| gpi0_n | 29:28 | execute_VMAD |
| dest_n | 27:22 | execute_VMAD |
| gpi0_swiz | 21:18 | execute_VMAD |
| gpi1_swiz | 17:14 | execute_VMAD |
| gpi1_n | 13:12 | execute_VMAD |
| gpi0_neg | 11 | Bit(11) |
| src1_swiz_ext | 10 | Bit(10) |
| src1_swiz | 9:6 | execute_VMAD |
| src1_n | 5:0 | execute_VMAD |
VMAD: the GPI register gpi0 times src1 plus gpi1, of three components (vec4: four), each source swizzled and its modifiers applied; repeat_count repeats of repeat_mode
let type = if Bit(52) == 1 then 2 else 1;
let mode = UInt(Field(47, 2));
let mask = UInt(Field(39, 4));
Src12(SRC1, UInt(Field(0, 6)), UInt(Field(30, 2)), Bit(49), 1, 7);
Dest(DEST, UInt(Field(22, 6)), UInt(Field(32, 2)), Bit(51), 1, 7);
Internal(SRC0, UInt(Field(28, 2)), F_GPI, T_F32);
Internal(SRC2, UInt(Field(12, 2)), F_GPI, T_F32);
Vec34Swizzle(SRC1, UInt(Field(6, 4)), Bit(10), type);
Vec34Swizzle(SRC0, UInt(Field(18, 4)), Bit(34), type);
Vec34Swizzle(SRC2, UInt(Field(14, 4)), Bit(54), type);
AddFlags(SRC1, F_ABS * Bit(37) + F_NEG * Bit(38));
AddFlags(SRC0, F_ABS * Bit(46) + F_NEG * Bit(11));
AddFlags(SRC2, F_ABS * Bit(35) + F_NEG * Bit(36));
Multiplier(2, 2, 2, 4);
foreach (r from 0 to UInt(Field(44, 2))) {
if not_bool(Failed()) then {
Load(A, SRC0, mask, Rep(SRC0, r, O_SRC0, mode));
Load(B, SRC1, mask, Rep(SRC1, r, O_SRC1, mode));
Load(C, SRC2, mask, Rep(SRC2, r, O_SRC2, mode));
Reset(R, Count(A), K_FLOAT);
foreach (i from 0 to Count(A) - 1) Put(R, i, FFma(At(A, i), At(B, i), At(C, i)));
Store(DEST, R, mask, Rep(DEST, r, O_DEST, mode))
}
};
ResetMultiplier()
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).