Skip to content

Deprecate core::arch::{x86,x86_64}::__{read,write}eflags  #51810

Closed
@gnzlbg

Description

@gnzlbg

Compiler-generated code can use the eflags register in between __{read,write}eflags calls, making these two intrinsics impossible to use correctly for the cases in which the user reads-modifies-writes to the eflags registers.

Even read only operations like performing an alu operation in Rust, and then checking sf or zf by calling these intrinsics are not guaranteed to work either.

The only reliable way to perform these operations is using a single assembly block (e.g. via inline assembly).

This is further discussed in rust-lang/stdarch#485

This issue proposes to deprecate these intrinsics and mark them with #[doc(hidden)], so that we can potentially remove them, maybe in the Rust 2018 edition.

EDIT: There is a PR implementing the deprecation here that would need review before being merged: rust-lang/stdarch#494

cc @BurntSushi

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions