]> git.lizzy.rs Git - rust.git/blob - src/test/assembly/asm/aarch64-outline-atomics.rs
Added docs to internal_macro const
[rust.git] / src / test / assembly / asm / aarch64-outline-atomics.rs
1 // min-llvm-version: 12.0
2 // assembly-output: emit-asm
3 // compile-flags: -O
4 // compile-flags: --target aarch64-unknown-linux-gnu
5 // needs-llvm-components: aarch64
6 // only-aarch64
7 // only-linux
8
9 #![crate_type = "rlib"]
10
11 use std::sync::atomic::{AtomicI32, Ordering::*};
12
13 pub fn compare_exchange(a: &AtomicI32) {
14     // On AArch64 LLVM should outline atomic operations.
15     // CHECK: __aarch64_cas4_relax
16     let _ = a.compare_exchange(0, 10, Relaxed, Relaxed);
17 }