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 | 1 | 0 | 0 | 1 | pred | skipinv | onceonly | syncstart | dest_ext | src1_neg | src1_ext | src2_ext | prec | vscomp | repeat_count | sign_test | zero_test | crcomb_and | chan | pdst_n | 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 | dest_n | wben | alu_sel | alu_op | src1_n | src2_n | ||||||||||||||||||||||||
bits 63:0: 0100 1xxx x-xx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
It is in a group of patterns that may match the same word: the decoder tries them in this order, and the first that matches decodes it: VPCK, VTST, VTSTMSK, VBW.
Runs execute_VTST with Form() 0.
| Field | Bits | The Sail reads it in |
|---|---|---|
| pred | 58:56 | |
| skipinv | 55 | |
| onceonly | 53 | |
| syncstart | 52 | |
| dest_ext | 51 | |
| src1_neg | 50 | Bit(50) |
| src1_ext | 49 | Bit(49) |
| src2_ext | 48 | Bit(48) |
| prec | 47 | Bit(47) |
| vscomp | 46 | Bit(46) |
| repeat_count | 45:44 | |
| sign_test | 43:42 | Test |
| zero_test | 41:40 | Test |
| crcomb_and | 39 | |
| chan | 38:36 | execute_VTST |
| pdst_n | 35:34 | execute_VTST |
| dest_bank | 33:32 | |
| src1_bank | 31:30 | TestSources |
| src2_bank | 29:28 | TestSources |
| dest_n | 27:21 | |
| wben | 20 | |
| alu_sel | 19:18 | execute_VTST |
| alu_op | 17:14 | execute_VTST |
| src1_n | 13:7 | TestSources |
| src2_n | 6:0 | TestSources |
VTST: the test of src1's and src2's component chan into predicate register pdst_n
let sel = UInt(Field(18, 2));
let alu_op = UInt(Field(14, 4));
let op = TestOp(sel, alu_op);
let type = TestType(sel, alu_op, Bit(47));
if op == TO_INVALID | type == T_UNK then throw(Refuse("VTST of ALU %u operation %u", sel, alu_op));
let chan = UInt(Field(36, 3));
if chan >= 4 then throw(Refuse("VTST of channel %u", chan));
TestSources(sel, type);
let n = Test(op, 2 ^ chan);
if n == 0 then throw(Stop());
PredWrite(UInt(Field(34, 2)), TestAt(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).