mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
84ac80f192
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
18 lines
462 B
Rust
18 lines
462 B
Rust
//@ assembly-output: emit-asm
|
|
//@ compile-flags: -O
|
|
//@ compile-flags: --target aarch64-unknown-linux-gnu
|
|
//@ needs-llvm-components: aarch64
|
|
//@ only-aarch64
|
|
//@ only-linux
|
|
|
|
#![crate_type = "rlib"]
|
|
|
|
use std::sync::atomic::AtomicI32;
|
|
use std::sync::atomic::Ordering::*;
|
|
|
|
pub fn compare_exchange(a: &AtomicI32) {
|
|
// On AArch64 LLVM should outline atomic operations.
|
|
// CHECK: __aarch64_cas4_relax
|
|
let _ = a.compare_exchange(0, 10, Relaxed, Relaxed);
|
|
}
|