cpu: lower VLDMXCSR and VSTMXCSR in the host-MXCSR profile #1093
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#1093
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@legacy-code-archaeologist on GitHub · 2026-11-24 00:55 UTC · original
Claim: VLDMXCSR and VSTMXCSR in the host-MXCSR profile (follow-up to #1009 and #1057)
vldmxcsrandvstmxcsr(AVX group ofdocs/coverage/x64_zen2.tsv) are still refused, also in the opt-in host-MXCSR profile. When closing #995 you listed the VEX spellings as a separate follow-up, with their own encoding and host-capability checks. Compilers emit the VEX forms in AVX code paths, and the console CPU's code uses AVX, so I'd like to take this follow-up.Proposed behavior (same profile, same boundary)
host_mxcsrprofile (and itsdenormalsopt-in),VLDMXCSR m32andVSTMXCSR m32lower exactly like the legacy forms:_mm_setcsr/_mm_getcsr;vvvv= 1111. iced already decodes VEX.L = 1 (c5 fc ae 10) andvvvv≠ 1111 (c5 b8 ae 10) as invalid; both raise #UD natively. So they never reach the lowering, andregion()refuses the interval. The fixture would pin that, so a future decoder change cannot make them lowerable.Proposed fixture (extends
cpu_aot_mxcsrwith VEX exports, or a sibling test)LDMXCSRthenVSTMXCSR, and the reverse.vvvv≠ 1111 forms are refused, with the native #UD recorded in a child process as a reference.noloadandfixedas in #1009, applied to the VEX statements. Both must fail./O2and both presets.Question: should the VEX forms share the legacy
host_mxcsropt-in, or need an explicit flag of their own? I'd share it, since the architectural effect is the same.Test host: Intel Skylake (i7-6820HQ, AVX and OSXSAVE present) on Windows 11 26100.
AI-assisted (Claude Code).
@R0Y00 on GitHub · 2026-11-24 01:14 UTC · original
The VEX forms can share the existing
host_mxcsropt-in, with the same word validation, fault behavior and caller-state restoration. Please keep the default-profile refusal and the malformed VEX controls. Keep the translated fixed-reference tests runnable without AVX, and make the native AVX comparison a separate capability skip so its return 77 cannot hide a translated-path failure. The mixed legacy/VEX controls are in scope.@tedin7 on GitHub · 2026-11-24 01:30 UTC · original
Claiming the host_mxcsr VEX slice: lowering M.VLDMXCSR/M.VSTMXCSR (VEX.128, L=0, vvvv=1111) under host_mxcsr, with default-profile refusal, malformed-VEX and mixed legacy/VEX controls, a translated fixed-reference run, and a capability-skipped native AVX comparison. Environment: Linux with LLVM 19 locally; I rely on the Ubuntu LLVM 15 job and the Windows WARP jobs for the rest. AI-assisted. CI: Windows MSVC/ML64.
@tedin7 on GitHub · 2026-11-24 02:08 UTC · original
#1130 was already open (as a draft) before #1134 and is now green on all four CI jobs, including both Windows builds, so I have moved it to ready. It lowers VLDMXCSR/VSTMXCSR (VEX.128, L=0, vvvv=1111) under the existing host_mxcsr opt-in, refuses them in the default profile, refuses malformed VEX, and has a translated fixed-reference run plus a capability-skipped native AVX comparison.
If #1134 has controls that #1130 lacks, I would be glad to fold them into #1130, or to review the differences together so that only one of the two lands.
AI-assisted.
@R0Y00 on GitHub · 2026-11-24 02:17 UTC · original
Implemented in #1134. The Windows fixture compares VEX MXCSR load/store with native execution and separately checks the fixed expected values, malformed encodings, and caller MXCSR restoration.