Files
totk-pc-recomp/runtime
Valiantsin DzerakhandClaude Opus 5.5 5c48f62fca The FP fast paths of the lifted code check FPCR.RMode inside the result compare and pass vector slow-path operands through the Cpu
The result check of every scalar and vector FP op compares |r| against a per-thread threshold in the Cpu (fp_th_s,
fp_th_d): the smallest normal in round-to-nearest, NaN under a directed RMode, so a directed mode sends every result
to the redo path and the separate load and test of c->fpcr per op goes. rt_fpcr_threshold sets it; rt_fpcr_sync
calls it on every host, and the Cpu inits and the fiber switch's fpcr copy call it too.

The vector slow path FN(vredo) takes its operands from c->fp_arg instead of three stack copies per call site, which
takes ___chkstk_ms out of the large lifted functions (275 call sites in main to 5). It reruns only the lanes that
failed the check. A NaN result in round-to-nearest goes from redo straight to fix with the FZ-flushed operands. The
static FP helpers use preserve_most, so their cold call sites do not spill the caller-saved registers.

Results are bit-identical to the old headers (equivalence harness of build/v143-genko/static2, 200M cases).
On the 42 hottest 1.4.3 functions: instructions -8.2%, bytes -8.8%, hot-path instructions -4.3%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 00:31:00 +03:00
..
2026-10-31 21:17:12 +01:00
2026-10-31 21:17:12 +01:00
2026-10-31 21:17:12 +01:00
2026-10-31 21:17:12 +01:00
2026-11-08 19:39:18 +03:00