cpu: accept the 8087/287 x87 controls as FNOP in the x87 profile #1312
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1319"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by archielcqp-a11y on 2026-11-24T07:51:28Z.
Change
The x87 leaf profile rejected
fneni,fndisiandfnsetpm. The 80387 and later execute them asfnop, so the profile now treats them likefnop: no register stack change, and C0 to C3 undefined afterwards.feniandfdisidecode aswaitand the no-wait form; ML64 assemblesfsetpmasfnsetpmwithout awaitand has nofnsetpmspelling. Closes fiveunobservedrows of the x64 form-coverage gaps (feni,fneni,fdisi,fndisi,fsetpm).Verification
Commit
a970e1aon upstream6c1b571, Windows 10 build 19045.ctest --preset dev --no-tests=error -R '^cpu_aot_x87_examine$' -V: 816 cases over 5 exports matched the independent model in the native and translated DLLs, each returning with control word 0x027F and an empty stack. Mutated controls normal/unsigned/positive/legacy gave 5/136/7/34 mismatches; 6 sequences rejected.ctest --no-tests=error -R '^(cpu_aot_|cpu_lower|docs_links|form_coverage)': 153/153 passed.python tools/form_coverage.py <junit.xml> --records <build>/form_coverage --gaps x64_zen2: 68 → 63 rows;fnsetpmstays, because ML64 cannot spell it.Evidence and follow-up
tests/cpu/x87_examine.asmgains alegacy_controlsexport (original source, MIT) that runsfeni,fneni,fdisi,fndisiandfsetpmbetween an m80 load and store over the fixture's 34 values. The native run confirms on this processor that the five forms leave the value, the control word and the stack unchanged.Negative controls: a fourth mutated translation,
legacy, flips the sign of ST(0) atfnsetpmand gives 34 mismatches, one perlegacy_controlscase; translation rejects a reader of C0 afterfneniorfnsetpm.docs/experiments.mddocuments the forms in thecpu_aot_x87_examineparagraph.Checklist
This change was AI-assisted.
🤖 Generated with Claude Code