Deprecate MXCSR intrinsics
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 694
- Forks
- 336
- Avg merge
- 5d 14h
- Merged PRs (30d)
- 9
Description
Modifying MXCSR is insta-UB in LLVM, and inspecting it is kind of pointless since LLVM can change it behind your back however it wants (e.g. depending on the opt-level).
We should deprecate these and tell people not to use them, since they won't do what they want them to do.
Users that want to mess with MXCSR, should do so in such a way that doesn't trigger UB in LLVM. For example, by opening a single inline asm! block, where they save the register, modify it, execute some code, and then restore it, before leaving the inline assembly block.
cc @rkruppe - thanks for suggesting this.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the MXCSR intrinsics in the stdarch repository and review how their deprecation is represented for Rust users. Confirm which intrinsics are covered by the issue, then ensure they are marked deprecated with guidance against using them; the work is done when the affected APIs consistently communicate this limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, operating-systems
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100