diff options
Diffstat (limited to 'src/test/incremental/hashes/inline_asm.rs')
| -rw-r--r-- | src/test/incremental/hashes/inline_asm.rs | 158 |
1 files changed, 79 insertions, 79 deletions
diff --git a/src/test/incremental/hashes/inline_asm.rs b/src/test/incremental/hashes/inline_asm.rs index c50ee73d714..3eaffc44061 100644 --- a/src/test/incremental/hashes/inline_asm.rs +++ b/src/test/incremental/hashes/inline_asm.rs @@ -11,7 +11,7 @@ #![allow(warnings)] #![feature(rustc_attrs)] -#![feature(asm)] +#![feature(llvm_asm)] #![crate_type="rlib"] @@ -22,29 +22,29 @@ pub fn change_template(a: i32) -> i32 { let c: i32; unsafe { - asm!("add 1, $0" - : "=r"(c) - : "0"(a) - : - : - ); + llvm_asm!("add 1, $0" + : "=r"(c) + : "0"(a) + : + : + ); } c } #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")] +#[rustc_clean(cfg="cfail2", except="hir_owner_nodes, mir_built, optimized_mir")] #[rustc_clean(cfg="cfail3")] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] pub fn change_template(a: i32) -> i32 { let c: i32; unsafe { - asm!("add 2, $0" - : "=r"(c) - : "0"(a) - : - : - ); + llvm_asm!("add 2, $0" + : "=r"(c) + : "0"(a) + : + : + ); } c } @@ -58,30 +58,30 @@ pub fn change_output(a: i32) -> i32 { let mut _out1: i32 = 0; let mut _out2: i32 = 0; unsafe { - asm!("add 1, $0" - : "=r"(_out1) - : "0"(a) - : - : - ); + llvm_asm!("add 1, $0" + : "=r"(_out1) + : "0"(a) + : + : + ); } _out1 } #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")] +#[rustc_clean(cfg="cfail2", except="hir_owner_nodes, mir_built, optimized_mir")] #[rustc_clean(cfg="cfail3")] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] pub fn change_output(a: i32) -> i32 { let mut _out1: i32 = 0; let mut _out2: i32 = 0; unsafe { - asm!("add 1, $0" - : "=r"(_out2) - : "0"(a) - : - : - ); + llvm_asm!("add 1, $0" + : "=r"(_out2) + : "0"(a) + : + : + ); } _out1 } @@ -94,29 +94,29 @@ pub fn change_output(a: i32) -> i32 { pub fn change_input(_a: i32, _b: i32) -> i32 { let _out; unsafe { - asm!("add 1, $0" - : "=r"(_out) - : "0"(_a) - : - : - ); + llvm_asm!("add 1, $0" + : "=r"(_out) + : "0"(_a) + : + : + ); } _out } #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")] +#[rustc_clean(cfg="cfail2", except="hir_owner_nodes, mir_built, optimized_mir")] #[rustc_clean(cfg="cfail3")] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] pub fn change_input(_a: i32, _b: i32) -> i32 { let _out; unsafe { - asm!("add 1, $0" - : "=r"(_out) - : "0"(_b) - : - : - ); + llvm_asm!("add 1, $0" + : "=r"(_out) + : "0"(_b) + : + : + ); } _out } @@ -129,29 +129,29 @@ pub fn change_input(_a: i32, _b: i32) -> i32 { pub fn change_input_constraint(_a: i32, _b: i32) -> i32 { let _out; unsafe { - asm!("add 1, $0" - : "=r"(_out) - : "0"(_a), "r"(_b) - : - : - ); + llvm_asm!("add 1, $0" + : "=r"(_out) + : "0"(_a), "r"(_b) + : + : + ); } _out } #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")] +#[rustc_clean(cfg="cfail2", except="hir_owner_nodes, mir_built, optimized_mir")] #[rustc_clean(cfg="cfail3")] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] pub fn change_input_constraint(_a: i32, _b: i32) -> i32 { let _out; unsafe { - asm!("add 1, $0" - : "=r"(_out) - : "r"(_a), "0"(_b) - : - : - ); + llvm_asm!("add 1, $0" + : "=r"(_out) + : "r"(_a), "0"(_b) + : + : + ); } _out } @@ -164,29 +164,29 @@ pub fn change_input_constraint(_a: i32, _b: i32) -> i32 { pub fn change_clobber(_a: i32) -> i32 { let _out; unsafe { - asm!("add 1, $0" - : "=r"(_out) - : "0"(_a) - : - : - ); + llvm_asm!("add 1, $0" + : "=r"(_out) + : "0"(_a) + : + : + ); } _out } #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")] +#[rustc_clean(cfg="cfail2", except="hir_owner_nodes, mir_built, optimized_mir")] #[rustc_clean(cfg="cfail3")] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] pub fn change_clobber(_a: i32) -> i32 { let _out; unsafe { - asm!("add 1, $0" - : "=r"(_out) - : "0"(_a) - : "eax" - : - ); + llvm_asm!("add 1, $0" + : "=r"(_out) + : "0"(_a) + : "eax" + : + ); } _out } @@ -199,29 +199,29 @@ pub fn change_clobber(_a: i32) -> i32 { pub fn change_options(_a: i32) -> i32 { let _out; unsafe { - asm!("add 1, $0" - : "=r"(_out) - : "0"(_a) - : - : - ); + llvm_asm!("add 1, $0" + : "=r"(_out) + : "0"(_a) + : + : + ); } _out } #[cfg(not(cfail1))] -#[rustc_clean(cfg="cfail2", except="HirBody, mir_built, optimized_mir")] +#[rustc_clean(cfg="cfail2", except="hir_owner_nodes, mir_built, optimized_mir")] #[rustc_clean(cfg="cfail3")] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] pub fn change_options(_a: i32) -> i32 { let _out; unsafe { - asm!("add 1, $0" - : "=r"(_out) - : "0"(_a) - : - : "volatile" - ); + llvm_asm!("add 1, $0" + : "=r"(_out) + : "0"(_a) + : + : "volatile" + ); } _out } |
