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:
authorbbareth <179921368+BBareth@users.noreply.github.com>2026-11-22 01:31:20 +0100
committerbbareth <179921368+BBareth@users.noreply.github.com>2026-11-22 01:31:20 +0100
commit3fe9203fc6e41832166912a3a2b9bc0eba9a34f2 (patch)
treeda80fad9f71b65426bc0afd5c5f7dd6ca5d8a260 /runtime/src/pe_loader.cpp
parent91b36cf86cb92a95836eed8af73abc0671a61e31 (diff)
tests/semantic: OpBitcast keeps signalling-NaN bits in the mini interpreter (TEST-67)
bits_f32/f32_bits went through struct's binary32 <-> double conversion, which quiets a signalling NaN (sets bit 22). Any word in 0x7f800001..0x7fbfffff or 0xff800001..0xffbfffff that passed through a float (an OpBitcast round trip, or an integer exported through a float output) came back changed, although OpBitcast is bit-exact in SPIR-V. About 0.4% of random words hit it, so seeded tests failed by chance: test_alu_shift_b64's v_ashrrev_i64 case and test_mem_diff's s_load family both fail on main. A float made by OpBitcast is now a float subclass that keeps its exact pattern; copies, composites, selects, variables and outputs pass it on, and arithmetic returns a plain float, which drops it (SPIR-V leaves NaN result bits open). Tests cover four sNaN words through every pass-through path, OpIsNan/OpFOrdEqual on one, and that arithmetic still gives a NaN. Fixes #509. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/pe_loader.cpp')
0 files changed, 0 insertions, 0 deletions