mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-23 00:53:02 -05:00
VOP3 0x140 is v_mad_legacy_f32 on gfx10.1. Measured on gfx1010 (RX 5700 XT) in wave32 and wave64, IEEE 0 and 1 and f32 denormal modes 0 to 3, it rounds the product before the add, flushes f32 denormal sources, product and result in every mode, and gives a +0 product for a zero factor. The translation multiplies, applies the zero rule and flushTinyProduct, adds, and keeps the nanResultF32 wrapper. f32DenormalFlushFor returns 3 for the instruction before reading FLOAT_MODE. A sum of two zeros takes its sign on the bits, as lavapipe returned -0 for +0 + -0. The execution test pins the measured results and compares NaN bits exactly. RDNA2 (gfx1031), where the encoding is v_fma_legacy_f32 and fused, is noted in TechnicalDebt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>