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 | 0 | comp_count_type | gpi1_neg | sv_pred | skipinv | op1_ext_vec3_or_has_w_vec4 | type_f16 | gpi1_swiz_ext | unified_store_swiz | unified_store_neg | op1 | op2_ext | prim_ustore | gpi0_swiz | gpi1_swiz | prim_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 |
| unified_store_slot_bank | prim_dest_num_gpi | prim_dest_num | op2 | src_config | gpi2_slot_num_bit_1 | gpi2_slot_num_bit_0_or_unified_store_abs | gpi1_slot_num | gpi0_slot_num | write_mask_non_gpi | unified_store_slot_num | |||||||||||||||||||||
bits 63:0: 0010 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
Runs execute_VDUAL with Form() 0.
| Field | Bits | The Sail reads it in |
|---|---|---|
| comp_count_type | 59 | Bit(59) |
| gpi1_neg | 58 | |
| sv_pred | 57:56 | |
| skipinv | 55 | |
| op1_ext_vec3_or_has_w_vec4 | 54 | Bit(54) |
| type_f16 | 53 | Bit(53) |
| gpi1_swiz_ext | 52 | |
| unified_store_swiz | 51:48 | |
| unified_store_neg | 47 | |
| op1 | 46:44 | execute_VDUAL |
| op2_ext | 43 | Bit(43) |
| prim_ustore | 42 | Bit(42) |
| gpi0_swiz | 41:38 | |
| gpi1_swiz | 37:34 | |
| prim_dest_bank | 33:32 | execute_VDUAL |
| unified_store_slot_bank | 31:30 | |
| prim_dest_num_gpi | 29:28 | execute_VDUAL |
| prim_dest_num | 27:21 | execute_VDUAL |
| op2 | 20:18 | execute_VDUAL |
| src_config | 17:16 | execute_VDUAL |
| gpi2_slot_num_bit_1 | 15 | |
| gpi2_slot_num_bit_0_or_unified_store_abs | 14 | |
| gpi1_slot_num | 13:12 | |
| gpi0_slot_num | 11:10 | |
| write_mask_non_gpi | 9:7 | execute_VDUAL |
| unified_store_slot_num | 6:0 |
VDUAL: two operations that share their register reads, op1 into the unified store or the internal register (prim_ustore), op2 into the other, both written after both are evaluated
let cct = Bit(59);
let ext = Bit(54);
let f16 = Bit(53);
let ustore = Bit(42) == 1;
let op1 = (if cct == 0 & ext == 1 then 8 else 0) + UInt(Field(44, 3));
let op2 = 8 * Bit(43) + UInt(Field(18, 3));
if op1 >= 14 | op2 == 0 | op2 >= 14 then throw(Refuse("VDUAL opcode"));
let n1 = DualSources(op1);
let n2 = DualSources(op2);
let unified_vector = if ustore then DualVectorStore(op1) else DualVectorStore(op2);
let type = if f16 == 1 then T_F16 else T_F32;
Internal(GPI_DEST, UInt(Field(28, 2)), 0, type);
Dest(UNIFIED, UInt(Field(21, 7)), UInt(Field(32, 2)), 0, unified_vector, if unified_vector then 8 else 7);
SetType(UNIFIED, type);
let op1_dest = if ustore then UNIFIED else GPI_DEST;
let op2_dest = if ustore then GPI_DEST else UNIFIED;
if not_bool(DualLayouts(n1, n2, UInt(Field(16, 2)))) then throw(Refuse("VDUAL source layout"));
let fixed_mask = UInt(Field(7, 3)) + (if cct == 1 & ext == 1 then 8 else 0);
let op1_mask = if ustore then DualMask(BankOf(op1_dest), DualVectorStore(op1), cct, f16) else fixed_mask;
let op2_mask = if ustore then fixed_mask else DualMask(BankOf(op2_dest), DualVectorStore(op2), cct, f16);
foreach (i from 0 to n1 - 1) DualSource(2 + i, 1, i, n1, type, DualVectorLoad(op1));
foreach (i from 0 to n2 - 1) DualSource(5 + i, 2, i, n1, type, DualVectorLoad(op2));
if Failed() then throw(Stop());
DualAlu(op1, 2, n1, op1_mask, cct, R1);
DualAlu(op2, 5, n2, op2_mask, cct, R2);
if Failed() then throw(Stop());
Store(op1_dest, R1, op1_mask, 0);
Store(op2_dest, R2, op2_mask, 0)
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).