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 | 1 | pred | skipinv | test2 | comp_sel | syncstart | dest_ext | src0_ext | src1_ext | src2_ext | move_type | repeat_count | nosched | data_type | test1 | src0_swiz | src0_bank | 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 | src2_bank | mask | dest_n | src0_n | src1_n | src2_n | |||||||||||||||||||||||||
bits 63:0: 0011 1xxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
Runs execute_VMOV with Form() 0.
| Field | Bits | The Sail reads it in |
|---|---|---|
| pred | 58:56 | |
| skipinv | 55 | |
| test2 | 54 | Bit(54) |
| comp_sel | 53 | Bit(53) |
| syncstart | 52 | |
| dest_ext | 51 | Bit(51) |
| src0_ext | 50 | Bit(50) |
| src1_ext | 49 | Bit(49) |
| src2_ext | 48 | Bit(48) |
| move_type | 47:46 | execute_VMOV |
| repeat_count | 45:44 | execute_VMOV |
| nosched | 43 | |
| data_type | 42:40 | execute_VMOV |
| test1 | 39 | Bit(39) |
| src0_swiz | 38:35 | execute_VMOV |
| src0_bank | 34 | Bit(34) |
| dest_bank | 33:32 | execute_VMOV |
| src1_bank | 31:30 | execute_VMOV |
| src2_bank | 29:28 | execute_VMOV |
| mask | 27:24 | execute_VMOV |
| dest_n | 23:18 | execute_VMOV |
| src0_n | 17:12 | execute_VMOV |
| src1_n | 11:6 | execute_VMOV |
| src2_n | 5:0 | execute_VMOV |
VMOV: src1's components the mask enables into the destination; with a move type, each where the test of src0's same component against zero holds (test1 and test2), else src2's. A repeat at a time
let move_type = UInt(Field(46, 2));
let type = UInt(Field(40, 3));
if move_type == 3 then throw(Refuse("VMOV move type 3"));
let doubled = type == T_C10 | type == T_F16 | type == T_F32;
let conditional = move_type != 0;
let bits = if doubled then 7 else 6;
Dest(DEST, UInt(Field(18, 6)), UInt(Field(32, 2)), Bit(51), doubled, bits);
Src12(SRC1, UInt(Field(6, 6)), UInt(Field(30, 2)), Bit(49), doubled, bits);
let mask = if type == T_F16 | type == T_F32 then WriteMask(DEST, UInt(Field(24, 4)), type == T_F16)
else if not_bool(doubled) then 1 else UInt(Field(24, 4));
if doubled then Vec34Swizzle(SRC1, UInt(Field(35, 4)), 0, 2) else SetSwizzle(SRC1, SW_X, SW_Y, SW_Z, SW_W);
SetType(SRC1, type);
SetType(DEST, type);
let test_type = if move_type == 2 then T_U8 else type;
let compare = Bit(54) * 2 + Bit(39);
if conditional then {
Src0(SRC0, UInt(Field(12, 6)), Bit(34), Bit(50), doubled, bits);
SetType(SRC0, test_type);
Src12(SRC2, UInt(Field(0, 6)), UInt(Field(28, 2)), Bit(48), doubled, bits);
SetType(SRC2, type);
if Bit(53) == 1 then CopySwizzle(SRC0, SRC1);
CopySwizzle(SRC2, SRC1)
};
if doubled & (type == T_F16 | type == T_F32) then Multiplier(2, 2, 2, 2) else Multiplier(1, 1, 1, 1);
foreach (r from 0 to UInt(Field(44, 2))) {
if not_bool(Failed()) then {
Load(A, SRC1, mask, Rep(SRC1, r, O_SRC1, R_SLMSI));
CopyValue(R, A);
if conditional then {
Load(TEST, SRC0, mask, Rep(SRC0, r, O_SRC0, R_SLMSI));
Load(B, SRC2, mask, Rep(SRC2, r, O_SRC2, R_SLMSI));
let kind = KindOf(TEST);
foreach (i from 0 to Min(Count(A), Count(TEST)) - 1) {
let zero = ZeroOf(kind);
let cond = MoveTest(kind, compare, At(TEST, i), zero);
let a = At(A, i);
let b = At(B, i);
Put(R, i, if cond then a else b)
}
};
Store(DEST, R, mask, Rep(DEST, r, O_DEST, R_SLMSI))
}
};
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).