about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAmanieu d'Antras <amanieu@gmail.com>2020-02-14 16:54:40 +0000
committerAmanieu d'Antras <amanieu@gmail.com>2020-03-26 15:49:22 +0000
commit1cc521ef9d8a8a2eb48f0e11ddfc1e70734aff10 (patch)
tree18eb30e68fcad637f35fe20bf83326b054171a94
parentd162d096ddf7972819e5b700890726a2ea85f272 (diff)
downloadrust-1cc521ef9d8a8a2eb48f0e11ddfc1e70734aff10.tar.gz
rust-1cc521ef9d8a8a2eb48f0e11ddfc1e70734aff10.zip
Update tests to use llvm_asm!
-rw-r--r--src/librustc_error_codes/error_codes/E0668.md2
-rw-r--r--src/test/codegen/no-output-asm-is-volatile.rs4
-rw-r--r--src/test/compile-fail/asm-src-loc-codegen-units.rs4
-rw-r--r--src/test/compile-fail/asm-src-loc.rs4
-rw-r--r--src/test/incremental/hashes/inline_asm.rs146
-rw-r--r--src/test/mir-opt/unreachable_asm.rs8
-rw-r--r--src/test/mir-opt/unreachable_asm_2.rs14
-rw-r--r--src/test/pretty/asm-clobbers.rs4
-rw-r--r--src/test/pretty/asm-options.rs8
-rw-r--r--src/test/pretty/raw-str-nonexpr.rs4
-rw-r--r--src/test/run-make-fulldeps/intrinsic-unreachable/exit-ret.rs4
-rw-r--r--src/test/run-make-fulldeps/intrinsic-unreachable/exit-unreachable.rs4
-rw-r--r--src/test/ui/abi/abi-sysv64-register-usage.rs58
-rw-r--r--src/test/ui/asm-concat-src.rs4
-rw-r--r--src/test/ui/asm-in-moved.rs4
-rw-r--r--src/test/ui/asm-in-out-operand.rs12
-rw-r--r--src/test/ui/asm-indirect-memory.rs8
-rw-r--r--src/test/ui/asm-out-assign.rs6
-rw-r--r--src/test/ui/asm/asm-bad-clobber.rs4
-rw-r--r--src/test/ui/asm/asm-bad-clobber.stderr6
-rw-r--r--src/test/ui/asm/asm-in-bad-modifier.rs6
-rw-r--r--src/test/ui/asm/asm-in-bad-modifier.stderr12
-rw-r--r--src/test/ui/asm/asm-literal-escaping.rs4
-rw-r--r--src/test/ui/asm/asm-misplaced-option.rs6
-rw-r--r--src/test/ui/asm/asm-misplaced-option.stderr12
-rw-r--r--src/test/ui/asm/asm-out-assign-imm.rs4
-rw-r--r--src/test/ui/asm/asm-out-assign-imm.stderr6
-rw-r--r--src/test/ui/asm/asm-out-no-modifier.rs4
-rw-r--r--src/test/ui/asm/asm-out-no-modifier.stderr6
-rw-r--r--src/test/ui/asm/asm-out-read-uninit.rs4
-rw-r--r--src/test/ui/asm/asm-out-read-uninit.stderr6
-rw-r--r--src/test/ui/asm/asm-parse-errors.rs24
-rw-r--r--src/test/ui/asm/asm-parse-errors.stderr64
-rw-r--r--src/test/ui/asm/issue-51431.rs6
-rw-r--r--src/test/ui/asm/issue-51431.stderr6
-rw-r--r--src/test/ui/asm/issue-62046.rs4
-rw-r--r--src/test/ui/asm/issue-62046.stderr4
-rw-r--r--src/test/ui/asm/issue-69092.rs4
-rw-r--r--src/test/ui/asm/issue-69092.stderr4
-rw-r--r--src/test/ui/ast-json/ast-json-ice.rs4
-rw-r--r--src/test/ui/borrowck/borrowck-asm.rs18
-rw-r--r--src/test/ui/borrowck/borrowck-asm.stderr44
-rw-r--r--src/test/ui/error-codes/E0660.rs6
-rw-r--r--src/test/ui/error-codes/E0660.stderr8
-rw-r--r--src/test/ui/error-codes/E0661.rs4
-rw-r--r--src/test/ui/error-codes/E0661.stderr6
-rw-r--r--src/test/ui/error-codes/E0662.rs10
-rw-r--r--src/test/ui/error-codes/E0662.stderr6
-rw-r--r--src/test/ui/error-codes/E0663.rs10
-rw-r--r--src/test/ui/error-codes/E0663.stderr6
-rw-r--r--src/test/ui/error-codes/E0664.rs12
-rw-r--r--src/test/ui/error-codes/E0664.stderr6
-rw-r--r--src/test/ui/feature-gates/feature-gate-asm.rs1
-rw-r--r--src/test/ui/feature-gates/feature-gate-asm.stderr11
-rw-r--r--src/test/ui/feature-gates/feature-gate-asm2.rs1
-rw-r--r--src/test/ui/feature-gates/feature-gate-asm2.stderr11
-rw-r--r--src/test/ui/inline-asm-bad-constraint.rs8
-rw-r--r--src/test/ui/inline-asm-bad-constraint.stderr12
-rw-r--r--src/test/ui/inline-asm-bad-operand.rs18
-rw-r--r--src/test/ui/inline-asm-bad-operand.stderr38
-rw-r--r--src/test/ui/issues/issue-14936.rs10
-rw-r--r--src/test/ui/issues/issue-23458.rs6
-rw-r--r--src/test/ui/issues/issue-23458.stderr8
-rw-r--r--src/test/ui/issues/issue-33264.rs22
-rw-r--r--src/test/ui/issues/issue-37366.rs4
-rw-r--r--src/test/ui/issues/issue-37433.rs6
-rw-r--r--src/test/ui/issues/issue-37433.stderr6
-rw-r--r--src/test/ui/issues/issue-53787-inline-assembler-macro.rs4
-rw-r--r--src/test/ui/issues/issue-9129.rs2
-rw-r--r--src/test/ui/macros/macro-expanded-include/foo/mod.rs2
-rw-r--r--src/test/ui/macros/macro-expanded-include/test.rs4
-rw-r--r--src/test/ui/macros/macros-nonfatal-errors.rs4
-rw-r--r--src/test/ui/macros/macros-nonfatal-errors.stderr6
-rw-r--r--src/test/ui/out-of-stack.rs4
74 files changed, 421 insertions, 401 deletions
diff --git a/src/librustc_error_codes/error_codes/E0668.md b/src/librustc_error_codes/error_codes/E0668.md
index 5d7c4cda05b..3b43a1bcae9 100644
--- a/src/librustc_error_codes/error_codes/E0668.md
+++ b/src/librustc_error_codes/error_codes/E0668.md
@@ -7,7 +7,7 @@ assembly call.
 In particular, it can happen if you forgot the closing bracket of a register
 constraint (see issue #51430):
 ```compile_fail,E0668
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 fn main() {
     let rax: u64;
diff --git a/src/test/codegen/no-output-asm-is-volatile.rs b/src/test/codegen/no-output-asm-is-volatile.rs
index 47b38d29417..40376218908 100644
--- a/src/test/codegen/no-output-asm-is-volatile.rs
+++ b/src/test/codegen/no-output-asm-is-volatile.rs
@@ -1,6 +1,6 @@
 // compile-flags: -O
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 #![crate_type = "lib"]
 
 // Check that inline assembly expressions without any outputs
@@ -9,6 +9,6 @@
 // CHECK-LABEL: @assembly
 #[no_mangle]
 pub fn assembly() {
-    unsafe { asm!("") }
+    unsafe { llvm_asm!("") }
 // CHECK: tail call void asm sideeffect "", {{.*}}
 }
diff --git a/src/test/compile-fail/asm-src-loc-codegen-units.rs b/src/test/compile-fail/asm-src-loc-codegen-units.rs
index 798eb32181c..c9415aed930 100644
--- a/src/test/compile-fail/asm-src-loc-codegen-units.rs
+++ b/src/test/compile-fail/asm-src-loc-codegen-units.rs
@@ -3,10 +3,10 @@
 // compile-flags: -C codegen-units=2
 // ignore-emscripten
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 fn main() {
     unsafe {
-        asm!("nowayisthisavalidinstruction"); //~ ERROR instruction
+        llvm_asm!("nowayisthisavalidinstruction"); //~ ERROR instruction
     }
 }
diff --git a/src/test/compile-fail/asm-src-loc.rs b/src/test/compile-fail/asm-src-loc.rs
index 0b60256e7fd..7c87f370d4f 100644
--- a/src/test/compile-fail/asm-src-loc.rs
+++ b/src/test/compile-fail/asm-src-loc.rs
@@ -1,9 +1,9 @@
 // ignore-emscripten
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 fn main() {
     unsafe {
-        asm!("nowayisthisavalidinstruction"); //~ ERROR instruction
+        llvm_asm!("nowayisthisavalidinstruction"); //~ ERROR instruction
     }
 }
diff --git a/src/test/incremental/hashes/inline_asm.rs b/src/test/incremental/hashes/inline_asm.rs
index fb3c6378f74..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,12 +22,12 @@
 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
 }
@@ -39,12 +39,12 @@ pub fn change_template(a: i32) -> i32 {
 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,12 +58,12 @@ 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
 }
@@ -76,12 +76,12 @@ 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,12 +94,12 @@ 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
 }
@@ -111,12 +111,12 @@ pub fn change_input(_a: i32, _b: i32) -> i32 {
 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,12 +129,12 @@ 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
 }
@@ -146,12 +146,12 @@ pub fn change_input_constraint(_a: i32, _b: i32) -> i32 {
 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,12 +164,12 @@ 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
 }
@@ -181,12 +181,12 @@ pub fn change_clobber(_a: i32) -> i32 {
 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,12 +199,12 @@ 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
 }
@@ -216,12 +216,12 @@ pub fn change_options(_a: i32) -> i32 {
 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
 }
diff --git a/src/test/mir-opt/unreachable_asm.rs b/src/test/mir-opt/unreachable_asm.rs
index ca614ac32b7..990141657f4 100644
--- a/src/test/mir-opt/unreachable_asm.rs
+++ b/src/test/mir-opt/unreachable_asm.rs
@@ -1,5 +1,5 @@
 // ignore-tidy-linelength
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 enum Empty {}
 
@@ -18,7 +18,7 @@ fn main() {
         }
 
         // asm instruction stops unreachable propagation to if else blocks bb4 and bb5.
-        unsafe { asm!("NOP"); }
+        unsafe { llvm_asm!("NOP"); }
         match _x { }
     }
 }
@@ -39,7 +39,7 @@ fn main() {
 //          StorageDead(_6);
 //          StorageDead(_5);
 //          StorageLive(_7);
-//          asm!(InlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []);
+//          llvm_asm!(LlvmInlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []);
 //          _7 = ();
 //          StorageDead(_7);
 //          StorageLive(_8);
@@ -62,7 +62,7 @@ fn main() {
 //          StorageDead(_6);
 //          StorageDead(_5);
 //          StorageLive(_7);
-//          asm!(InlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []);
+//          llvm_asm!(LlvmInlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []);
 //          _7 = ();
 //          StorageDead(_7);
 //          StorageLive(_8);
diff --git a/src/test/mir-opt/unreachable_asm_2.rs b/src/test/mir-opt/unreachable_asm_2.rs
index 8fdbcfb5cab..0851e24d410 100644
--- a/src/test/mir-opt/unreachable_asm_2.rs
+++ b/src/test/mir-opt/unreachable_asm_2.rs
@@ -1,5 +1,5 @@
 // ignore-tidy-linelength
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 enum Empty {}
 
@@ -13,11 +13,11 @@ fn main() {
 
         if true {
             // asm instruction stops unreachable propagation to block bb3.
-            unsafe { asm!("NOP"); }
+            unsafe { llvm_asm!("NOP"); }
             _y = 21;
         } else {
             // asm instruction stops unreachable propagation to block bb3.
-            unsafe { asm!("NOP"); }
+            unsafe { llvm_asm!("NOP"); }
             _y = 42;
         }
 
@@ -33,7 +33,7 @@ fn main() {
 //      }
 //      bb4: {
 //          StorageLive(_8);
-//          asm!(InlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []);
+//          llvm_asm!(LlvmInlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []);
 //          _8 = ();
 //          StorageDead(_8);
 //          _4 = const 42i32;
@@ -42,7 +42,7 @@ fn main() {
 //      }
 //          bb5: {
 //          StorageLive(_7);
-//          asm!(InlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []);
+//          llvm_asm!(LlvmInlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []);
 //          _7 = ();
 //          StorageDead(_7);
 //          _4 = const 21i32;
@@ -64,7 +64,7 @@ fn main() {
 //      }
 //      bb4: {
 //          StorageLive(_8);
-//          asm!(InlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []);
+//          llvm_asm!(LlvmInlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []);
 //          _8 = ();
 //          StorageDead(_8);
 //          _4 = const 42i32;
@@ -73,7 +73,7 @@ fn main() {
 //      }
 //          bb5: {
 //          StorageLive(_7);
-//          asm!(InlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []);
+//          llvm_asm!(LlvmInlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []);
 //          _7 = ();
 //          StorageDead(_7);
 //          _4 = const 21i32;
diff --git a/src/test/pretty/asm-clobbers.rs b/src/test/pretty/asm-clobbers.rs
index 1bc9f008bbb..2c09646e47e 100644
--- a/src/test/pretty/asm-clobbers.rs
+++ b/src/test/pretty/asm-clobbers.rs
@@ -1,3 +1,3 @@
-#![feature(asm)]
+#![feature(llvm_asm)]
 
-pub fn main() { unsafe { asm!("" : : : "hello", "world") }; }
+pub fn main() { unsafe { llvm_asm!("" : : : "hello", "world") }; }
diff --git a/src/test/pretty/asm-options.rs b/src/test/pretty/asm-options.rs
index 5c2bbd9edd9..86a881bfbd1 100644
--- a/src/test/pretty/asm-options.rs
+++ b/src/test/pretty/asm-options.rs
@@ -1,11 +1,11 @@
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 // pp-exact
 
 pub fn main() {
     unsafe {
-        asm!("" : : : : "volatile");
-        asm!("" : : : : "alignstack");
-        asm!("" : : : : "intel");
+        llvm_asm!("" : : : : "volatile");
+        llvm_asm!("" : : : : "alignstack");
+        llvm_asm!("" : : : : "intel");
     }
 }
diff --git a/src/test/pretty/raw-str-nonexpr.rs b/src/test/pretty/raw-str-nonexpr.rs
index cb23124f210..41227898f24 100644
--- a/src/test/pretty/raw-str-nonexpr.rs
+++ b/src/test/pretty/raw-str-nonexpr.rs
@@ -1,8 +1,8 @@
 // pp-exact
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 #[cfg(foo = r#"just parse this"#)]
 extern crate blah as blah;
 
-fn main() { unsafe { asm!(r###"blah"###); } }
+fn main() { unsafe { llvm_asm!(r###"blah"###); } }
diff --git a/src/test/run-make-fulldeps/intrinsic-unreachable/exit-ret.rs b/src/test/run-make-fulldeps/intrinsic-unreachable/exit-ret.rs
index 936001c43a4..2e81667cf39 100644
--- a/src/test/run-make-fulldeps/intrinsic-unreachable/exit-ret.rs
+++ b/src/test/run-make-fulldeps/intrinsic-unreachable/exit-ret.rs
@@ -1,11 +1,11 @@
-#![feature(asm)]
+#![feature(llvm_asm)]
 #![crate_type="lib"]
 
 #[deny(unreachable_code)]
 pub fn exit(n: usize) -> i32 {
     unsafe {
         // Pretend this asm is an exit() syscall.
-        asm!("" :: "r"(n) :: "volatile");
+        llvm_asm!("" :: "r"(n) :: "volatile");
         // Can't actually reach this point, but rustc doesn't know that.
     }
     // This return value is just here to generate some extra code for a return
diff --git a/src/test/run-make-fulldeps/intrinsic-unreachable/exit-unreachable.rs b/src/test/run-make-fulldeps/intrinsic-unreachable/exit-unreachable.rs
index 00b09cb9460..fb3848b0db6 100644
--- a/src/test/run-make-fulldeps/intrinsic-unreachable/exit-unreachable.rs
+++ b/src/test/run-make-fulldeps/intrinsic-unreachable/exit-unreachable.rs
@@ -1,4 +1,4 @@
-#![feature(asm, core_intrinsics)]
+#![feature(llvm_asm, core_intrinsics)]
 #![crate_type="lib"]
 
 use std::intrinsics;
@@ -7,7 +7,7 @@ use std::intrinsics;
 pub fn exit(n: usize) -> i32 {
     unsafe {
         // Pretend this asm is an exit() syscall.
-        asm!("" :: "r"(n) :: "volatile");
+        llvm_asm!("" :: "r"(n) :: "volatile");
         intrinsics::unreachable()
     }
     // This return value is just here to generate some extra code for a return
diff --git a/src/test/ui/abi/abi-sysv64-register-usage.rs b/src/test/ui/abi/abi-sysv64-register-usage.rs
index 0c7e2d906b7..fcdff59ffa9 100644
--- a/src/test/ui/abi/abi-sysv64-register-usage.rs
+++ b/src/test/ui/abi/abi-sysv64-register-usage.rs
@@ -6,7 +6,7 @@
 // ignore-arm
 // ignore-aarch64
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 #[cfg(target_arch = "x86_64")]
 pub extern "sysv64" fn all_the_registers(rdi: i64, rsi: i64, rdx: i64,
@@ -54,34 +54,34 @@ pub extern "sysv64" fn large_struct_by_val(mut foo: LargeStruct) -> LargeStruct
 pub fn main() {
     let result: i64;
     unsafe {
-        asm!("mov rdi, 1;
-              mov rsi, 2;
-              mov rdx, 3;
-              mov rcx, 4;
-              mov r8,  5;
-              mov r9,  6;
-              mov eax, 0x3F800000;
-              movd xmm0, eax;
-              mov eax, 0x40000000;
-              movd xmm1, eax;
-              mov eax, 0x40800000;
-              movd xmm2, eax;
-              mov eax, 0x41000000;
-              movd xmm3, eax;
-              mov eax, 0x41800000;
-              movd xmm4, eax;
-              mov eax, 0x42000000;
-              movd xmm5, eax;
-              mov eax, 0x42800000;
-              movd xmm6, eax;
-              mov eax, 0x43000000;
-              movd xmm7, eax;
-              call r10
-              "
-            : "={rax}"(result)
-            : "{r10}"(all_the_registers as usize)
-            : "rdi", "rsi", "rdx", "rcx", "r8", "r9", "r11", "cc", "memory"
-            : "intel", "alignstack"
+        llvm_asm!("mov rdi, 1;
+                   mov rsi, 2;
+                   mov rdx, 3;
+                   mov rcx, 4;
+                   mov r8,  5;
+                   mov r9,  6;
+                   mov eax, 0x3F800000;
+                   movd xmm0, eax;
+                   mov eax, 0x40000000;
+                   movd xmm1, eax;
+                   mov eax, 0x40800000;
+                   movd xmm2, eax;
+                   mov eax, 0x41000000;
+                   movd xmm3, eax;
+                   mov eax, 0x41800000;
+                   movd xmm4, eax;
+                   mov eax, 0x42000000;
+                   movd xmm5, eax;
+                   mov eax, 0x42800000;
+                   movd xmm6, eax;
+                   mov eax, 0x43000000;
+                   movd xmm7, eax;
+                   call r10
+                   "
+                 : "={rax}"(result)
+                 : "{r10}"(all_the_registers as usize)
+                 : "rdi", "rsi", "rdx", "rcx", "r8", "r9", "r11", "cc", "memory"
+                 : "intel", "alignstack"
         )
     }
     assert_eq!(result, 42);
diff --git a/src/test/ui/asm-concat-src.rs b/src/test/ui/asm-concat-src.rs
index c4160bfeca1..1dc1c859c6b 100644
--- a/src/test/ui/asm-concat-src.rs
+++ b/src/test/ui/asm-concat-src.rs
@@ -2,8 +2,8 @@
 // pretty-expanded FIXME #23616
 // ignore-emscripten no asm
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 pub fn main() {
-    unsafe { asm!(concat!("", "")) };
+    unsafe { llvm_asm!(concat!("", "")) };
 }
diff --git a/src/test/ui/asm-in-moved.rs b/src/test/ui/asm-in-moved.rs
index 6525d2f53b0..35f4d92c8ff 100644
--- a/src/test/ui/asm-in-moved.rs
+++ b/src/test/ui/asm-in-moved.rs
@@ -1,6 +1,6 @@
 // run-pass
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 #![allow(dead_code)]
 
 use std::cell::Cell;
@@ -20,7 +20,7 @@ fn main() {
         let _y: Box<NoisyDrop>;
         let x = Box::new(NoisyDrop(&status));
         unsafe {
-            asm!("mov $1, $0" : "=r"(_y) : "r"(x));
+            llvm_asm!("mov $1, $0" : "=r"(_y) : "r"(x));
         }
         assert_eq!(status.get(), "alive");
     }
diff --git a/src/test/ui/asm-in-out-operand.rs b/src/test/ui/asm-in-out-operand.rs
index 13d0363a6a0..acefabd8a66 100644
--- a/src/test/ui/asm-in-out-operand.rs
+++ b/src/test/ui/asm-in-out-operand.rs
@@ -1,21 +1,21 @@
 // run-pass
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 #[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");
+    llvm_asm!("dec $0" : "+rm"(tmp) :: "cc");
     let mut shift = 1_u32;
     while shift <= 16 {
-        asm!(
+        llvm_asm!(
             "shr %cl, $2
             or $2, $0
             shl $$1, $1"
             : "+&rm"(tmp), "+{ecx}"(shift) : "r"(tmp) : "cc"
         );
     }
-    asm!("inc $0" : "+rm"(tmp) :: "cc");
+    llvm_asm!("inc $0" : "+rm"(tmp) :: "cc");
     return tmp;
 }
 
@@ -30,7 +30,7 @@ pub fn main() {
     let x: isize;
     unsafe {
         // Treat the output as initialization.
-        asm!(
+        llvm_asm!(
             "shl $2, $1
             add $3, $1
             mov $1, $0"
@@ -47,7 +47,7 @@ pub fn main() {
         // Assignment to mutable.
         // Early clobber "&":
         // Forbids the use of a single register by both operands.
-        asm!("shr $$2, $1; add $1, $0" : "+&r"(x) : "r"(x) : "cc");
+        llvm_asm!("shr $$2, $1; add $1, $0" : "+&r"(x) : "r"(x) : "cc");
     }
     assert_eq!(x, 60);
 }
diff --git a/src/test/ui/asm-indirect-memory.rs b/src/test/ui/asm-indirect-memory.rs
index 2e8011af502..556ad83a4ea 100644
--- a/src/test/ui/asm-indirect-memory.rs
+++ b/src/test/ui/asm-indirect-memory.rs
@@ -1,12 +1,12 @@
 // run-pass
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
 fn read(ptr: &u32) -> u32 {
     let out: u32;
     unsafe {
-        asm!("mov $1, $0" : "=r" (out) : "*m" (ptr));
+        llvm_asm!("mov $1, $0" : "=r" (out) : "*m" (ptr));
     }
     out
 }
@@ -14,7 +14,7 @@ fn read(ptr: &u32) -> u32 {
 #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
 fn write(ptr: &mut u32, val: u32) {
     unsafe {
-        asm!("mov $1, $0" : "=*m" (ptr) : "r" (val));
+        llvm_asm!("mov $1, $0" : "=*m" (ptr) : "r" (val));
     }
 }
 
@@ -22,7 +22,7 @@ fn write(ptr: &mut u32, val: u32) {
 fn replace(ptr: &mut u32, val: u32) -> u32 {
     let out: u32;
     unsafe {
-        asm!("mov $0, $1; mov $2, $0" : "+*m" (ptr), "=&r" (out) : "r" (val));
+        llvm_asm!("mov $0, $1; mov $2, $0" : "+*m" (ptr), "=&r" (out) : "r" (val));
     }
     out
 }
diff --git a/src/test/ui/asm-out-assign.rs b/src/test/ui/asm-out-assign.rs
index ed63d1b4d49..321f28565ff 100644
--- a/src/test/ui/asm-out-assign.rs
+++ b/src/test/ui/asm-out-assign.rs
@@ -1,13 +1,13 @@
 // run-pass
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
 pub fn main() {
     let x: isize;
     unsafe {
         // Treat the output as initialization.
-        asm!("mov $1, $0" : "=r"(x) : "r"(5_usize));
+        llvm_asm!("mov $1, $0" : "=r"(x) : "r"(5_usize));
     }
     assert_eq!(x, 5);
 
@@ -16,7 +16,7 @@ pub fn main() {
 
     unsafe {
         // Assignment to mutable.
-        asm!("mov $1, $0" : "=r"(x) : "r"(x + 7));
+        llvm_asm!("mov $1, $0" : "=r"(x) : "r"(x + 7));
     }
     assert_eq!(x, 13);
 }
diff --git a/src/test/ui/asm/asm-bad-clobber.rs b/src/test/ui/asm/asm-bad-clobber.rs
index 8406a1cc7a8..9f5662cbd1e 100644
--- a/src/test/ui/asm/asm-bad-clobber.rs
+++ b/src/test/ui/asm/asm-bad-clobber.rs
@@ -11,7 +11,7 @@
 // ignore-mips
 // ignore-mips64
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 #[cfg(any(target_arch = "x86",
           target_arch = "x86_64"))]
@@ -19,7 +19,7 @@
 pub fn main() {
     unsafe {
         // clobber formatted as register input/output
-        asm!("xor %eax, %eax" : : : "{eax}");
+        llvm_asm!("xor %eax, %eax" : : : "{eax}");
         //~^ ERROR clobber should not be surrounded by braces
     }
 }
diff --git a/src/test/ui/asm/asm-bad-clobber.stderr b/src/test/ui/asm/asm-bad-clobber.stderr
index a279421241f..8c5d04694c4 100644
--- a/src/test/ui/asm/asm-bad-clobber.stderr
+++ b/src/test/ui/asm/asm-bad-clobber.stderr
@@ -1,8 +1,8 @@
 error[E0664]: clobber should not be surrounded by braces
-  --> $DIR/asm-bad-clobber.rs:22:37
+  --> $DIR/asm-bad-clobber.rs:22:42
    |
-LL |         asm!("xor %eax, %eax" : : : "{eax}");
-   |                                     ^^^^^^^
+LL |         llvm_asm!("xor %eax, %eax" : : : "{eax}");
+   |                                          ^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/asm/asm-in-bad-modifier.rs b/src/test/ui/asm/asm-in-bad-modifier.rs
index 38cd11e2515..b791ec3e8c8 100644
--- a/src/test/ui/asm/asm-in-bad-modifier.rs
+++ b/src/test/ui/asm/asm-in-bad-modifier.rs
@@ -8,7 +8,7 @@
 // ignore-mips
 // ignore-mips64
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 fn foo(x: isize) { println!("{}", x); }
 
@@ -20,8 +20,8 @@ pub fn main() {
     let x: isize;
     let y: isize;
     unsafe {
-        asm!("mov $1, $0" : "=r"(x) : "=r"(5)); //~ ERROR operand constraint contains '='
-        asm!("mov $1, $0" : "=r"(y) : "+r"(5)); //~ ERROR operand constraint contains '+'
+        llvm_asm!("mov $1, $0" : "=r"(x) : "=r"(5)); //~ ERROR operand constraint contains '='
+        llvm_asm!("mov $1, $0" : "=r"(y) : "+r"(5)); //~ ERROR operand constraint contains '+'
     }
     foo(x);
     foo(y);
diff --git a/src/test/ui/asm/asm-in-bad-modifier.stderr b/src/test/ui/asm/asm-in-bad-modifier.stderr
index d45b3e57038..f1624f74a70 100644
--- a/src/test/ui/asm/asm-in-bad-modifier.stderr
+++ b/src/test/ui/asm/asm-in-bad-modifier.stderr
@@ -1,14 +1,14 @@
 error[E0662]: input operand constraint contains '='
-  --> $DIR/asm-in-bad-modifier.rs:23:39
+  --> $DIR/asm-in-bad-modifier.rs:23:44
    |
-LL |         asm!("mov $1, $0" : "=r"(x) : "=r"(5));
-   |                                       ^^^^
+LL |         llvm_asm!("mov $1, $0" : "=r"(x) : "=r"(5));
+   |                                            ^^^^
 
 error[E0663]: input operand constraint contains '+'
-  --> $DIR/asm-in-bad-modifier.rs:24:39
+  --> $DIR/asm-in-bad-modifier.rs:24:44
    |
-LL |         asm!("mov $1, $0" : "=r"(y) : "+r"(5));
-   |                                       ^^^^
+LL |         llvm_asm!("mov $1, $0" : "=r"(y) : "+r"(5));
+   |                                            ^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/asm/asm-literal-escaping.rs b/src/test/ui/asm/asm-literal-escaping.rs
index 8d464e752e6..5d45f5084c5 100644
--- a/src/test/ui/asm/asm-literal-escaping.rs
+++ b/src/test/ui/asm/asm-literal-escaping.rs
@@ -1,12 +1,12 @@
 // build-pass
 // only-x86_64
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 fn main() {
     unsafe {
         // "nop" :: "r"(x) : "eax" : "volatile"
         let x = 10;
-        asm!("\x6Eop" :: "\x72"(x) : "\x65ax" : "\x76olatile");
+        llvm_asm!("\x6Eop" :: "\x72"(x) : "\x65ax" : "\x76olatile");
     }
 }
diff --git a/src/test/ui/asm/asm-misplaced-option.rs b/src/test/ui/asm/asm-misplaced-option.rs
index 14ff4c2e981..3c44fc90ef3 100644
--- a/src/test/ui/asm/asm-misplaced-option.rs
+++ b/src/test/ui/asm/asm-misplaced-option.rs
@@ -12,7 +12,7 @@
 // ignore-mips
 // ignore-mips64
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 #[cfg(any(target_arch = "x86",
           target_arch = "x86_64"))]
@@ -21,14 +21,14 @@ fn main() {
     let mut x: isize = 0;
     unsafe {
         // extra colon
-        asm!("mov $1, $0" : "=r"(x) : "r"(5_usize), "0"(x) : : "cc");
+        llvm_asm!("mov $1, $0" : "=r"(x) : "r"(5_usize), "0"(x) : : "cc");
         //~^ WARNING unrecognized option
     }
     assert_eq!(x, 5);
 
     unsafe {
         // comma in place of a colon
-        asm!("add $2, $1; mov $1, $0" : "=r"(x) : "r"(x), "r"(8_usize) : "cc", "volatile");
+        llvm_asm!("add $2, $1; mov $1, $0" : "=r"(x) : "r"(x), "r"(8_usize) : "cc", "volatile");
         //~^ WARNING expected a clobber, found an option
     }
     assert_eq!(x, 13);
diff --git a/src/test/ui/asm/asm-misplaced-option.stderr b/src/test/ui/asm/asm-misplaced-option.stderr
index 3d4b28c3dc4..ea9267c643b 100644
--- a/src/test/ui/asm/asm-misplaced-option.stderr
+++ b/src/test/ui/asm/asm-misplaced-option.stderr
@@ -1,12 +1,12 @@
 warning: unrecognized option
-  --> $DIR/asm-misplaced-option.rs:24:64
+  --> $DIR/asm-misplaced-option.rs:24:69
    |
-LL |         asm!("mov $1, $0" : "=r"(x) : "r"(5_usize), "0"(x) : : "cc");
-   |                                                                ^^^^
+LL |         llvm_asm!("mov $1, $0" : "=r"(x) : "r"(5_usize), "0"(x) : : "cc");
+   |                                                                     ^^^^
 
 warning: expected a clobber, found an option
-  --> $DIR/asm-misplaced-option.rs:31:80
+  --> $DIR/asm-misplaced-option.rs:31:85
    |
-LL |         asm!("add $2, $1; mov $1, $0" : "=r"(x) : "r"(x), "r"(8_usize) : "cc", "volatile");
-   |                                                                                ^^^^^^^^^^
+LL |         llvm_asm!("add $2, $1; mov $1, $0" : "=r"(x) : "r"(x), "r"(8_usize) : "cc", "volatile");
+   |                                                                                     ^^^^^^^^^^
 
diff --git a/src/test/ui/asm/asm-out-assign-imm.rs b/src/test/ui/asm/asm-out-assign-imm.rs
index 7a8be2a133e..1a46879f9f2 100644
--- a/src/test/ui/asm/asm-out-assign-imm.rs
+++ b/src/test/ui/asm/asm-out-assign-imm.rs
@@ -8,7 +8,7 @@
 // ignore-mips
 // ignore-mips64
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 fn foo(x: isize) { println!("{}", x); }
 
@@ -21,7 +21,7 @@ pub fn main() {
     x = 1;
     foo(x);
     unsafe {
-        asm!("mov $1, $0" : "=r"(x) : "r"(5));
+        llvm_asm!("mov $1, $0" : "=r"(x) : "r"(5));
         //~^ ERROR cannot assign twice to immutable variable `x`
     }
     foo(x);
diff --git a/src/test/ui/asm/asm-out-assign-imm.stderr b/src/test/ui/asm/asm-out-assign-imm.stderr
index ac38218b849..feec61b4fc6 100644
--- a/src/test/ui/asm/asm-out-assign-imm.stderr
+++ b/src/test/ui/asm/asm-out-assign-imm.stderr
@@ -1,13 +1,13 @@
 error[E0384]: cannot assign twice to immutable variable `x`
-  --> $DIR/asm-out-assign-imm.rs:24:34
+  --> $DIR/asm-out-assign-imm.rs:24:39
    |
 LL |     let x: isize;
    |         - help: make this binding mutable: `mut x`
 LL |     x = 1;
    |     ----- first assignment to `x`
 ...
-LL |         asm!("mov $1, $0" : "=r"(x) : "r"(5));
-   |                                  ^ cannot assign twice to immutable variable
+LL |         llvm_asm!("mov $1, $0" : "=r"(x) : "r"(5));
+   |                                       ^ cannot assign twice to immutable variable
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/asm/asm-out-no-modifier.rs b/src/test/ui/asm/asm-out-no-modifier.rs
index d9142b9f2e0..d198437c508 100644
--- a/src/test/ui/asm/asm-out-no-modifier.rs
+++ b/src/test/ui/asm/asm-out-no-modifier.rs
@@ -8,7 +8,7 @@
 // ignore-mips
 // ignore-mips64
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 fn foo(x: isize) { println!("{}", x); }
 
@@ -19,7 +19,7 @@ fn foo(x: isize) { println!("{}", x); }
 pub fn main() {
     let x: isize;
     unsafe {
-        asm!("mov $1, $0" : "r"(x) : "r"(5)); //~ ERROR output operand constraint lacks '='
+        llvm_asm!("mov $1, $0" : "r"(x) : "r"(5)); //~ ERROR output operand constraint lacks '='
     }
     foo(x);
 }
diff --git a/src/test/ui/asm/asm-out-no-modifier.stderr b/src/test/ui/asm/asm-out-no-modifier.stderr
index 99134ceba33..1c9e108f910 100644
--- a/src/test/ui/asm/asm-out-no-modifier.stderr
+++ b/src/test/ui/asm/asm-out-no-modifier.stderr
@@ -1,8 +1,8 @@
 error[E0661]: output operand constraint lacks '=' or '+'
-  --> $DIR/asm-out-no-modifier.rs:22:29
+  --> $DIR/asm-out-no-modifier.rs:22:34
    |
-LL |         asm!("mov $1, $0" : "r"(x) : "r"(5));
-   |                             ^^^
+LL |         llvm_asm!("mov $1, $0" : "r"(x) : "r"(5));
+   |                                  ^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/asm/asm-out-read-uninit.rs b/src/test/ui/asm/asm-out-read-uninit.rs
index 78458ff60d4..d45498d4bb4 100644
--- a/src/test/ui/asm/asm-out-read-uninit.rs
+++ b/src/test/ui/asm/asm-out-read-uninit.rs
@@ -8,7 +8,7 @@
 // ignore-mips
 // ignore-mips64
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 fn foo(x: isize) { println!("{}", x); }
 
@@ -19,7 +19,7 @@ fn foo(x: isize) { println!("{}", x); }
 pub fn main() {
     let x: isize;
     unsafe {
-        asm!("mov $1, $0" : "=r"(x) : "r"(x));
+        llvm_asm!("mov $1, $0" : "=r"(x) : "r"(x));
         //~^ ERROR use of possibly-uninitialized variable: `x`
     }
     foo(x);
diff --git a/src/test/ui/asm/asm-out-read-uninit.stderr b/src/test/ui/asm/asm-out-read-uninit.stderr
index 71aeda2ad4d..3c3f3a6febb 100644
--- a/src/test/ui/asm/asm-out-read-uninit.stderr
+++ b/src/test/ui/asm/asm-out-read-uninit.stderr
@@ -1,8 +1,8 @@
 error[E0381]: use of possibly-uninitialized variable: `x`
-  --> $DIR/asm-out-read-uninit.rs:22:43
+  --> $DIR/asm-out-read-uninit.rs:22:48
    |
-LL |         asm!("mov $1, $0" : "=r"(x) : "r"(x));
-   |                                           ^ use of possibly-uninitialized `x`
+LL |         llvm_asm!("mov $1, $0" : "=r"(x) : "r"(x));
+   |                                                ^ use of possibly-uninitialized `x`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/asm/asm-parse-errors.rs b/src/test/ui/asm/asm-parse-errors.rs
index e712ac5826e..d458be81529 100644
--- a/src/test/ui/asm/asm-parse-errors.rs
+++ b/src/test/ui/asm/asm-parse-errors.rs
@@ -1,15 +1,15 @@
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 fn main() {
-    asm!(); //~ ERROR requires a string literal as an argument
-    asm!("nop" : struct); //~ ERROR expected string literal
-    asm!("mov %eax, $$0x2" : struct); //~ ERROR expected string literal
-    asm!("mov %eax, $$0x2" : "={eax}" struct); //~ ERROR expected `(`
-    asm!("mov %eax, $$0x2" : "={eax}"(struct)); //~ ERROR expected expression
-    asm!("in %dx, %al" : "={al}"(result) : struct); //~ ERROR expected string literal
-    asm!("in %dx, %al" : "={al}"(result) : "{dx}" struct); //~ ERROR expected `(`
-    asm!("in %dx, %al" : "={al}"(result) : "{dx}"(struct)); //~ ERROR expected expression
-    asm!("mov $$0x200, %eax" : : : struct); //~ ERROR expected string literal
-    asm!("mov eax, 2" : "={eax}"(foo) : : : struct); //~ ERROR expected string literal
-    asm!(123); //~ ERROR inline assembly must be a string literal
+    llvm_asm!(); //~ ERROR requires a string literal as an argument
+    llvm_asm!("nop" : struct); //~ ERROR expected string literal
+    llvm_asm!("mov %eax, $$0x2" : struct); //~ ERROR expected string literal
+    llvm_asm!("mov %eax, $$0x2" : "={eax}" struct); //~ ERROR expected `(`
+    llvm_asm!("mov %eax, $$0x2" : "={eax}"(struct)); //~ ERROR expected expression
+    llvm_asm!("in %dx, %al" : "={al}"(result) : struct); //~ ERROR expected string literal
+    llvm_asm!("in %dx, %al" : "={al}"(result) : "{dx}" struct); //~ ERROR expected `(`
+    llvm_asm!("in %dx, %al" : "={al}"(result) : "{dx}"(struct)); //~ ERROR expected expression
+    llvm_asm!("mov $$0x200, %eax" : : : struct); //~ ERROR expected string literal
+    llvm_asm!("mov eax, 2" : "={eax}"(foo) : : : struct); //~ ERROR expected string literal
+    llvm_asm!(123); //~ ERROR inline assembly must be a string literal
 }
diff --git a/src/test/ui/asm/asm-parse-errors.stderr b/src/test/ui/asm/asm-parse-errors.stderr
index 2b29332fef5..64f295c3b36 100644
--- a/src/test/ui/asm/asm-parse-errors.stderr
+++ b/src/test/ui/asm/asm-parse-errors.stderr
@@ -1,68 +1,68 @@
 error: macro requires a string literal as an argument
   --> $DIR/asm-parse-errors.rs:4:5
    |
-LL |     asm!();
-   |     ^^^^^^^ string literal required
+LL |     llvm_asm!();
+   |     ^^^^^^^^^^^^ string literal required
 
 error: expected string literal
-  --> $DIR/asm-parse-errors.rs:5:18
+  --> $DIR/asm-parse-errors.rs:5:23
    |
-LL |     asm!("nop" : struct);
-   |                  ^^^^^^ not a string literal
+LL |     llvm_asm!("nop" : struct);
+   |                       ^^^^^^ not a string literal
 
 error: expected string literal
-  --> $DIR/asm-parse-errors.rs:6:30
+  --> $DIR/asm-parse-errors.rs:6:35
    |
-LL |     asm!("mov %eax, $$0x2" : struct);
-   |                              ^^^^^^ not a string literal
+LL |     llvm_asm!("mov %eax, $$0x2" : struct);
+   |                                   ^^^^^^ not a string literal
 
 error: expected `(`, found keyword `struct`
-  --> $DIR/asm-parse-errors.rs:7:39
+  --> $DIR/asm-parse-errors.rs:7:44
    |
-LL |     asm!("mov %eax, $$0x2" : "={eax}" struct);
-   |                                       ^^^^^^ expected `(`
+LL |     llvm_asm!("mov %eax, $$0x2" : "={eax}" struct);
+   |                                            ^^^^^^ expected `(`
 
 error: expected expression, found keyword `struct`
-  --> $DIR/asm-parse-errors.rs:8:39
+  --> $DIR/asm-parse-errors.rs:8:44
    |
-LL |     asm!("mov %eax, $$0x2" : "={eax}"(struct));
-   |                                       ^^^^^^ expected expression
+LL |     llvm_asm!("mov %eax, $$0x2" : "={eax}"(struct));
+   |                                            ^^^^^^ expected expression
 
 error: expected string literal
-  --> $DIR/asm-parse-errors.rs:9:44
+  --> $DIR/asm-parse-errors.rs:9:49
    |
-LL |     asm!("in %dx, %al" : "={al}"(result) : struct);
-   |                                            ^^^^^^ not a string literal
+LL |     llvm_asm!("in %dx, %al" : "={al}"(result) : struct);
+   |                                                 ^^^^^^ not a string literal
 
 error: expected `(`, found keyword `struct`
-  --> $DIR/asm-parse-errors.rs:10:51
+  --> $DIR/asm-parse-errors.rs:10:56
    |
-LL |     asm!("in %dx, %al" : "={al}"(result) : "{dx}" struct);
-   |                                                   ^^^^^^ expected `(`
+LL |     llvm_asm!("in %dx, %al" : "={al}"(result) : "{dx}" struct);
+   |                                                        ^^^^^^ expected `(`
 
 error: expected expression, found keyword `struct`
-  --> $DIR/asm-parse-errors.rs:11:51
+  --> $DIR/asm-parse-errors.rs:11:56
    |
-LL |     asm!("in %dx, %al" : "={al}"(result) : "{dx}"(struct));
-   |                                                   ^^^^^^ expected expression
+LL |     llvm_asm!("in %dx, %al" : "={al}"(result) : "{dx}"(struct));
+   |                                                        ^^^^^^ expected expression
 
 error: expected string literal
-  --> $DIR/asm-parse-errors.rs:12:36
+  --> $DIR/asm-parse-errors.rs:12:41
    |
-LL |     asm!("mov $$0x200, %eax" : : : struct);
-   |                                    ^^^^^^ not a string literal
+LL |     llvm_asm!("mov $$0x200, %eax" : : : struct);
+   |                                         ^^^^^^ not a string literal
 
 error: expected string literal
-  --> $DIR/asm-parse-errors.rs:13:45
+  --> $DIR/asm-parse-errors.rs:13:50
    |
-LL |     asm!("mov eax, 2" : "={eax}"(foo) : : : struct);
-   |                                             ^^^^^^ not a string literal
+LL |     llvm_asm!("mov eax, 2" : "={eax}"(foo) : : : struct);
+   |                                                  ^^^^^^ not a string literal
 
 error: inline assembly must be a string literal
-  --> $DIR/asm-parse-errors.rs:14:10
+  --> $DIR/asm-parse-errors.rs:14:15
    |
-LL |     asm!(123);
-   |          ^^^
+LL |     llvm_asm!(123);
+   |               ^^^
 
 error: aborting due to 11 previous errors
 
diff --git a/src/test/ui/asm/issue-51431.rs b/src/test/ui/asm/issue-51431.rs
index 4cef42d17d6..ca06bdab27b 100644
--- a/src/test/ui/asm/issue-51431.rs
+++ b/src/test/ui/asm/issue-51431.rs
@@ -1,11 +1,11 @@
 // build-fail
-// ignore-emscripten no asm! support
+// ignore-emscripten no llvm_asm! support
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 fn main() {
     unsafe {
-        asm! {"mov $0,$1"::"0"("bx"),"1"(0x00)}
+        llvm_asm! {"mov $0,$1"::"0"("bx"),"1"(0x00)}
         //~^ ERROR: invalid value for constraint in inline assembly
     }
 }
diff --git a/src/test/ui/asm/issue-51431.stderr b/src/test/ui/asm/issue-51431.stderr
index a024f3311f1..b4b39a2a44e 100644
--- a/src/test/ui/asm/issue-51431.stderr
+++ b/src/test/ui/asm/issue-51431.stderr
@@ -1,8 +1,8 @@
 error[E0669]: invalid value for constraint in inline assembly
-  --> $DIR/issue-51431.rs:8:32
+  --> $DIR/issue-51431.rs:8:37
    |
-LL |         asm! {"mov $0,$1"::"0"("bx"),"1"(0x00)}
-   |                                ^^^^
+LL |         llvm_asm! {"mov $0,$1"::"0"("bx"),"1"(0x00)}
+   |                                     ^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/asm/issue-62046.rs b/src/test/ui/asm/issue-62046.rs
index 105dadd5fd3..fd4d9bdd23d 100644
--- a/src/test/ui/asm/issue-62046.rs
+++ b/src/test/ui/asm/issue-62046.rs
@@ -1,11 +1,11 @@
 // build-fail
 // ignore-emscripten no asm! support
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 fn main() {
     unsafe {
-        asm!("nop" : "+r"("r15"));
+        llvm_asm!("nop" : "+r"("r15"));
         //~^ malformed inline assembly
     }
 }
diff --git a/src/test/ui/asm/issue-62046.stderr b/src/test/ui/asm/issue-62046.stderr
index a38a300548d..cf27052df05 100644
--- a/src/test/ui/asm/issue-62046.stderr
+++ b/src/test/ui/asm/issue-62046.stderr
@@ -1,8 +1,8 @@
 error[E0668]: malformed inline assembly
   --> $DIR/issue-62046.rs:8:9
    |
-LL |         asm!("nop" : "+r"("r15"));
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |         llvm_asm!("nop" : "+r"("r15"));
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
diff --git a/src/test/ui/asm/issue-69092.rs b/src/test/ui/asm/issue-69092.rs
index caa5c2e0b9f..ecce7bfdf5b 100644
--- a/src/test/ui/asm/issue-69092.rs
+++ b/src/test/ui/asm/issue-69092.rs
@@ -2,9 +2,9 @@
 // ignore-emscripten no asm! support
 // Regression test for #69092
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 fn main() {
-    unsafe { asm!(".ascii \"Xen\0\""); }
+    unsafe { llvm_asm!(".ascii \"Xen\0\""); }
     //~^ ERROR: <inline asm>:1:9: error: expected string in '.ascii' directive
 }
diff --git a/src/test/ui/asm/issue-69092.stderr b/src/test/ui/asm/issue-69092.stderr
index 5661097cb8b..35f77edc3c4 100644
--- a/src/test/ui/asm/issue-69092.stderr
+++ b/src/test/ui/asm/issue-69092.stderr
@@ -4,8 +4,8 @@ error: <inline asm>:1:9: error: expected string in '.ascii' directive
 
   --> $DIR/issue-69092.rs:8:14
    |
-LL |     unsafe { asm!(".ascii \"Xen\0\""); }
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     unsafe { llvm_asm!(".ascii \"Xen\0\""); }
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/ast-json/ast-json-ice.rs b/src/test/ui/ast-json/ast-json-ice.rs
index e8a622e1b87..60e6c88fc79 100644
--- a/src/test/ui/ast-json/ast-json-ice.rs
+++ b/src/test/ui/ast-json/ast-json-ice.rs
@@ -8,7 +8,7 @@
 // check-pass
 // dont-check-compiler-stdout - don't check for any AST change.
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 enum V {
     A(i32),
@@ -30,7 +30,7 @@ fn main() {
         target_arch = "x86_64",
         target_arch = "arm",
         target_arch = "aarch64"))]
-    unsafe { asm!(""::::); }
+    unsafe { llvm_asm!(""::::); }
 
     let x: (i32) = 35;
     let y = x as i64<> + 5;
diff --git a/src/test/ui/borrowck/borrowck-asm.rs b/src/test/ui/borrowck/borrowck-asm.rs
index c1b0f39f936..d16b424536a 100644
--- a/src/test/ui/borrowck/borrowck-asm.rs
+++ b/src/test/ui/borrowck/borrowck-asm.rs
@@ -6,7 +6,7 @@
 // ignore-sparc
 // ignore-sparc64
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 #[cfg(any(target_arch = "x86",
             target_arch = "x86_64",
@@ -19,7 +19,7 @@ mod test_cases {
         let y: &mut isize;
         let x = &mut 0isize;
         unsafe {
-            asm!("nop" : : "r"(x));
+            llvm_asm!("nop" : : "r"(x));
         }
         let z = x;  //~ ERROR use of moved value: `x`
     }
@@ -28,7 +28,7 @@ mod test_cases {
         let mut x = 3;
         let y = &mut x;
         unsafe {
-            asm!("nop" : : "r"(x)); //~ ERROR cannot use
+            llvm_asm!("nop" : : "r"(x)); //~ ERROR cannot use
         }
         let z = y;
     }
@@ -36,12 +36,12 @@ mod test_cases {
     fn out_is_assign() {
         let x = 3;
         unsafe {
-            asm!("nop" : "=r"(x));  //~ ERROR cannot assign twice
+            llvm_asm!("nop" : "=r"(x));  //~ ERROR cannot assign twice
         }
         let mut a = &mut 3;
         let b = &*a;
         unsafe {
-            asm!("nop" : "=r"(a));  // OK, Shallow write to `a`
+            llvm_asm!("nop" : "=r"(a));  // OK, Shallow write to `a`
         }
         let c = b;
         let d = *a;
@@ -50,14 +50,14 @@ mod test_cases {
     fn rw_is_assign() {
         let x = 3;
         unsafe {
-            asm!("nop" : "+r"(x));  //~ ERROR cannot assign twice
+            llvm_asm!("nop" : "+r"(x));  //~ ERROR cannot assign twice
         }
     }
 
     fn indirect_is_not_init() {
         let x: i32;
         unsafe {
-            asm!("nop" : "=*r"(x)); //~ ERROR use of possibly-uninitialized variable
+            llvm_asm!("nop" : "=*r"(x)); //~ ERROR use of possibly-uninitialized variable
         }
     }
 
@@ -65,7 +65,7 @@ mod test_cases {
         let mut x = &mut 3;
         let y = &*x;
         unsafe {
-            asm!("nop" : "+r"(x));  //~ ERROR cannot assign to `x` because it is borrowed
+            llvm_asm!("nop" : "+r"(x));  //~ ERROR cannot assign to `x` because it is borrowed
         }
         let z = y;
     }
@@ -73,7 +73,7 @@ mod test_cases {
     fn two_moves() {
         let x = &mut 2;
         unsafe {
-            asm!("nop" : : "r"(x), "r"(x) );    //~ ERROR use of moved value
+            llvm_asm!("nop" : : "r"(x), "r"(x) );    //~ ERROR use of moved value
         }
     }
 }
diff --git a/src/test/ui/borrowck/borrowck-asm.stderr b/src/test/ui/borrowck/borrowck-asm.stderr
index f85b5983acc..d7e94bd34d3 100644
--- a/src/test/ui/borrowck/borrowck-asm.stderr
+++ b/src/test/ui/borrowck/borrowck-asm.stderr
@@ -4,26 +4,26 @@ error[E0382]: use of moved value: `x`
 LL |         let x = &mut 0isize;
    |             - move occurs because `x` has type `&mut isize`, which does not implement the `Copy` trait
 LL |         unsafe {
-LL |             asm!("nop" : : "r"(x));
-   |                                - value moved here
+LL |             llvm_asm!("nop" : : "r"(x));
+   |                                     - value moved here
 LL |         }
 LL |         let z = x;
    |                 ^ value used here after move
 
 error[E0503]: cannot use `x` because it was mutably borrowed
-  --> $DIR/borrowck-asm.rs:31:32
+  --> $DIR/borrowck-asm.rs:31:37
    |
 LL |         let y = &mut x;
    |                 ------ borrow of `x` occurs here
 LL |         unsafe {
-LL |             asm!("nop" : : "r"(x));
-   |                                ^ use of borrowed `x`
+LL |             llvm_asm!("nop" : : "r"(x));
+   |                                     ^ use of borrowed `x`
 LL |         }
 LL |         let z = y;
    |                 - borrow later used here
 
 error[E0384]: cannot assign twice to immutable variable `x`
-  --> $DIR/borrowck-asm.rs:39:31
+  --> $DIR/borrowck-asm.rs:39:36
    |
 LL |         let x = 3;
    |             -
@@ -31,11 +31,11 @@ LL |         let x = 3;
    |             first assignment to `x`
    |             help: make this binding mutable: `mut x`
 LL |         unsafe {
-LL |             asm!("nop" : "=r"(x));
-   |                               ^ cannot assign twice to immutable variable
+LL |             llvm_asm!("nop" : "=r"(x));
+   |                                    ^ cannot assign twice to immutable variable
 
 error[E0384]: cannot assign twice to immutable variable `x`
-  --> $DIR/borrowck-asm.rs:53:31
+  --> $DIR/borrowck-asm.rs:53:36
    |
 LL |         let x = 3;
    |             -
@@ -43,37 +43,37 @@ LL |         let x = 3;
    |             first assignment to `x`
    |             help: make this binding mutable: `mut x`
 LL |         unsafe {
-LL |             asm!("nop" : "+r"(x));
-   |                               ^ cannot assign twice to immutable variable
+LL |             llvm_asm!("nop" : "+r"(x));
+   |                                    ^ cannot assign twice to immutable variable
 
 error[E0381]: use of possibly-uninitialized variable: `x`
-  --> $DIR/borrowck-asm.rs:60:32
+  --> $DIR/borrowck-asm.rs:60:37
    |
-LL |             asm!("nop" : "=*r"(x));
-   |                                ^ use of possibly-uninitialized `x`
+LL |             llvm_asm!("nop" : "=*r"(x));
+   |                                     ^ use of possibly-uninitialized `x`
 
 error[E0506]: cannot assign to `x` because it is borrowed
-  --> $DIR/borrowck-asm.rs:68:31
+  --> $DIR/borrowck-asm.rs:68:36
    |
 LL |         let y = &*x;
    |                 --- borrow of `x` occurs here
 LL |         unsafe {
-LL |             asm!("nop" : "+r"(x));
-   |                               ^ assignment to borrowed `x` occurs here
+LL |             llvm_asm!("nop" : "+r"(x));
+   |                                    ^ assignment to borrowed `x` occurs here
 LL |         }
 LL |         let z = y;
    |                 - borrow later used here
 
 error[E0382]: use of moved value: `x`
-  --> $DIR/borrowck-asm.rs:76:40
+  --> $DIR/borrowck-asm.rs:76:45
    |
 LL |         let x = &mut 2;
    |             - move occurs because `x` has type `&mut i32`, which does not implement the `Copy` trait
 LL |         unsafe {
-LL |             asm!("nop" : : "r"(x), "r"(x) );
-   |                                -       ^ value used here after move
-   |                                |
-   |                                value moved here
+LL |             llvm_asm!("nop" : : "r"(x), "r"(x) );
+   |                                     -       ^ value used here after move
+   |                                     |
+   |                                     value moved here
 
 error: aborting due to 7 previous errors
 
diff --git a/src/test/ui/error-codes/E0660.rs b/src/test/ui/error-codes/E0660.rs
index 6280d390610..842ae59ee8d 100644
--- a/src/test/ui/error-codes/E0660.rs
+++ b/src/test/ui/error-codes/E0660.rs
@@ -1,9 +1,9 @@
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 fn main() {
     let a;
-    asm!("nop" "nop");
+    llvm_asm!("nop" "nop");
     //~^ ERROR E0660
-    asm!("nop" "nop" : "=r"(a));
+    llvm_asm!("nop" "nop" : "=r"(a));
     //~^ ERROR E0660
 }
diff --git a/src/test/ui/error-codes/E0660.stderr b/src/test/ui/error-codes/E0660.stderr
index d355531ef5d..69288ea6fcd 100644
--- a/src/test/ui/error-codes/E0660.stderr
+++ b/src/test/ui/error-codes/E0660.stderr
@@ -1,14 +1,14 @@
 error[E0660]: malformed inline assembly
   --> $DIR/E0660.rs:5:5
    |
-LL |     asm!("nop" "nop");
-   |     ^^^^^^^^^^^^^^^^^^
+LL |     llvm_asm!("nop" "nop");
+   |     ^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0660]: malformed inline assembly
   --> $DIR/E0660.rs:7:5
    |
-LL |     asm!("nop" "nop" : "=r"(a));
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     llvm_asm!("nop" "nop" : "=r"(a));
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/error-codes/E0661.rs b/src/test/ui/error-codes/E0661.rs
index 5ac0c415ae1..1099edd848b 100644
--- a/src/test/ui/error-codes/E0661.rs
+++ b/src/test/ui/error-codes/E0661.rs
@@ -1,9 +1,9 @@
 // ignore-emscripten
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 fn main() {
     let a; //~ ERROR type annotations needed
-    asm!("nop" : "r"(a));
+    llvm_asm!("nop" : "r"(a));
     //~^ ERROR E0661
 }
diff --git a/src/test/ui/error-codes/E0661.stderr b/src/test/ui/error-codes/E0661.stderr
index 6e849649aca..fe3887e7260 100644
--- a/src/test/ui/error-codes/E0661.stderr
+++ b/src/test/ui/error-codes/E0661.stderr
@@ -1,8 +1,8 @@
 error[E0661]: output operand constraint lacks '=' or '+'
-  --> $DIR/E0661.rs:7:18
+  --> $DIR/E0661.rs:7:23
    |
-LL |     asm!("nop" : "r"(a));
-   |                  ^^^
+LL |     llvm_asm!("nop" : "r"(a));
+   |                       ^^^
 
 error[E0282]: type annotations needed
   --> $DIR/E0661.rs:6:9
diff --git a/src/test/ui/error-codes/E0662.rs b/src/test/ui/error-codes/E0662.rs
index 343ed27f83f..09500599903 100644
--- a/src/test/ui/error-codes/E0662.rs
+++ b/src/test/ui/error-codes/E0662.rs
@@ -1,10 +1,10 @@
 // ignore-emscripten
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 fn main() {
-    asm!("xor %eax, %eax"
-         :
-         : "=test"("a") //~ ERROR E0662
-        );
+    llvm_asm!("xor %eax, %eax"
+              :
+              : "=test"("a") //~ ERROR E0662
+             );
 }
diff --git a/src/test/ui/error-codes/E0662.stderr b/src/test/ui/error-codes/E0662.stderr
index 7480f03c3d4..ebc5f628f26 100644
--- a/src/test/ui/error-codes/E0662.stderr
+++ b/src/test/ui/error-codes/E0662.stderr
@@ -1,8 +1,8 @@
 error[E0662]: input operand constraint contains '='
-  --> $DIR/E0662.rs:8:12
+  --> $DIR/E0662.rs:8:17
    |
-LL |          : "=test"("a")
-   |            ^^^^^^^
+LL |               : "=test"("a")
+   |                 ^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/error-codes/E0663.rs b/src/test/ui/error-codes/E0663.rs
index cfbb4b37758..0783d705a5b 100644
--- a/src/test/ui/error-codes/E0663.rs
+++ b/src/test/ui/error-codes/E0663.rs
@@ -1,10 +1,10 @@
 // ignore-emscripten
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 fn main() {
-    asm!("xor %eax, %eax"
-         :
-         : "+test"("a") //~ ERROR E0663
-        );
+    llvm_asm!("xor %eax, %eax"
+              :
+              : "+test"("a") //~ ERROR E0663
+             );
 }
diff --git a/src/test/ui/error-codes/E0663.stderr b/src/test/ui/error-codes/E0663.stderr
index 2b7598d1577..4e421aa0073 100644
--- a/src/test/ui/error-codes/E0663.stderr
+++ b/src/test/ui/error-codes/E0663.stderr
@@ -1,8 +1,8 @@
 error[E0663]: input operand constraint contains '+'
-  --> $DIR/E0663.rs:8:12
+  --> $DIR/E0663.rs:8:17
    |
-LL |          : "+test"("a")
-   |            ^^^^^^^
+LL |               : "+test"("a")
+   |                 ^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/error-codes/E0664.rs b/src/test/ui/error-codes/E0664.rs
index fe70c9f96e0..f8ca5c9c8c6 100644
--- a/src/test/ui/error-codes/E0664.rs
+++ b/src/test/ui/error-codes/E0664.rs
@@ -1,11 +1,11 @@
 // ignore-emscripten
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 fn main() {
-    asm!("mov $$0x200, %eax"
-         :
-         :
-         : "{eax}" //~ ERROR E0664
-        );
+    llvm_asm!("mov $$0x200, %eax"
+              :
+              :
+              : "{eax}" //~ ERROR E0664
+             );
 }
diff --git a/src/test/ui/error-codes/E0664.stderr b/src/test/ui/error-codes/E0664.stderr
index 224fc63696a..d0ed0f01ce7 100644
--- a/src/test/ui/error-codes/E0664.stderr
+++ b/src/test/ui/error-codes/E0664.stderr
@@ -1,8 +1,8 @@
 error[E0664]: clobber should not be surrounded by braces
-  --> $DIR/E0664.rs:9:12
+  --> $DIR/E0664.rs:9:17
    |
-LL |          : "{eax}"
-   |            ^^^^^^^
+LL |               : "{eax}"
+   |                 ^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/feature-gates/feature-gate-asm.rs b/src/test/ui/feature-gates/feature-gate-asm.rs
index 1fce279c9ef..7eeeb4bc4e2 100644
--- a/src/test/ui/feature-gates/feature-gate-asm.rs
+++ b/src/test/ui/feature-gates/feature-gate-asm.rs
@@ -3,5 +3,6 @@
 fn main() {
     unsafe {
         asm!(""); //~ ERROR inline assembly is not stable enough
+        llvm_asm!(""); //~ ERROR inline assembly is not stable enough
     }
 }
diff --git a/src/test/ui/feature-gates/feature-gate-asm.stderr b/src/test/ui/feature-gates/feature-gate-asm.stderr
index 4c75d19c99f..1f9eaa5632e 100644
--- a/src/test/ui/feature-gates/feature-gate-asm.stderr
+++ b/src/test/ui/feature-gates/feature-gate-asm.stderr
@@ -7,6 +7,15 @@ LL |         asm!("");
    = note: see issue #70173 <https://github.com/rust-lang/rust/issues/70173> for more information
    = help: add `#![feature(asm)]` to the crate attributes to enable
 
-error: aborting due to previous error
+error[E0658]: use of unstable library feature 'llvm_asm': inline assembly is not stable enough for use and is subject to change
+  --> $DIR/feature-gate-asm.rs:6:9
+   |
+LL |         llvm_asm!("");
+   |         ^^^^^^^^
+   |
+   = note: see issue #70173 <https://github.com/rust-lang/rust/issues/70173> for more information
+   = help: add `#![feature(llvm_asm)]` to the crate attributes to enable
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/feature-gates/feature-gate-asm2.rs b/src/test/ui/feature-gates/feature-gate-asm2.rs
index 4f56aa72344..666a4894f62 100644
--- a/src/test/ui/feature-gates/feature-gate-asm2.rs
+++ b/src/test/ui/feature-gates/feature-gate-asm2.rs
@@ -3,5 +3,6 @@
 fn main() {
     unsafe {
         println!("{:?}", asm!("")); //~ ERROR inline assembly is not stable
+        println!("{:?}", llvm_asm!("")); //~ ERROR inline assembly is not stable
     }
 }
diff --git a/src/test/ui/feature-gates/feature-gate-asm2.stderr b/src/test/ui/feature-gates/feature-gate-asm2.stderr
index eaf3aa402e3..17ba66e9842 100644
--- a/src/test/ui/feature-gates/feature-gate-asm2.stderr
+++ b/src/test/ui/feature-gates/feature-gate-asm2.stderr
@@ -7,6 +7,15 @@ LL |         println!("{:?}", asm!(""));
    = note: see issue #70173 <https://github.com/rust-lang/rust/issues/70173> for more information
    = help: add `#![feature(asm)]` to the crate attributes to enable
 
-error: aborting due to previous error
+error[E0658]: use of unstable library feature 'llvm_asm': inline assembly is not stable enough for use and is subject to change
+  --> $DIR/feature-gate-asm2.rs:6:26
+   |
+LL |         println!("{:?}", llvm_asm!(""));
+   |                          ^^^^^^^^
+   |
+   = note: see issue #70173 <https://github.com/rust-lang/rust/issues/70173> for more information
+   = help: add `#![feature(llvm_asm)]` to the crate attributes to enable
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/inline-asm-bad-constraint.rs b/src/test/ui/inline-asm-bad-constraint.rs
index 04fd5760cf8..edf2c2e3180 100644
--- a/src/test/ui/inline-asm-bad-constraint.rs
+++ b/src/test/ui/inline-asm-bad-constraint.rs
@@ -3,7 +3,7 @@
 // build-fail
 // ignore-emscripten
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 extern "C" {
     fn foo(a: usize);
@@ -19,7 +19,7 @@ fn main() {
 fn bad_register_constraint() {
     let rax: u64;
     unsafe {
-        asm!("" :"={rax"(rax)) //~ ERROR E0668
+        llvm_asm!("" :"={rax"(rax)) //~ ERROR E0668
     };
     println!("Accumulator is: {}", rax);
 }
@@ -27,14 +27,14 @@ fn bad_register_constraint() {
 // Issue #54376
 fn bad_input() {
     unsafe {
-        asm!("callq $0" : : "0"(foo)) //~ ERROR E0668
+        llvm_asm!("callq $0" : : "0"(foo)) //~ ERROR E0668
     };
 }
 
 fn wrong_size_output() {
     let rax: u64 = 0;
     unsafe {
-        asm!("addb $1, $0" : "={rax}"((0i32, rax))); //~ ERROR E0668
+        llvm_asm!("addb $1, $0" : "={rax}"((0i32, rax))); //~ ERROR E0668
     }
     println!("rax: {}", rax);
 }
diff --git a/src/test/ui/inline-asm-bad-constraint.stderr b/src/test/ui/inline-asm-bad-constraint.stderr
index 2647e337b9d..d6a3b6e8382 100644
--- a/src/test/ui/inline-asm-bad-constraint.stderr
+++ b/src/test/ui/inline-asm-bad-constraint.stderr
@@ -1,24 +1,24 @@
 error[E0668]: malformed inline assembly
   --> $DIR/inline-asm-bad-constraint.rs:22:9
    |
-LL |         asm!("" :"={rax"(rax))
-   |         ^^^^^^^^^^^^^^^^^^^^^^
+LL |         llvm_asm!("" :"={rax"(rax))
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0668]: malformed inline assembly
   --> $DIR/inline-asm-bad-constraint.rs:30:9
    |
-LL |         asm!("callq $0" : : "0"(foo))
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |         llvm_asm!("callq $0" : : "0"(foo))
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0668]: malformed inline assembly
   --> $DIR/inline-asm-bad-constraint.rs:37:9
    |
-LL |         asm!("addb $1, $0" : "={rax}"((0i32, rax)));
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |         llvm_asm!("addb $1, $0" : "={rax}"((0i32, rax)));
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
diff --git a/src/test/ui/inline-asm-bad-operand.rs b/src/test/ui/inline-asm-bad-operand.rs
index f4e9922164f..e5fc4ee0106 100644
--- a/src/test/ui/inline-asm-bad-operand.rs
+++ b/src/test/ui/inline-asm-bad-operand.rs
@@ -4,7 +4,7 @@
 // build-fail
 // ignore-emscripten
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 #[repr(C)]
 struct MyPtr(usize);
@@ -19,41 +19,41 @@ fn main() {
 
 fn issue_37433() {
     unsafe {
-        asm!("" :: "r"("")); //~ ERROR E0669
+        llvm_asm!("" :: "r"("")); //~ ERROR E0669
     }
 
     unsafe {
         let target = MyPtr(0);
-        asm!("ret" : : "{rdi}"(target)); //~ ERROR E0669
+        llvm_asm!("ret" : : "{rdi}"(target)); //~ ERROR E0669
     }
 }
 
 fn issue_37437() {
     let hello: &str = "hello";
     // this should fail...
-    unsafe { asm!("" :: "i"(hello)) }; //~ ERROR E0669
+    unsafe { llvm_asm!("" :: "i"(hello)) }; //~ ERROR E0669
     // but this should succeed.
-    unsafe { asm!("" :: "r"(hello.as_ptr())) };
+    unsafe { llvm_asm!("" :: "r"(hello.as_ptr())) };
 }
 
 fn issue_40187() {
     let arr: [u8; 1] = [0; 1];
     unsafe {
-        asm!("movups $1, %xmm0"::"m"(arr)); //~ ERROR E0669
+        llvm_asm!("movups $1, %xmm0"::"m"(arr)); //~ ERROR E0669
     }
 }
 
 fn issue_54067() {
     let addr: Option<u32> = Some(123);
     unsafe {
-        asm!("mov sp, $0"::"r"(addr)); //~ ERROR E0669
+        llvm_asm!("mov sp, $0"::"r"(addr)); //~ ERROR E0669
     }
 }
 
 fn multiple_errors() {
     let addr: (u32, u32) = (1, 2);
     unsafe {
-        asm!("mov sp, $0"::"r"(addr), //~ ERROR E0669
-                           "r"("hello e0669")); //~ ERROR E0669
+        llvm_asm!("mov sp, $0"::"r"(addr), //~ ERROR E0669
+                                "r"("hello e0669")); //~ ERROR E0669
     }
 }
diff --git a/src/test/ui/inline-asm-bad-operand.stderr b/src/test/ui/inline-asm-bad-operand.stderr
index fe6c6c99141..1ac7024ec8b 100644
--- a/src/test/ui/inline-asm-bad-operand.stderr
+++ b/src/test/ui/inline-asm-bad-operand.stderr
@@ -1,41 +1,41 @@
 error[E0669]: invalid value for constraint in inline assembly
-  --> $DIR/inline-asm-bad-operand.rs:22:24
+  --> $DIR/inline-asm-bad-operand.rs:22:29
    |
-LL |         asm!("" :: "r"(""));
-   |                        ^^
+LL |         llvm_asm!("" :: "r"(""));
+   |                             ^^
 
 error[E0669]: invalid value for constraint in inline assembly
-  --> $DIR/inline-asm-bad-operand.rs:27:32
+  --> $DIR/inline-asm-bad-operand.rs:27:37
    |
-LL |         asm!("ret" : : "{rdi}"(target));
-   |                                ^^^^^^
+LL |         llvm_asm!("ret" : : "{rdi}"(target));
+   |                                     ^^^^^^
 
 error[E0669]: invalid value for constraint in inline assembly
-  --> $DIR/inline-asm-bad-operand.rs:34:29
+  --> $DIR/inline-asm-bad-operand.rs:34:34
    |
-LL |     unsafe { asm!("" :: "i"(hello)) };
-   |                             ^^^^^
+LL |     unsafe { llvm_asm!("" :: "i"(hello)) };
+   |                                  ^^^^^
 
 error[E0669]: invalid value for constraint in inline assembly
-  --> $DIR/inline-asm-bad-operand.rs:42:38
+  --> $DIR/inline-asm-bad-operand.rs:42:43
    |
-LL |         asm!("movups $1, %xmm0"::"m"(arr));
-   |                                      ^^^
+LL |         llvm_asm!("movups $1, %xmm0"::"m"(arr));
+   |                                           ^^^
 
 error[E0669]: invalid value for constraint in inline assembly
-  --> $DIR/inline-asm-bad-operand.rs:49:32
+  --> $DIR/inline-asm-bad-operand.rs:49:37
    |
-LL |         asm!("mov sp, $0"::"r"(addr));
-   |                                ^^^^
+LL |         llvm_asm!("mov sp, $0"::"r"(addr));
+   |                                     ^^^^
 
 error[E0669]: invalid value for constraint in inline assembly
-  --> $DIR/inline-asm-bad-operand.rs:56:32
+  --> $DIR/inline-asm-bad-operand.rs:56:37
    |
-LL |         asm!("mov sp, $0"::"r"(addr),
-   |                                ^^^^
+LL |         llvm_asm!("mov sp, $0"::"r"(addr),
+   |                                     ^^^^
 
 error[E0669]: invalid value for constraint in inline assembly
-  --> $DIR/inline-asm-bad-operand.rs:57:32
+  --> $DIR/inline-asm-bad-operand.rs:57:37
    |
 LL | ...                   "r"("hello e0669"));
    |                           ^^^^^^^^^^^^^
diff --git a/src/test/ui/issues/issue-14936.rs b/src/test/ui/issues/issue-14936.rs
index 33532855fcd..02095a2f7e4 100644
--- a/src/test/ui/issues/issue-14936.rs
+++ b/src/test/ui/issues/issue-14936.rs
@@ -1,7 +1,7 @@
 // build-pass
 #![allow(unused_macros)]
 #![allow(dead_code)]
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 type History = Vec<&'static str>;
 
@@ -18,10 +18,10 @@ macro_rules! demo {
 
             let mut history: History = vec![];
             unsafe {
-                asm!("mov ($1), $0"
-                     : $output_constraint (*wrap(&mut x, "out", &mut history))
-                     : "r"(&wrap(y, "in", &mut history))
-                     :: "volatile");
+                llvm_asm!("mov ($1), $0"
+                          : $output_constraint (*wrap(&mut x, "out", &mut history))
+                          : "r"(&wrap(y, "in", &mut history))
+                          :: "volatile");
             }
             assert_eq!((x,y), (1,1));
             let b: &[_] = &["out", "in"];
diff --git a/src/test/ui/issues/issue-23458.rs b/src/test/ui/issues/issue-23458.rs
index 521db37170a..423b19c3ebd 100644
--- a/src/test/ui/issues/issue-23458.rs
+++ b/src/test/ui/issues/issue-23458.rs
@@ -1,11 +1,11 @@
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 // build-fail
 // only-x86_64
 
 fn main() {
     unsafe {
-        asm!("int $3"); //~ ERROR too few operands for instruction
-                        //~| ERROR invalid operand in inline asm
+        llvm_asm!("int $3"); //~ ERROR too few operands for instruction
+                             //~| ERROR invalid operand in inline asm
     }
 }
diff --git a/src/test/ui/issues/issue-23458.stderr b/src/test/ui/issues/issue-23458.stderr
index 76c3e6da82e..81f06e63975 100644
--- a/src/test/ui/issues/issue-23458.stderr
+++ b/src/test/ui/issues/issue-23458.stderr
@@ -1,8 +1,8 @@
 error: invalid operand in inline asm: 'int $3'
   --> $DIR/issue-23458.rs:8:9
    |
-LL |         asm!("int $3");
-   |         ^^^^^^^^^^^^^^^
+LL |         llvm_asm!("int $3");
+   |         ^^^^^^^^^^^^^^^^^^^^
 
 error: <inline asm>:1:2: error: too few operands for instruction
         int 
@@ -10,8 +10,8 @@ error: <inline asm>:1:2: error: too few operands for instruction
 
   --> $DIR/issue-23458.rs:8:9
    |
-LL |         asm!("int $3");
-   |         ^^^^^^^^^^^^^^^
+LL |         llvm_asm!("int $3");
+   |         ^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/issues/issue-33264.rs b/src/test/ui/issues/issue-33264.rs
index 31638b00439..32a36e44aa1 100644
--- a/src/test/ui/issues/issue-33264.rs
+++ b/src/test/ui/issues/issue-33264.rs
@@ -2,7 +2,7 @@
 // only-x86_64
 
 #![allow(dead_code, non_upper_case_globals)]
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 #[repr(C)]
 pub struct D32x4(f32,f32,f32,f32);
@@ -11,16 +11,16 @@ impl D32x4 {
     fn add(&self, vec: Self) -> Self {
         unsafe {
             let ret: Self;
-            asm!("
-                 movaps $1, %xmm1
-                 movaps $2, %xmm2
-                 addps %xmm1, %xmm2
-                 movaps $xmm1, $0
-                 "
-                 : "=r"(ret)
-                 : "1"(self), "2"(vec)
-                 : "xmm1", "xmm2"
-                 );
+            llvm_asm!("
+                      movaps $1, %xmm1
+                      movaps $2, %xmm2
+                      addps %xmm1, %xmm2
+                      movaps $xmm1, $0
+                      "
+                      : "=r"(ret)
+                      : "1"(self), "2"(vec)
+                      : "xmm1", "xmm2"
+                      );
             ret
         }
     }
diff --git a/src/test/ui/issues/issue-37366.rs b/src/test/ui/issues/issue-37366.rs
index 6bf3a276ce1..be9b4af8fbc 100644
--- a/src/test/ui/issues/issue-37366.rs
+++ b/src/test/ui/issues/issue-37366.rs
@@ -1,12 +1,12 @@
 // check-pass
 // ignore-emscripten
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 macro_rules! interrupt_handler {
     () => {
         unsafe fn _interrupt_handler() {
-            asm!("pop  eax" :::: "intel");
+            llvm_asm!("pop  eax" :::: "intel");
         }
     }
 }
diff --git a/src/test/ui/issues/issue-37433.rs b/src/test/ui/issues/issue-37433.rs
index c4d427f3ad3..2ea970327f0 100644
--- a/src/test/ui/issues/issue-37433.rs
+++ b/src/test/ui/issues/issue-37433.rs
@@ -1,11 +1,11 @@
 // build-fail
-// ignore-emscripten no asm! support
+// ignore-emscripten no llvm_asm! support
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 fn main() {
     unsafe {
-        asm!("" :: "r"(""));
+        llvm_asm!("" :: "r"(""));
         //~^ ERROR: invalid value for constraint in inline assembly
     }
 }
diff --git a/src/test/ui/issues/issue-37433.stderr b/src/test/ui/issues/issue-37433.stderr
index d9e1c98e9ee..ff6965ad353 100644
--- a/src/test/ui/issues/issue-37433.stderr
+++ b/src/test/ui/issues/issue-37433.stderr
@@ -1,8 +1,8 @@
 error[E0669]: invalid value for constraint in inline assembly
-  --> $DIR/issue-37433.rs:8:24
+  --> $DIR/issue-37433.rs:8:29
    |
-LL |         asm!("" :: "r"(""));
-   |                        ^^
+LL |         llvm_asm!("" :: "r"(""));
+   |                             ^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-53787-inline-assembler-macro.rs b/src/test/ui/issues/issue-53787-inline-assembler-macro.rs
index d911ac5efbe..38591b0a9f8 100644
--- a/src/test/ui/issues/issue-53787-inline-assembler-macro.rs
+++ b/src/test/ui/issues/issue-53787-inline-assembler-macro.rs
@@ -3,12 +3,12 @@
 // build-fail
 // ignore-emscripten
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 
 macro_rules! fake_jump {
     ($id:expr) => {
         unsafe {
-            asm!(
+            llvm_asm!(
             "
             jmp $0
             lea eax, [ebx]
diff --git a/src/test/ui/issues/issue-9129.rs b/src/test/ui/issues/issue-9129.rs
index 3d87e1c2037..9a0376ad51f 100644
--- a/src/test/ui/issues/issue-9129.rs
+++ b/src/test/ui/issues/issue-9129.rs
@@ -12,7 +12,7 @@ impl bomb for S { fn boom(&self, _: Ident) { } }
 
 pub struct Ident { name: usize }
 
-// macro_rules! int3 { () => ( unsafe { asm!( "int3" ); } ) }
+// macro_rules! int3 { () => ( unsafe { llvm_asm!( "int3" ); } ) }
 macro_rules! int3 { () => ( { } ) }
 
 fn Ident_new() -> Ident {
diff --git a/src/test/ui/macros/macro-expanded-include/foo/mod.rs b/src/test/ui/macros/macro-expanded-include/foo/mod.rs
index a8bfa0299f6..f0eb92b2be8 100644
--- a/src/test/ui/macros/macro-expanded-include/foo/mod.rs
+++ b/src/test/ui/macros/macro-expanded-include/foo/mod.rs
@@ -5,5 +5,5 @@ macro_rules! m {
 }
 
 macro_rules! n {
-    () => { unsafe { asm!(include_str!("file.txt")); } }
+    () => { unsafe { llvm_asm!(include_str!("file.txt")); } }
 }
diff --git a/src/test/ui/macros/macro-expanded-include/test.rs b/src/test/ui/macros/macro-expanded-include/test.rs
index b8eb854b0b0..abf83a5c6ff 100644
--- a/src/test/ui/macros/macro-expanded-include/test.rs
+++ b/src/test/ui/macros/macro-expanded-include/test.rs
@@ -1,6 +1,6 @@
-// ignore-emscripten no asm! support
+// ignore-emscripten no llvm_asm! support
 // build-pass (FIXME(62277): could be check-pass?)
-#![feature(asm)]
+#![feature(llvm_asm)]
 #![allow(unused)]
 
 #[macro_use]
diff --git a/src/test/ui/macros/macros-nonfatal-errors.rs b/src/test/ui/macros/macros-nonfatal-errors.rs
index 1eb82a20729..cc96a5bff52 100644
--- a/src/test/ui/macros/macros-nonfatal-errors.rs
+++ b/src/test/ui/macros/macros-nonfatal-errors.rs
@@ -3,14 +3,14 @@
 // test that errors in a (selection) of macros don't kill compilation
 // immediately, so that we get more errors listed at a time.
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 #![feature(trace_macros, concat_idents)]
 
 #[derive(Default)] //~ ERROR
 enum OrDeriveThis {}
 
 fn main() {
-    asm!(invalid); //~ ERROR
+    llvm_asm!(invalid); //~ ERROR
 
     concat_idents!("not", "idents"); //~ ERROR
 
diff --git a/src/test/ui/macros/macros-nonfatal-errors.stderr b/src/test/ui/macros/macros-nonfatal-errors.stderr
index 1ab6b79a61e..f416c70123c 100644
--- a/src/test/ui/macros/macros-nonfatal-errors.stderr
+++ b/src/test/ui/macros/macros-nonfatal-errors.stderr
@@ -7,10 +7,10 @@ LL | #[derive(Default)]
    = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: inline assembly must be a string literal
-  --> $DIR/macros-nonfatal-errors.rs:13:10
+  --> $DIR/macros-nonfatal-errors.rs:13:15
    |
-LL |     asm!(invalid);
-   |          ^^^^^^^
+LL |     llvm_asm!(invalid);
+   |               ^^^^^^^
 
 error: concat_idents! requires ident args.
   --> $DIR/macros-nonfatal-errors.rs:15:5
diff --git a/src/test/ui/out-of-stack.rs b/src/test/ui/out-of-stack.rs
index 5e9265be4b9..d04b0c1a630 100644
--- a/src/test/ui/out-of-stack.rs
+++ b/src/test/ui/out-of-stack.rs
@@ -8,7 +8,7 @@
 // ignore-emscripten no processes
 // ignore-sgx no processes
 
-#![feature(asm)]
+#![feature(llvm_asm)]
 #![feature(rustc_private)]
 
 #[cfg(unix)]
@@ -22,7 +22,7 @@ use std::thread;
 // Inlining to avoid llvm turning the recursive functions into tail calls,
 // which doesn't consume stack.
 #[inline(always)]
-pub fn black_box<T>(dummy: T) { unsafe { asm!("" : : "r"(&dummy)) } }
+pub fn black_box<T>(dummy: T) { unsafe { llvm_asm!("" : : "r"(&dummy)) } }
 
 fn silent_recurse() {
     let buf = [0u8; 1000];