mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 18:18:38 +00:00
tests/semantic/test_valu_div_fixup.py compared a hand-written Python model of the fixup against itself and never imported tools/rdna2spirv.py, so it passed whatever the translator did, and its rules had drifted from native RDNA2 (gfx1036) on six points (NaN priority, the sign of 0/0 and inf/inf, inf(S2), the copysign of the pass-through, NaN(S0), and the exponent-difference cutoff). It now translates hand-written listings and asserts what the translator emits: the pure-integer lowering's op order and classification constants, NaN(S2) above NaN(S1) read off the dataflow, one word per measured rule through spirv_mini_interp, and the EXEC-masked and null-destination cases. The f16 model is gone rather than ported: the translator has no v_div_fixup_f16 lowering yet (#2477 adds it with its own translator tests). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
10 lines
454 B
NASM
10 lines
454 B
NASM
; v_div_fixup_f32 without output modifiers: D = fixup(S0=v1 quotient, S1=v2 denominator, S2=v3 numerator).
|
|
; No buffer is touched, so the emitted SPIR-V is the lowering and nothing else: this is the fixture
|
|
; tests/semantic/test_valu_div_fixup.py pins the integer op order, constants and NaN priority with.
|
|
v_mov_b32 v1, 0x3f800000
|
|
v_mov_b32 v2, 0x40000000
|
|
v_mov_b32 v3, 0x40400000
|
|
v_div_fixup_f32 v4, v1, v2, v3
|
|
exp mrt0 v4, v4, v4, v4 done vm
|
|
s_endpgm
|