fixed bit field field the encoding fixes should be
| 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 |
| 0 | 0 | 1 | 1 | 0 | 1 | dest | addr | src1 | src2 | desc | |||||||||||||||||||||
bits 31:0: 0011 01xx xxxx xxxx xxxx xxxx xxxx xxxx
Its format is @arith: format 1: src1 takes the address register. 1i (the I forms): src2 takes it.
Runs execute_ARITH with Form() 4.
Its operation is 6 opcodes' (Form() tells them apart), so it may read the fields of their layouts too.
| Field | Bits | The Sail reads it in |
|---|---|---|
| dest | 25:21 | ArithDest |
| addr | 20:19 | ArithA, ArithB |
| src1 | 18:12 | ArithA (18:14), ArithA |
| [13:7] | 13:7 | ArithB (not a field of the file) |
| src2 | 11:7 | ArithB |
| desc | 6:0 | ArithPattern |
ADD, MUL, FLR, MAX, MIN, MOV: the sources' sum, product, floor, maximum, minimum, the first source
let f = Form();
let p = ArithPattern();
let a = ArithA(p, false);
let b = ArithB(p, false);
let d = ArithDest();
SetDest(p, d, match f { 0 => V4FAdd(a, b), 1 => V4FMul(a, b), 2 => V4Floor(a), 3 => V4FMax(a, b),
4 => V4FMin(a, b), _ => a })
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 nihstro's shader_bytecode.h (BSD-3-Clause), as Azahar reads them.