]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/asm-in-out-operand.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / asm-in-out-operand.rs
index 0b5502aa33079b4a248aa38dba5b76bbd52cfa95..ce0fcad40eea3a132afb37e1ff8c7b35effa2a93 100644 (file)
@@ -8,11 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-fast #[feature] doesn't work with check-fast
 #![feature(asm)]
 
-#[cfg(target_arch = "x86")]
-#[cfg(target_arch = "x86_64")]
+#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
 unsafe fn next_power_of_2(n: u32) -> u32 {
     let mut tmp = n;
     asm!("dec $0" : "+rm"(tmp) :: "cc");
@@ -29,8 +27,7 @@ unsafe fn next_power_of_2(n: u32) -> u32 {
     return tmp;
 }
 
-#[cfg(target_arch = "x86")]
-#[cfg(target_arch = "x86_64")]
+#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
 pub fn main() {
     unsafe {
         assert_eq!(64, next_power_of_2(37));
@@ -63,5 +60,5 @@ pub fn main() {
     assert_eq!(x, 60);
 }
 
-#[cfg(not(target_arch = "x86"), not(target_arch = "x86_64"))]
+#[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))]
 pub fn main() {}