Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a x86_64::cmpxchg16b intrinsic #624

Merged
merged 1 commit into from
Jan 2, 2019

Commits on Jan 2, 2019

  1. Add a x86_64::cmpxchg16b intrinsic

    This intrinsic isn't actually specified by Intel, but it's something
    gated with CPUID and can otherwise be a useful thing to have when
    building primitives!
    
    There exists an `AtomicU128` type in the standard library but it's only
    exposed currently (and it's unstable) when a platform fully supports
    128-bit atomics. The x86_64 architecture does not support it *unless*
    the `cmpxchg16b` instruction is available, and it isn't always available!
    
    This commit is also a proposal for how we can include support for
    128-bit atomics in the standard library on relevant platforms. I'm
    thinking that we'll expose this one low-level intrinsic in
    `std::arch::x86_64`, and then if desired a crate on crates.io can build
    `AtomicU128` from this API.
    
    In any case this is all unstable regardless!
    alexcrichton committed Jan 2, 2019
    Configuration menu
    Copy the full SHA
    98c489f View commit details
    Browse the repository at this point in the history