DPH

Arithmetic

fixed bit field field the encoding fixes should be

Encoding

313029282726252423222120191817161514131211109876543210
000011destaddrsrc1src2desc

bits 31:0: 0000 11xx 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_DOT4 with Form() 1.

Fields

Its operation is 3 opcodes' (Form() tells them apart), so it may read the fields of their layouts too.

FieldBitsThe Sail reads it in
dest25:21ArithDest
addr20:19ArithA, ArithB
src118:12ArithA (18:14), ArithA
[13:7]13:7ArithB (not a field of the file)
src211:7ArithB
desc6:0ArithPattern

Operation Sail

DP4, and DPH and DPHI (homogeneous: the first source's w taken as 1.0, the hardware's)

let f = Form(); /* 0 DP4, 1 DPH, 2 DPHI */
let p = ArithPattern();
let a0 = ArithA(p, f == 2);
let b = ArithB(p, f == 2);
let d = ArithDest();
let a = if f != 0 then V4Shuffle(a0, V4Const(0x00000000, 0x00000000, 0x00000000, 0x3f800000), 0, 1, 2, 7) else a0;
SetDestScalar(p, d, V4Dot(a, b))

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.