The following findings describe the older audit at e7c4210, not the current implementation. They are retained
as regression examples. Current AOT and JIT emitters use raw-bit, stateful helpers in helpers/fp.c and
helpers/fp_arithmetic.c; host operations run only behind guards that preserve guest results and flags.
The QEMU differential test is the independent reference. This does not certify every operand or encoding.
Affected families include FADD/FSUB/FMUL/FDIV, FMADD/FMSUB/FNMADD/FNMSUB, vector/by-element FMLA/FMLS, FADDP and FSQRT. Not every form fails every test.
Concrete captured examples with FPCR=0 and initial FPSR=0:
1e221820, FDIV S0,S1,S2, S1=00000000, S2=80000000:
native result ffc00000, FPSR=0; reference 7fc00000, FPSR.IOC=1.1f020c20, FMADD S0,S1,S2,S3, S1=ffffffff, S2=S3=7fffffff:
the tested native-FMA build selected ffffffff; ARM's addend-first NaN
processing yields 7fffffff.1e222820, FADD S0,S1,S2, S1=55555555, S2=00000008:
result bits match, but FPSR.IXC is missing.FCVT[NAMPZ][SU], SCVTF/UCVTF, their fixed-point forms, vector conversion/narrowing forms and half/single/double FCVT had counterexamples in that audit. Its legacy helpers lack CPU state, so they cannot correctly implement all required input flushing, rounding, invalid/inexact reporting, DN and AHP behavior. The earlier FRINT repair does not automatically repair conversions using other helpers.
Examples:
1e200020, FCVTNS W0,S1, S1=ffffffff: integer result zero agrees,
but invalid conversion must set FPSR.IOC; ScarletNX leaves it clear.1e220020, SCVTF S0,W1, W1=7fffffff: rounded result agrees, but
FPSR.IXC is missing.1e22c020, FCVT D0,S1, S1=7f800456: SNaN conversion loses IOC.The older FRECPE, FRSQRTE, FRECPX, FRECPS and FRSQRTS paths required correction of NaNs,
exceptions, flushing and extreme-value behavior. For example, reciprocal
estimate of zero must report divide-by-zero, not merely return infinity.
The dedicated 5ea1d820 FRECPE control sweep reports 2,176 differing executions
out of 3,072 AOT/interpreter comparisons.
The raw-bit/stateful backend now implements these semantics, including the guest's estimate algorithm. The
vector FRSQRTE fast path has directed table-bin and mixed-lane tests in tests/native_rsqrte.c. Exactness tests
remain necessary when extending any fast path; no title-specific workaround or masked result comparison replaces them.
Made from docs/history/divergences.md at 69237645142c. GPL-3.0-or-later.