upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/pe_loader.cpp
diff options
context:
space:
mode:
authorAnira <67195196+zxcvqwerasdf@users.noreply.github.com>2026-11-22 14:44:16 +0200
committerAnira <67195196+zxcvqwerasdf@users.noreply.github.com>2026-11-22 15:23:17 +0200
commit1062df51547c13517e344c477e10d1fd4c604054 (patch)
treedc3ec570b06fae322fe179a360df889b35d32cb0 /runtime/src/pe_loader.cpp
parenta0acd33d77babe67a28e398b2936a9f735a50f5d (diff)
Shader: accept `abs` on v_pack_b32_f16 (a sign clear of the packed half)
Follow-up to #1570, which took the `neg` half of SHADER-260 and left `abs` refused. `abs` is the ISA's absolute value of the operand: a clear of the sign bit, on the 16-bit half the operand contributes and applied before `neg` (which #1570 emits as a bit 15 flip). The instruction already moved each half unchanged, so the translator emitted nothing for `abs` and threw `Unsupported("v_pack_b32_f16 abs modifier")` for any shader that used it. Emit the clear instead: OpBitwiseAnd 0x7FFF on the selected half, before the `neg` xor. No hardware run of this instruction with `abs` exists, so the docs row says the rule is ISA-derived and unmeasured rather than quoting a measurement. Tests: exact-bit CPU cases in tests/semantic/test_pack_b32_f16_mods.py and tests/test_values.py (both halves, op_sel, an sNaN payload, neg+abs order), the interpreter-run GPU fixture ps_f16_pack_mods with its words derived from the rule, and the row in docs/design.md. SHADER-260, Depends on: #1570
Diffstat (limited to 'runtime/src/pe_loader.cpp')
0 files changed, 0 insertions, 0 deletions