diff --git a/.travis.yml b/.travis.yml index 200384da..7cbf56a2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -82,3 +82,10 @@ matrix: notifications: email: false + +branches: + # Don't build these branches + except: + # Used by bors + - trying.tmp + - staging.tmp diff --git a/bors.toml b/bors.toml new file mode 100644 index 00000000..ca08e818 --- /dev/null +++ b/bors.toml @@ -0,0 +1,3 @@ +status = [ + "continuous-integration/travis-ci/push", +] diff --git a/src/elision.rs b/src/elision.rs index 74ff5ffc..68cfa63c 100644 --- a/src/elision.rs +++ b/src/elision.rs @@ -57,11 +57,11 @@ impl AtomicElisionExt for AtomicUsize { fn elision_compare_exchange_acquire(&self, current: usize, new: usize) -> Result { unsafe { let prev: usize; - asm!("xacquire; lock; cmpxchgl $2, $1" - : "={eax}" (prev), "+*m" (self) - : "r" (new), "{eax}" (current) - : "memory" - : "volatile"); + llvm_asm!("xacquire; lock; cmpxchgl $2, $1" + : "={eax}" (prev), "+*m" (self) + : "r" (new), "{eax}" (current) + : "memory" + : "volatile"); if prev == current { Ok(prev) } else { @@ -74,11 +74,11 @@ impl AtomicElisionExt for AtomicUsize { fn elision_compare_exchange_acquire(&self, current: usize, new: usize) -> Result { unsafe { let prev: usize; - asm!("xacquire; lock; cmpxchgq $2, $1" - : "={rax}" (prev), "+*m" (self) - : "r" (new), "{rax}" (current) - : "memory" - : "volatile"); + llvm_asm!("xacquire; lock; cmpxchgq $2, $1" + : "={rax}" (prev), "+*m" (self) + : "r" (new), "{rax}" (current) + : "memory" + : "volatile"); if prev == current { Ok(prev) } else { @@ -92,11 +92,11 @@ impl AtomicElisionExt for AtomicUsize { fn elision_fetch_sub_release(&self, val: usize) -> usize { unsafe { let prev: usize; - asm!("xrelease; lock; xaddl $2, $1" - : "=r" (prev), "+*m" (self) - : "0" (val.wrapping_neg()) - : "memory" - : "volatile"); + llvm_asm!("xrelease; lock; xaddl $2, $1" + : "=r" (prev), "+*m" (self) + : "0" (val.wrapping_neg()) + : "memory" + : "volatile"); prev } } @@ -105,11 +105,11 @@ impl AtomicElisionExt for AtomicUsize { fn elision_fetch_sub_release(&self, val: usize) -> usize { unsafe { let prev: usize; - asm!("xrelease; lock; xaddq $2, $1" - : "=r" (prev), "+*m" (self) - : "0" (val.wrapping_neg()) - : "memory" - : "volatile"); + llvm_asm!("xrelease; lock; xaddq $2, $1" + : "=r" (prev), "+*m" (self) + : "0" (val.wrapping_neg()) + : "memory" + : "volatile"); prev } } diff --git a/src/lib.rs b/src/lib.rs index 03b515d6..73246c2e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,7 +11,7 @@ #![warn(missing_docs)] #![warn(rust_2018_idioms)] -#![cfg_attr(feature = "nightly", feature(asm))] +#![cfg_attr(feature = "nightly", feature(llvm_asm))] mod condvar; mod elision;