]> git.proxmox.com Git - rustc.git/blob - src/test/assembly/asm/aarch64-outline-atomics.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / assembly / asm / aarch64-outline-atomics.rs
1 // assembly-output: emit-asm
2 // compile-flags: -O
3 // compile-flags: --target aarch64-unknown-linux-gnu
4 // needs-llvm-components: aarch64
5 // only-aarch64
6 // only-linux
7
8 #![crate_type = "rlib"]
9
10 use std::sync::atomic::{AtomicI32, Ordering::*};
11
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);
16 }