diff options
| author | Joshua Yanovski <pythonesque@gmail.com> | 2014-12-14 01:44:24 -0800 |
|---|---|---|
| committer | Joshua Yanovski <pythonesque@gmail.com> | 2014-12-14 01:44:24 -0800 |
| commit | ccd88c523597e2e33a32e92175659d8f5e9a475b (patch) | |
| tree | 781acf0c7d428a32ce2a3327f9e291524dd31299 | |
| parent | 567b90ff095076054c98fa2f08d6c552ae60968d (diff) | |
| download | rust-ccd88c523597e2e33a32e92175659d8f5e9a475b.tar.gz rust-ccd88c523597e2e33a32e92175659d8f5e9a475b.zip | |
Add LLVM's unordered intrinsic to Rust.
| -rw-r--r-- | src/libcore/intrinsics.rs | 2 | ||||
| -rw-r--r-- | src/librustc_trans/trans/intrinsic.rs | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs index 2fc4d23e7fd..11ea1a45059 100644 --- a/src/libcore/intrinsics.rs +++ b/src/libcore/intrinsics.rs @@ -77,10 +77,12 @@ extern "rust-intrinsic" { pub fn atomic_load<T>(src: *const T) -> T; pub fn atomic_load_acq<T>(src: *const T) -> T; pub fn atomic_load_relaxed<T>(src: *const T) -> T; + pub fn atomic_load_unordered<T>(src: *const T) -> T; pub fn atomic_store<T>(dst: *mut T, val: T); pub fn atomic_store_rel<T>(dst: *mut T, val: T); pub fn atomic_store_relaxed<T>(dst: *mut T, val: T); + pub fn atomic_store_unordered<T>(dst: *mut T, val: T); pub fn atomic_xchg<T>(dst: *mut T, src: T) -> T; pub fn atomic_xchg_acq<T>(dst: *mut T, src: T) -> T; diff --git a/src/librustc_trans/trans/intrinsic.rs b/src/librustc_trans/trans/intrinsic.rs index 890652401d7..d02eb3bc5c7 100644 --- a/src/librustc_trans/trans/intrinsic.rs +++ b/src/librustc_trans/trans/intrinsic.rs @@ -518,6 +518,7 @@ pub fn trans_intrinsic_call<'a, 'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>, llvm::SequentiallyConsistent } else { match split[2] { + "unordered" => llvm::Unordered, "relaxed" => llvm::Monotonic, "acq" => llvm::Acquire, "rel" => llvm::Release, |
