cpu: lower VLDMXCSR and VSTMXCSR in the host-MXCSR profile #1130
No reviewers
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!1130
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1130/head"
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?
@tedin7 on GitHub · 2026-11-24 01:35 UTC · original
tedin7:x2w-cpu-host-mxcsr-vex→main· +403 −62 · 6 files · 1 commits · closed without mergingChange
Lowers the VEX.128 MXCSR forms
VLDMXCSRandVSTMXCSR(L=0, vvvv=1111, 32-bit memory operand) under the opt-in host-MXCSR profile, with the same checks and refusal statuses asLDMXCSRandSTMXCSR. The default profile still refuses them. Malformed VEX encodings (L=1, vvvv other than 1111) do not decode as either instruction and are refused. Refs #1093.AI-assisted. The change is one shared-lowerer branch plus the fixture, test, docs and CMake wiring.
Verification
Run on Linux (llvm-ml-19 and lld-link-19 build the fixture DLL, the repo venv runs the Python):
regionandlower; the same bytes with the payload byte set to 0xF8 lower.tools/ffx_version_query.pyfrom origin/main the new check fails withunsupported query operation ... vldmxcsr dword ptr [rcx]; with this change it passes.python3 -B tests/docs_links_check.py: passed.Not run here (needs Windows MSVC and ML64):
ctest --preset dev --no-tests=error -R '^cpu_aot_mxcsr(_vex_native)?$' -V, the translated-readback checks (mxcsr_vex_round, the two mixed exports, leak, refused words, fault), the seven new controls' violations, the /O2 walk and the native AVX comparison. The CI Windows jobs are the first run of these.Evidence and follow-up
tests/cpu/mxcsr.asm); the four malformed encodings are written as bytes and are never executed.mxcsr_round, so that check needs no AVX.cpu_aot_mxcsr_vex_nativecompares the native VEX exports and skips with 77 without AVX.vexnoload,vexfixed,vexunmasked,mixvldload,mixvstread,mixvstentry,mixvldrestore; each must break a rule in its own export.docs/experiments.mdhost-MXCSR paragraph updated. Not covered: VEX.256.Checklist
@chatgpt-codex-connector[bot] on GitHub · 2026-11-24 02:08 UTC · original · edited 2026-11-24 02:15 UTC
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
6510597ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
@R0Y00 on GitHub · 2026-11-24 02:17 UTC · original
Thanks for building this in parallel. The shared VLDMXCSR/VSTMXCSR lowering is implemented in #1134, which also landed separate native and fixed-reference tests. If you see a distinct case in this branch that still adds coverage, it can be reviewed as a test-only diff against current main.
@tedin7 on GitHub · 2026-11-24 03:27 UTC · original
Thank you for #1134. The shared lowering and its tests cover the same behavior as this branch, so I am closing this PR (AI-assisted).
The cases this branch had that #1134 does not pin are now a test-only change in #1181, as you suggested: the lowering itself refusing malformed VEX loads and stores (store forms included), an unmasked-exception control, and one control per MXCSR instruction of the mixed exports. Nothing in
tools/changes there.Pull request closed