Skip to content

Deprecate MXCSR intrinsics #781

Open
@gnzlbg

Description

@gnzlbg

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions