]>
git.proxmox.com Git - rustc.git/blob - src/test/assembly/asm/aarch64-outline-atomics.rs
1 // assembly-output: emit-asm
3 // compile-flags: --target aarch64-unknown-linux-gnu
4 // needs-llvm-components: aarch64
8 #![crate_type = "rlib"]
10 use std
::sync
::atomic
::{AtomicI32, Ordering::*}
;
12 pub fn compare_exchange(a
: &AtomicI32
) {
13 // On AArch64 LLVM should outline atomic operations.
14 // CHECK: __aarch64_cas4_relax
15 let _
= a
.compare_exchange(0, 10, Relaxed
, Relaxed
);