diff options
| author | Corey Farwell <coreyf@rwell.org> | 2017-02-05 09:14:37 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-05 09:14:37 -0500 |
| commit | c4c6c49e526d39d8cdc8eb8072d2e45b4086dc82 (patch) | |
| tree | b5b0db8b056bad6acd8db6803daee1b205d2df94 /src/test | |
| parent | 6a4c906f7ab30300b1792cb7a24a1e326fd01aec (diff) | |
| parent | 9903975003276cc42a1ed5f21eee292b7c62c331 (diff) | |
| download | rust-c4c6c49e526d39d8cdc8eb8072d2e45b4086dc82.tar.gz rust-c4c6c49e526d39d8cdc8eb8072d2e45b4086dc82.zip | |
Rollup merge of #38959 - Amanieu:atomic128, r=alexcrichton
Add 128-bit atomics This is currently only supported on AArch64 since that is the only target which unconditionally supports 128-bit atomic operations. cc #35118
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-make/atomic-lock-free/atomic_lock_free.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/test/run-make/atomic-lock-free/atomic_lock_free.rs b/src/test/run-make/atomic-lock-free/atomic_lock_free.rs index 023f2218b87..5ac50e04b8d 100644 --- a/src/test/run-make/atomic-lock-free/atomic_lock_free.rs +++ b/src/test/run-make/atomic-lock-free/atomic_lock_free.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(cfg_target_has_atomic, no_core, intrinsics, lang_items)] +#![feature(cfg_target_has_atomic, no_core, intrinsics, lang_items, i128_type)] #![crate_type="rlib"] #![no_core] @@ -54,6 +54,14 @@ pub unsafe fn atomic_u64(x: *mut u64) { pub unsafe fn atomic_i64(x: *mut i64) { atomic_xadd(x, 1); } +#[cfg(target_has_atomic = "128")] +pub unsafe fn atomic_u128(x: *mut u128) { + atomic_xadd(x, 1); +} +#[cfg(target_has_atomic = "128")] +pub unsafe fn atomic_i128(x: *mut i128) { + atomic_xadd(x, 1); +} #[cfg(target_has_atomic = "ptr")] pub unsafe fn atomic_usize(x: *mut usize) { atomic_xadd(x, 1); |
