diff options
| author | evilclanker9000 <45567075+evilclanker9000@users.noreply.github.com> | 2026-11-23 21:26:43 +0100 |
|---|---|---|
| committer | evilclanker9000 <45567075+evilclanker9000@users.noreply.github.com> | 2026-11-23 21:26:43 +0100 |
| commit | 0b69f14d0334ac2bb560de56f6981fbef8e81377 (patch) | |
| tree | 7ebcb81bc3450c6aef2ad52fcd1597596da4304e /runtime/src/bcpack.cpp | |
| parent | 716923d134830a5b9f850ebb59da28298a1acc76 (diff) | |
rdna2spirv: an f64 literal's printed width picks the one-dword rule
A literal source is one ISA dword (bits 63:32 of the constant) only when its
printed spelling fits one dword. LLVM pads nothing, so such a literal prints in
at most 8 hex digits; a 16-digit spelling is the whole binary64 value. The
magnitude check from the previous commit read 0x0000000012345678 as the high
word 0x12345678 instead of the low one, and tools/f64_diff.py's CPU reference
made the same mistake, so a generated program could agree with the translator on
the wrong operand.
tools/shader_ir.py records the literal's hex-digit count next to f64_literal
(and now marks v_ldexp_f64's sources too); tools/rdna2spirv.py decides with it at
all three literal readers, and tools/f64_diff.py's read_source mirrors the rule.
Tests: tests/semantic/test_f64_literal_whole.py gains the padded-width case
(0x0000000012345678 -> low word 0x12345678, high word 0) next to the 8-digit
control, and tests/test_f64_diff.py checks the reference reads both spellings the
same way.
Diffstat (limited to 'runtime/src/bcpack.cpp')
0 files changed, 0 insertions, 0 deletions