2 Commits
Author SHA1 Message Date
Thomas MartinandClaude Opus 5.5 70217841b5 VU0 programs: round toward zero through MXCSR directly, not std::fegetround / std::fesetround
The C runtime's calls set the x87 control word too (__mingw_setfp, _controlfp): ~2% of the game thread in a 1P match
(1,570 programs a frame). The host's float arithmetic is SSE's, so MXCSR's rounding bits alone give the same results.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-04 23:15:23 +01:00
Thomas MartinandClaude Opus 5.5 126beb5dff Native libraries: TMB's VU0 microprograms, bit-exact (phase 3, batch B1 2)
The hierarchy image's eight programs (0x278 hierFovTest2Asm, 0x3a8, 0x410 hierMulEoForObjAsm, 0x450 hierCsUpdateAsm,
0x5a8 hier, 0x670 vu0HierRotateAsm, 0x808 hierTraverseAsm, 0xab0 hdHatSphereTestAsm) as native C++ on the calling
context's VU0 state and VU0 data memory, written from their microcode in the ELF and checked on every call of the logs
(every register word and data memory byte they change). The arithmetic is the reference's: single precision rounded
toward zero, VU0's adder dropping the smaller operand's bits below the larger one's last mantissa bit, MULA/MADDA/MADD
chains in the microcode's order, ADDbc vf0 moves turning -0 into +0, flags untouched (vu0.cpp is compiled with
-frounding-math -ffp-contract=off).

The image VU0 holds is the hierarchy one until a kick of the 2D chain (debug draws only) is seen.

boot: 374,583 calls native, match1p: 24,047,924, 0 divergences; both match on every frame and record.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 18:57:02 +01:00