cpu: lower VLDMXCSR and VSTMXCSR in the host-MXCSR profile #1127
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1134"
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 legacy-code-archaeologist on 2026-11-24T01:41:18Z.
Change
As agreed in #1093, VLDMXCSR and VSTMXCSR share the host-MXCSR opt-in in
tools/ffx_version_query.py.vvvv1111 lower exactly like LDMXCSR and STMXCSR, with the same word checks, statuses, fault behavior and caller-word restoration inmxcsr_entry.vvvv, anotherppor map, and a register operand as invalid. VEX.W is ignored, as the instruction defines, soc4 e1 f8 ae 10is still VLDMXCSR.Tests
Two tests, so a native capability skip cannot hide a failure of the translated path:
cpu_aot_vmxcsr(vmxcsr.asm) never runs native VEX code and has no capability skip.cpu_aot_mxcsragainst their fixed expectations on VEX copies of its exports: all four rounding modes with and without sticky flags, the four refused words, the caller-word restore after return, refusal and both fault sites, and the marker after a refusal.LDMXCSRthenVSTMXCSR, andVLDMXCSRthenSTMXCSR). Their read-back must equal the loaded word, and a refused VEX load must stop before the legacy read-back.noloadandfixedcontrols, and an/O2build with minimum MXCSR instruction counts.cpu_aot_vmxcsr_nativecompares the same exports with native execution.has_avx_os.STATUS_ILLEGAL_INSTRUCTION(0xC000001D) in a child process. Both the 3-byteC4and the 2-byteC5prefix are handled; ML64 emitsC4for[r9+d].tests/cpu/mxcsr.pygains the VEX mnemonics in its instruction walks, andlifted_violation(native=None)skips only the native comparison. The output and checks ofcpu_aot_mxcsrare unchanged.Verification
At
d1791fe(onmaina7710b7) on Windows 11 Pro (build 26100), Intel Core i7-6820HQ (AVX, OSXSAVE), MSVC 19.52, Python 3.12:ctest --preset dev --no-tests=error -R '^cpu_aot_(mxcsr|mxcsr_denormals|vmxcsr|vmxcsr_native)$' -V: 4/4 pass. The output includes:the default profile refuses each of the 12 MXCSR instructions of every export on its own: 7 VLDMXCSR, 3 VSTMXCSR, 1 LDMXCSR, 1 STMXCSR;native reference: VLDMXCSR with VEX.L=1 raises STATUS_ILLEGAL_INSTRUCTION in a child process.ctest --preset release --no-tests=error -R '^cpu_aot_(mxcsr|vmxcsr|vmxcsr_native)$': 3/3 pass. Only these tests' targets were built inrelease.ctest --preset dev --no-tests=error -R '^cpu_' -j 4: 212 of 213 pass, with three capability skips.cpu_shim_shadow_hardwarein its native run, independent of this change and reported in #799.tools/form_coverage.pyon a JUnit run of that suite no longer listsvldmxcsrorvstmxcsr.tests/docs_links_check.py,tests/bidi_controls_check.pyandtests/form_coverage_check.pypass.Not run: a host without AVX. The translated part is built not to execute native VEX code, but it was not run on such a host.
Refs #1093
AI-assisted: written with Claude Code; diff reviewed by a fresh agent; checked and submitted by the account owner.
🤖 Generated with Claude Code