summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-03-27 03:27:09 +0000
committerbors <bors@rust-lang.org>2020-03-27 03:27:09 +0000
commit6c19a10e24af157b96687ca8dc1b48ebac4b9489 (patch)
treeaf4246ff21626b91d238c82664ea09f49422c948
parentAuto merge of #70451 - Dylan-DPC:rollup-2g9oyht, r=Dylan-DPC (diff)
parentUpdate tests to use llvm_asm! (diff)
downloadrust-6c19a10e24af157b96687ca8dc1b48ebac4b9489.tar.gz
rust-6c19a10e24af157b96687ca8dc1b48ebac4b9489.tar.bz2
rust-6c19a10e24af157b96687ca8dc1b48ebac4b9489.tar.xz
Auto merge of #68404 - Amanieu:llvm-asm, r=estebank
Rename asm! to llvm_asm! As per https://github.com/rust-lang/rfcs/pull/2843, this PR renames `asm!` to `llvm_asm!`. It also renames the compiler's internal `InlineAsm` data structures to `LlvmInlineAsm` in preparation for the new `asm!` functionality specified in https://github.com/rust-lang/rfcs/pull/2850. This PR doesn't actually deprecate `asm!` yet, it just makes it redirect to `llvm_asm!`. This is necessary because we first need to update the submodules (in particular stdarch) to use `llvm_asm!`.
-rw-r--r--src/doc/unstable-book/src/library-features/llvm-asm.md (renamed from src/doc/unstable-book/src/library-features/asm.md)46
-rw-r--r--src/libcore/hint.rs2
-rw-r--r--src/libcore/lib.rs1
-rw-r--r--src/libcore/macros/mod.rs43
-rw-r--r--src/libcore/num/dec2flt/algorithm.rs4
-rw-r--r--src/libcore/prelude/v1.rs4
-rw-r--r--src/librustc/mir/mod.rs10
-rw-r--r--src/librustc/mir/visit.rs2
-rw-r--r--src/librustc/ty/structural_impls.rs2
-rw-r--r--src/librustc_ast/ast.rs26
-rw-r--r--src/librustc_ast/mut_visit.rs6
-rw-r--r--src/librustc_ast/visit.rs2
-rw-r--r--src/librustc_ast_lowering/expr.rs12
-rw-r--r--src/librustc_ast_passes/ast_validation.rs4
-rw-r--r--src/librustc_ast_pretty/pprust.rs6
-rw-r--r--src/librustc_builtin_macros/lib.rs5
-rw-r--r--src/librustc_builtin_macros/llvm_asm.rs (renamed from src/librustc_builtin_macros/asm.rs)22
-rw-r--r--src/librustc_codegen_llvm/asm.rs6
-rw-r--r--src/librustc_codegen_llvm/llvm/ffi.rs6
-rw-r--r--src/librustc_codegen_ssa/mir/statement.rs4
-rw-r--r--src/librustc_codegen_ssa/traits/asm.rs6
-rw-r--r--src/librustc_error_codes/error_codes.rs2
-rw-r--r--src/librustc_error_codes/error_codes/E0660.md4
-rw-r--r--src/librustc_error_codes/error_codes/E0661.md4
-rw-r--r--src/librustc_error_codes/error_codes/E0662.md11
-rw-r--r--src/librustc_error_codes/error_codes/E0663.md11
-rw-r--r--src/librustc_error_codes/error_codes/E0664.md12
-rw-r--r--src/librustc_error_codes/error_codes/E0668.md4
-rw-r--r--src/librustc_hir/arena.rs2
-rw-r--r--src/librustc_hir/hir.rs22
-rw-r--r--src/librustc_hir/intravisit.rs2
-rw-r--r--src/librustc_hir_pretty/lib.rs6
-rw-r--r--src/librustc_mir/borrow_check/invalidation.rs2
-rw-r--r--src/librustc_mir/borrow_check/mod.rs2
-rw-r--r--src/librustc_mir/borrow_check/type_check/mod.rs2
-rw-r--r--src/librustc_mir/dataflow/impls/borrows.rs2
-rw-r--r--src/librustc_mir/dataflow/impls/storage_liveness.rs2
-rw-r--r--src/librustc_mir/dataflow/move_paths/builder.rs2
-rw-r--r--src/librustc_mir/interpret/step.rs2
-rw-r--r--src/librustc_mir/transform/check_consts/validation.rs2
-rw-r--r--src/librustc_mir/transform/check_unsafety.rs2
-rw-r--r--src/librustc_mir/transform/qualify_min_const_fn.rs2
-rw-r--r--src/librustc_mir/transform/remove_noop_landing_pads.rs2
-rw-r--r--src/librustc_mir/transform/simplify_try.rs2
-rw-r--r--src/librustc_mir/transform/unreachable_prop.rs2
-rw-r--r--src/librustc_mir_build/build/expr/as_place.rs2
-rw-r--r--src/librustc_mir_build/build/expr/as_rvalue.rs2
-rw-r--r--src/librustc_mir_build/build/expr/category.rs2
-rw-r--r--src/librustc_mir_build/build/expr/into.rs2
-rw-r--r--src/librustc_mir_build/build/expr/stmt.rs6
-rw-r--r--src/librustc_mir_build/hair/cx/expr.rs2
-rw-r--r--src/librustc_mir_build/hair/mod.rs4
-rw-r--r--src/librustc_passes/liveness.rs6
-rw-r--r--src/librustc_span/symbol.rs1
-rw-r--r--src/librustc_typeck/check/expr.rs2
-rw-r--r--src/librustc_typeck/expr_use_visitor.rs2
-rw-r--r--src/librustc_typeck/mem_categorization.rs2
-rw-r--r--src/libstd/lib.rs27
-rw-r--r--src/libstd/prelude/v1.rs4
-rw-r--r--src/libstd/sys/sgx/abi/mem.rs2
-rw-r--r--src/libstd/sys/sgx/ext/arch.rs4
-rw-r--r--src/libstd/sys/windows/mod.rs2
-rw-r--r--src/libtest/lib.rs1
-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.stderr13
-rw-r--r--src/test/ui/feature-gates/feature-gate-asm2.rs1
-rw-r--r--src/test/ui/feature-gates/feature-gate-asm2.stderr13
-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
136 files changed, 634 insertions, 588 deletions
diff --git a/src/doc/unstable-book/src/library-features/asm.md b/src/doc/unstable-book/src/library-features/llvm-asm.md
index 2a1b639..e07f716 100644
--- a/src/doc/unstable-book/src/library-features/asm.md
+++ b/src/doc/unstable-book/src/library-features/llvm-asm.md
@@ -1,17 +1,17 @@
1# `asm` 1# `llvm_asm`
2 2
3The tracking issue for this feature is: [#29722] 3The tracking issue for this feature is: [#70173]
4 4
5[#29722]: https://github.com/rust-lang/rust/issues/29722 5[#70173]: https://github.com/rust-lang/rust/issues/70173
6 6
7------------------------ 7------------------------
8 8
9For extremely low-level manipulations and performance reasons, one 9For extremely low-level manipulations and performance reasons, one
10might wish to control the CPU directly. Rust supports using inline 10might wish to control the CPU directly. Rust supports using inline
11assembly to do this via the `asm!` macro. 11assembly to do this via the `llvm_asm!` macro.
12 12
13```rust,ignore 13```rust,ignore
14asm!(assembly template 14llvm_asm!(assembly template
15 : output operands 15 : output operands
16 : input operands 16 : input operands
17 : clobbers 17 : clobbers
@@ -19,7 +19,7 @@ asm!(assembly template
19 ); 19 );
20``` 20```
21 21
22Any use of `asm` is feature gated (requires `#![feature(asm)]` on the 22Any use of `llvm_asm` is feature gated (requires `#![feature(llvm_asm)]` on the
23crate to allow) and of course requires an `unsafe` block. 23crate to allow) and of course requires an `unsafe` block.
24 24
25> **Note**: the examples here are given in x86/x86-64 assembly, but 25> **Note**: the examples here are given in x86/x86-64 assembly, but
@@ -31,12 +31,12 @@ The `assembly template` is the only required parameter and must be a
31literal string (i.e. `""`) 31literal string (i.e. `""`)
32 32
33```rust 33```rust
34#![feature(asm)] 34#![feature(llvm_asm)]
35 35
36#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] 36#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
37fn foo() { 37fn foo() {
38 unsafe { 38 unsafe {
39 asm!("NOP"); 39 llvm_asm!("NOP");
40 } 40 }
41} 41}
42 42
@@ -51,16 +51,16 @@ fn main() {
51} 51}
52``` 52```
53 53
54(The `feature(asm)` and `#[cfg]`s are omitted from now on.) 54(The `feature(llvm_asm)` and `#[cfg]`s are omitted from now on.)
55 55
56Output operands, input operands, clobbers and options are all optional 56Output operands, input operands, clobbers and options are all optional
57but you must add the right number of `:` if you skip them: 57but you must add the right number of `:` if you skip them:
58 58
59```rust 59```rust
60# #![feature(asm)] 60# #![feature(llvm_asm)]
61# #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] 61# #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
62# fn main() { unsafe { 62# fn main() { unsafe {
63asm!("xor %eax, %eax" 63llvm_asm!("xor %eax, %eax"
64 : 64 :
65 : 65 :
66 : "eax" 66 : "eax"
@@ -73,10 +73,10 @@ asm!("xor %eax, %eax"
73Whitespace also doesn't matter: 73Whitespace also doesn't matter:
74 74
75```rust 75```rust
76# #![feature(asm)] 76# #![feature(llvm_asm)]
77# #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] 77# #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
78# fn main() { unsafe { 78# fn main() { unsafe {
79asm!("xor %eax, %eax" ::: "eax"); 79llvm_asm!("xor %eax, %eax" ::: "eax");
80# } } 80# } }
81# #[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))] 81# #[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))]
82# fn main() {} 82# fn main() {}
@@ -89,12 +89,12 @@ Input and output operands follow the same format: `:
89expressions must be mutable lvalues, or not yet assigned: 89expressions must be mutable lvalues, or not yet assigned:
90 90
91```rust 91```rust
92# #![feature(asm)] 92# #![feature(llvm_asm)]
93# #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] 93# #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
94fn add(a: i32, b: i32) -> i32 { 94fn add(a: i32, b: i32) -> i32 {
95 let c: i32; 95 let c: i32;
96 unsafe { 96 unsafe {
97 asm!("add $2, $0" 97 llvm_asm!("add $2, $0"
98 : "=r"(c) 98 : "=r"(c)
99 : "0"(a), "r"(b) 99 : "0"(a), "r"(b)
100 ); 100 );
@@ -116,11 +116,11 @@ operand. This is useful for very low level programming, where
116which register you use is important: 116which register you use is important:
117 117
118```rust 118```rust
119# #![feature(asm)] 119# #![feature(llvm_asm)]
120# #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] 120# #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
121# unsafe fn read_byte_in(port: u16) -> u8 { 121# unsafe fn read_byte_in(port: u16) -> u8 {
122let result: u8; 122let result: u8;
123asm!("in %dx, %al" : "={al}"(result) : "{dx}"(port)); 123llvm_asm!("in %dx, %al" : "={al}"(result) : "{dx}"(port));
124result 124result
125# } 125# }
126``` 126```
@@ -133,11 +133,11 @@ compiler not to assume any values loaded into those registers will
133stay valid. 133stay valid.
134 134
135```rust 135```rust
136# #![feature(asm)] 136# #![feature(llvm_asm)]
137# #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] 137# #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
138# fn main() { unsafe { 138# fn main() { unsafe {
139// Put the value 0x200 in eax: 139// Put the value 0x200 in eax:
140asm!("mov $$0x200, %eax" : /* no outputs */ : /* no inputs */ : "eax"); 140llvm_asm!("mov $$0x200, %eax" : /* no outputs */ : /* no inputs */ : "eax");
141# } } 141# } }
142# #[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))] 142# #[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))]
143# fn main() {} 143# fn main() {}
@@ -167,12 +167,12 @@ Current valid options are:
1673. *intel* - use intel syntax instead of the default AT&T. 1673. *intel* - use intel syntax instead of the default AT&T.
168 168
169```rust 169```rust
170# #![feature(asm)] 170# #![feature(llvm_asm)]
171# #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] 171# #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
172# fn main() { 172# fn main() {
173let result: i32; 173let result: i32;
174unsafe { 174unsafe {
175 asm!("mov eax, 2" : "={eax}"(result) : : : "intel") 175 llvm_asm!("mov eax, 2" : "={eax}"(result) : : : "intel")
176} 176}
177println!("eax is currently {}", result); 177println!("eax is currently {}", result);
178# } 178# }
@@ -182,7 +182,7 @@ println!("eax is currently {}", result);
182 182
183## More Information 183## More Information
184 184
185The current implementation of the `asm!` macro is a direct binding to [LLVM's 185The current implementation of the `llvm_asm!` macro is a direct binding to [LLVM's
186inline assembler expressions][llvm-docs], so be sure to check out [their 186inline assembler expressions][llvm-docs], so be sure to check out [their
187documentation as well][llvm-docs] for more information about clobbers, 187documentation as well][llvm-docs] for more information about clobbers,
188constraints, etc. 188constraints, etc.
@@ -190,4 +190,4 @@ constraints, etc.
190[llvm-docs]: http://llvm.org/docs/LangRef.html#inline-assembler-expressions 190[llvm-docs]: http://llvm.org/docs/LangRef.html#inline-assembler-expressions
191 191
192If you need more power and don't mind losing some of the niceties of 192If you need more power and don't mind losing some of the niceties of
193`asm!`, check out [global_asm](global-asm.md). 193`llvm_asm!`, check out [global_asm](global-asm.md).
diff --git a/src/libcore/hint.rs b/src/libcore/hint.rs
index 6cbd26a..698c979 100644
--- a/src/libcore/hint.rs
+++ b/src/libcore/hint.rs
@@ -113,7 +113,7 @@ pub fn black_box<T>(dummy: T) -> T {
113 // box. This isn't the greatest implementation since it probably deoptimizes 113 // box. This isn't the greatest implementation since it probably deoptimizes
114 // more than we want, but it's so far good enough. 114 // more than we want, but it's so far good enough.
115 unsafe { 115 unsafe {
116 asm!("" : : "r"(&dummy)); 116 llvm_asm!("" : : "r"(&dummy));
117 dummy 117 dummy
118 } 118 }
119} 119}
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index 0bee16f..73c5e3f 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -98,6 +98,7 @@
98#![feature(is_sorted)] 98#![feature(is_sorted)]
99#![feature(lang_items)] 99#![feature(lang_items)]
100#![feature(link_llvm_intrinsics)] 100#![feature(link_llvm_intrinsics)]
101#![feature(llvm_asm)]
101#![cfg_attr(not(bootstrap), feature(negative_impls))] 102#![cfg_attr(not(bootstrap), feature(negative_impls))]
102#![feature(never_type)] 103#![feature(never_type)]
103#![feature(nll)] 104#![feature(nll)]
diff --git a/src/libcore/macros/mod.rs b/src/libcore/macros/mod.rs
index a0873fe..f67762c 100644
--- a/src/libcore/macros/mod.rs
+++ b/src/libcore/macros/mod.rs
@@ -1307,7 +1307,7 @@ pub(crate) mod builtin {
1307 /// [unstable book]: ../unstable-book/library-features/asm.html 1307 /// [unstable book]: ../unstable-book/library-features/asm.html
1308 #[unstable( 1308 #[unstable(
1309 feature = "asm", 1309 feature = "asm",
1310 issue = "29722", 1310 issue = "70173",
1311 reason = "inline assembly is not stable enough for use and is subject to change" 1311 reason = "inline assembly is not stable enough for use and is subject to change"
1312 )] 1312 )]
1313 #[rustc_builtin_macro] 1313 #[rustc_builtin_macro]
@@ -1322,6 +1322,47 @@ pub(crate) mod builtin {
1322 }; 1322 };
1323 } 1323 }
1324 1324
1325 /// Inline assembly.
1326 ///
1327 /// Read the [unstable book] for the usage.
1328 ///
1329 /// [unstable book]: ../unstable-book/library-features/asm.html
1330 #[cfg(bootstrap)]
1331 #[unstable(
1332 feature = "llvm_asm",
1333 issue = "70173",
1334 reason = "inline assembly is not stable enough for use and is subject to change"
1335 )]
1336 #[macro_export]
1337 #[allow_internal_unstable(asm)]
1338 macro_rules! llvm_asm {
1339 // Redirect to asm! for stage0
1340 ($($arg:tt)*) => { $crate::asm!($($arg)*) }
1341 }
1342
1343 /// Inline assembly.
1344 ///
1345 /// Read the [unstable book] for the usage.
1346 ///
1347 /// [unstable book]: ../unstable-book/library-features/asm.html
1348 #[cfg(not(bootstrap))]
1349 #[unstable(
1350 feature = "llvm_asm",
1351 issue = "70173",
1352 reason = "inline assembly is not stable enough for use and is subject to change"
1353 )]
1354 #[rustc_builtin_macro]
1355 #[macro_export]
1356 macro_rules! llvm_asm {
1357 ("assembly template"
1358 : $("output"(operand),)*
1359 : $("input"(operand),)*
1360 : $("clobbers",)*
1361 : $("options",)*) => {
1362 /* compiler built-in */
1363 };
1364 }
1365
1325 /// Module-level inline assembly. 1366 /// Module-level inline assembly.
1326 #[unstable( 1367 #[unstable(
1327 feature = "global_asm", 1368 feature = "global_asm",
diff --git a/src/libcore/num/dec2flt/algorithm.rs b/src/libcore/num/dec2flt/algorithm.rs
index c5f6903..aaeb4d8 100644
--- a/src/libcore/num/dec2flt/algorithm.rs
+++ b/src/libcore/num/dec2flt/algorithm.rs
@@ -60,7 +60,7 @@ mod fpu_precision {
60 fn set_cw(cw: u16) { 60 fn set_cw(cw: u16) {
61 // SAFETY: the `fldcw` instruction has been audited to be able to work correctly with 61 // SAFETY: the `fldcw` instruction has been audited to be able to work correctly with
62 // any `u16` 62 // any `u16`
63 unsafe { asm!("fldcw $0" :: "m" (cw) :: "volatile") } 63 unsafe { llvm_asm!("fldcw $0" :: "m" (cw) :: "volatile") }
64 } 64 }
65 65
66 /// Sets the precision field of the FPU to `T` and returns a `FPUControlWord`. 66 /// Sets the precision field of the FPU to `T` and returns a `FPUControlWord`.
@@ -78,7 +78,7 @@ mod fpu_precision {
78 // `FPUControlWord` structure is dropped 78 // `FPUControlWord` structure is dropped
79 // SAFETY: the `fnstcw` instruction has been audited to be able to work correctly with 79 // SAFETY: the `fnstcw` instruction has been audited to be able to work correctly with
80 // any `u16` 80 // any `u16`
81 unsafe { asm!("fnstcw $0" : "=*m" (&cw) ::: "volatile") } 81 unsafe { llvm_asm!("fnstcw $0" : "=*m" (&cw) ::: "volatile") }
82 82
83 // Set the control word to the desired precision. This is achieved by masking away the old 83 // Set the control word to the desired precision. This is achieved by masking away the old
84 // precision (bits 8 and 9, 0x300) and replacing it with the precision flag computed above. 84 // precision (bits 8 and 9, 0x300) and replacing it with the precision flag computed above.
diff --git a/src/libcore/prelude/v1.rs b/src/libcore/prelude/v1.rs
index c91370b..9b4ed4e 100644
--- a/src/libcore/prelude/v1.rs
+++ b/src/libcore/prelude/v1.rs
@@ -57,8 +57,8 @@ pub use crate::hash::macros::Hash;
57#[doc(no_inline)] 57#[doc(no_inline)]
58pub use crate::{ 58pub use crate::{
59 asm, assert, cfg, column, compile_error, concat, concat_idents, env, file, format_args, 59 asm, assert, cfg, column, compile_error, concat, concat_idents, env, file, format_args,
60 format_args_nl, global_asm, include, include_bytes, include_str, line, log_syntax, module_path, 60 format_args_nl, global_asm, include, include_bytes, include_str, line, llvm_asm, log_syntax,
61 option_env, stringify, trace_macros, 61 module_path, option_env, stringify, trace_macros,
62}; 62};
63 63
64#[stable(feature = "builtin_macro_prelude", since = "1.38.0")] 64#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
diff --git a/src/librustc/mir/mod.rs b/src/librustc/mir/mod.rs
index 1e47317..9ba9d81 100644
--- a/src/librustc/mir/mod.rs
+++ b/src/librustc/mir/mod.rs
@@ -1584,7 +1584,7 @@ pub enum StatementKind<'tcx> {
1584 1584
1585 /// Executes a piece of inline Assembly. Stored in a Box to keep the size 1585 /// Executes a piece of inline Assembly. Stored in a Box to keep the size
1586 /// of `StatementKind` low. 1586 /// of `StatementKind` low.
1587 InlineAsm(Box<InlineAsm<'tcx>>), 1587 LlvmInlineAsm(Box<LlvmInlineAsm<'tcx>>),
1588 1588
1589 /// Retag references in the given place, ensuring they got fresh tags. This is 1589 /// Retag references in the given place, ensuring they got fresh tags. This is
1590 /// part of the Stacked Borrows model. These statements are currently only interpreted 1590 /// part of the Stacked Borrows model. These statements are currently only interpreted
@@ -1668,8 +1668,8 @@ pub enum FakeReadCause {
1668} 1668}
1669 1669
1670#[derive(Clone, Debug, PartialEq, RustcEncodable, RustcDecodable, HashStable, TypeFoldable)] 1670#[derive(Clone, Debug, PartialEq, RustcEncodable, RustcDecodable, HashStable, TypeFoldable)]
1671pub struct InlineAsm<'tcx> { 1671pub struct LlvmInlineAsm<'tcx> {
1672 pub asm: hir::InlineAsmInner, 1672 pub asm: hir::LlvmInlineAsmInner,
1673 pub outputs: Box<[Place<'tcx>]>, 1673 pub outputs: Box<[Place<'tcx>]>,
1674 pub inputs: Box<[(Span, Operand<'tcx>)]>, 1674 pub inputs: Box<[(Span, Operand<'tcx>)]>,
1675} 1675}
@@ -1696,8 +1696,8 @@ impl Debug for Statement<'_> {
1696 SetDiscriminant { ref place, variant_index } => { 1696 SetDiscriminant { ref place, variant_index } => {
1697 write!(fmt, "discriminant({:?}) = {:?}", place, variant_index) 1697 write!(fmt, "discriminant({:?}) = {:?}", place, variant_index)
1698 } 1698 }
1699 InlineAsm(ref asm) => { 1699 LlvmInlineAsm(ref asm) => {
1700 write!(fmt, "asm!({:?} : {:?} : {:?})", asm.asm, asm.outputs, asm.inputs) 1700 write!(fmt, "llvm_asm!({:?} : {:?} : {:?})", asm.asm, asm.outputs, asm.inputs)
1701 } 1701 }
1702 AscribeUserType(box (ref place, ref c_ty), ref variance) => { 1702 AscribeUserType(box (ref place, ref c_ty), ref variance) => {
1703 write!(fmt, "AscribeUserType({:?}, {:?}, {:?})", place, variance, c_ty) 1703 write!(fmt, "AscribeUserType({:?}, {:?}, {:?})", place, variance, c_ty)
diff --git a/src/librustc/mir/visit.rs b/src/librustc/mir/visit.rs
index 2aca6f6..c1b27b4 100644
--- a/src/librustc/mir/visit.rs
+++ b/src/librustc/mir/visit.rs
@@ -385,7 +385,7 @@ macro_rules! make_mir_visitor {
385 location 385 location
386 ); 386 );
387 } 387 }
388 StatementKind::InlineAsm(asm) => { 388 StatementKind::LlvmInlineAsm(asm) => {
389 for output in & $($mutability)? asm.outputs[..] { 389 for output in & $($mutability)? asm.outputs[..] {
390 self.visit_place( 390 self.visit_place(
391 output, 391 output,
diff --git a/src/librustc/ty/structural_impls.rs b/src/librustc/ty/structural_impls.rs
index 81be5b1..429791d 100644
--- a/src/librustc/ty/structural_impls.rs
+++ b/src/librustc/ty/structural_impls.rs
@@ -263,7 +263,7 @@ CloneTypeFoldableAndLiftImpls! {
263 ::rustc_span::symbol::Symbol, 263 ::rustc_span::symbol::Symbol,
264 ::rustc_hir::def::Res, 264 ::rustc_hir::def::Res,
265 ::rustc_hir::def_id::DefId, 265 ::rustc_hir::def_id::DefId,
266 ::rustc_hir::InlineAsmInner, 266 ::rustc_hir::LlvmInlineAsmInner,
267 ::rustc_hir::MatchSource, 267 ::rustc_hir::MatchSource,
268 ::rustc_hir::Mutability, 268 ::rustc_hir::Mutability,
269 ::rustc_hir::Unsafety, 269 ::rustc_hir::Unsafety,
diff --git a/src/librustc_ast/ast.rs b/src/librustc_ast/ast.rs
index 3e7fb0e..646294a 100644
--- a/src/librustc_ast/ast.rs
+++ b/src/librustc_ast/ast.rs
@@ -1114,7 +1114,7 @@ impl Expr {
1114 ExprKind::Break(..) => ExprPrecedence::Break, 1114 ExprKind::Break(..) => ExprPrecedence::Break,
1115 ExprKind::Continue(..) => ExprPrecedence::Continue, 1115 ExprKind::Continue(..) => ExprPrecedence::Continue,
1116 ExprKind::Ret(..) => ExprPrecedence::Ret, 1116 ExprKind::Ret(..) => ExprPrecedence::Ret,
1117 ExprKind::InlineAsm(..) => ExprPrecedence::InlineAsm, 1117 ExprKind::LlvmInlineAsm(..) => ExprPrecedence::InlineAsm,
1118 ExprKind::MacCall(..) => ExprPrecedence::Mac, 1118 ExprKind::MacCall(..) => ExprPrecedence::Mac,
1119 ExprKind::Struct(..) => ExprPrecedence::Struct, 1119 ExprKind::Struct(..) => ExprPrecedence::Struct,
1120 ExprKind::Repeat(..) => ExprPrecedence::Repeat, 1120 ExprKind::Repeat(..) => ExprPrecedence::Repeat,
@@ -1243,8 +1243,8 @@ pub enum ExprKind {
1243 /// A `return`, with an optional value to be returned. 1243 /// A `return`, with an optional value to be returned.
1244 Ret(Option<P<Expr>>), 1244 Ret(Option<P<Expr>>),
1245 1245
1246 /// Output of the `asm!()` macro. 1246 /// Output of the `llvm_asm!()` macro.
1247 InlineAsm(P<InlineAsm>), 1247 LlvmInlineAsm(P<LlvmInlineAsm>),
1248 1248
1249 /// A macro invocation; pre-expansion. 1249 /// A macro invocation; pre-expansion.
1250 MacCall(MacCall), 1250 MacCall(MacCall),
@@ -1860,37 +1860,37 @@ pub enum TraitObjectSyntax {
1860 1860
1861/// Inline assembly dialect. 1861/// Inline assembly dialect.
1862/// 1862///
1863/// E.g., `"intel"` as in `asm!("mov eax, 2" : "={eax}"(result) : : : "intel")`. 1863/// E.g., `"intel"` as in `llvm_asm!("mov eax, 2" : "={eax}"(result) : : : "intel")`.
1864#[derive(Clone, PartialEq, RustcEncodable, RustcDecodable, Debug, Copy, HashStable_Generic)] 1864#[derive(Clone, PartialEq, RustcEncodable, RustcDecodable, Debug, Copy, HashStable_Generic)]
1865pub enum AsmDialect { 1865pub enum LlvmAsmDialect {
1866 Att, 1866 Att,
1867 Intel, 1867 Intel,
1868} 1868}
1869 1869
1870/// Inline assembly. 1870/// LLVM-style inline assembly.
1871/// 1871///
1872/// E.g., `"={eax}"(result)` as in `asm!("mov eax, 2" : "={eax}"(result) : : : "intel")`. 1872/// E.g., `"={eax}"(result)` as in `llvm_asm!("mov eax, 2" : "={eax}"(result) : : : "intel")`.
1873#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] 1873#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
1874pub struct InlineAsmOutput { 1874pub struct LlvmInlineAsmOutput {
1875 pub constraint: Symbol, 1875 pub constraint: Symbol,
1876 pub expr: P<Expr>, 1876 pub expr: P<Expr>,
1877 pub is_rw: bool, 1877 pub is_rw: bool,
1878 pub is_indirect: bool, 1878 pub is_indirect: bool,
1879} 1879}
1880 1880
1881/// Inline assembly. 1881/// LLVM-style inline assembly.
1882/// 1882///
1883/// E.g., `asm!("NOP");`. 1883/// E.g., `llvm_asm!("NOP");`.
1884#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] 1884#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
1885pub struct InlineAsm { 1885pub struct LlvmInlineAsm {
1886 pub asm: Symbol, 1886 pub asm: Symbol,
1887 pub asm_str_style: StrStyle, 1887 pub asm_str_style: StrStyle,
1888 pub outputs: Vec<InlineAsmOutput>, 1888 pub outputs: Vec<LlvmInlineAsmOutput>,
1889 pub inputs: Vec<(Symbol, P<Expr>)>, 1889 pub inputs: Vec<(Symbol, P<Expr>)>,
1890 pub clobbers: Vec<Symbol>, 1890 pub clobbers: Vec<Symbol>,
1891 pub volatile: bool, 1891 pub volatile: bool,
1892 pub alignstack: bool, 1892 pub alignstack: bool,
1893 pub dialect: AsmDialect, 1893 pub dialect: LlvmAsmDialect,
1894} 1894}
1895 1895
1896/// A parameter in a function header. 1896/// A parameter in a function header.
diff --git a/src/librustc_ast/mut_visit.rs b/src/librustc_ast/mut_visit.rs
index aa2968b..67f7764 100644
--- a/src/librustc_ast/mut_visit.rs
+++ b/src/librustc_ast/mut_visit.rs
@@ -1202,8 +1202,8 @@ pub fn noop_visit_expr<T: MutVisitor>(Expr { kind, id, span, attrs }: &mut Expr,
1202 ExprKind::Ret(expr) => { 1202 ExprKind::Ret(expr) => {
1203 visit_opt(expr, |expr| vis.visit_expr(expr)); 1203 visit_opt(expr, |expr| vis.visit_expr(expr));
1204 } 1204 }
1205 ExprKind::InlineAsm(asm) => { 1205 ExprKind::LlvmInlineAsm(asm) => {
1206 let InlineAsm { 1206 let LlvmInlineAsm {
1207 asm: _, 1207 asm: _,
1208 asm_str_style: _, 1208 asm_str_style: _,
1209 outputs, 1209 outputs,
@@ -1214,7 +1214,7 @@ pub fn noop_visit_expr<T: MutVisitor>(Expr { kind, id, span, attrs }: &mut Expr,
1214 dialect: _, 1214 dialect: _,
1215 } = asm.deref_mut(); 1215 } = asm.deref_mut();
1216 for out in outputs { 1216 for out in outputs {
1217 let InlineAsmOutput { constraint: _, expr, is_rw: _, is_indirect: _ } = out; 1217 let LlvmInlineAsmOutput { constraint: _, expr, is_rw: _, is_indirect: _ } = out;
1218 vis.visit_expr(expr); 1218 vis.visit_expr(expr);
1219 } 1219 }
1220 visit_vec(inputs, |(_c, expr)| vis.visit_expr(expr)); 1220 visit_vec(inputs, |(_c, expr)| vis.visit_expr(expr));
diff --git a/src/librustc_ast/visit.rs b/src/librustc_ast/visit.rs
index 39028b7..cc2b1c4 100644
--- a/src/librustc_ast/visit.rs
+++ b/src/librustc_ast/visit.rs
@@ -813,7 +813,7 @@ pub fn walk_expr<'a, V: Visitor<'a>>(visitor: &mut V, expression: &'a Expr) {
813 } 813 }
814 ExprKind::MacCall(ref mac) => visitor.visit_mac(mac), 814 ExprKind::MacCall(ref mac) => visitor.visit_mac(mac),
815 ExprKind::Paren(ref subexpression) => visitor.visit_expr(subexpression), 815 ExprKind::Paren(ref subexpression) => visitor.visit_expr(subexpression),
816 ExprKind::InlineAsm(ref ia) => { 816 ExprKind::LlvmInlineAsm(ref ia) => {
817 for &(_, ref input) in &ia.inputs { 817 for &(_, ref input) in &ia.inputs {
818 visitor.visit_expr(input) 818 visitor.visit_expr(input)
819 } 819 }
diff --git a/src/librustc_ast_lowering/expr.rs b/src/librustc_ast_lowering/expr.rs
index 239dec9..9984eb4 100644
--- a/src/librustc_ast_lowering/expr.rs
+++ b/src/librustc_ast_lowering/expr.rs
@@ -159,7 +159,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
159 let e = e.as_ref().map(|x| self.lower_expr(x)); 159 let e = e.as_ref().map(|x| self.lower_expr(x));
160 hir::ExprKind::Ret(e) 160 hir::ExprKind::Ret(e)
161 } 161 }
162 ExprKind::InlineAsm(ref asm) => self.lower_expr_asm(asm), 162 ExprKind::LlvmInlineAsm(ref asm) => self.lower_expr_asm(asm),
163 ExprKind::Struct(ref path, ref fields, ref maybe_expr) => { 163 ExprKind::Struct(ref path, ref fields, ref maybe_expr) => {
164 let maybe_expr = maybe_expr.as_ref().map(|x| self.lower_expr(x)); 164 let maybe_expr = maybe_expr.as_ref().map(|x| self.lower_expr(x));
165 hir::ExprKind::Struct( 165 hir::ExprKind::Struct(
@@ -952,13 +952,13 @@ impl<'hir> LoweringContext<'_, 'hir> {
952 result 952 result
953 } 953 }
954 954
955 fn lower_expr_asm(&mut self, asm: &InlineAsm) -> hir::ExprKind<'hir> { 955 fn lower_expr_asm(&mut self, asm: &LlvmInlineAsm) -> hir::ExprKind<'hir> {
956 let inner = hir::InlineAsmInner { 956 let inner = hir::LlvmInlineAsmInner {
957 inputs: asm.inputs.iter().map(|&(c, _)| c).collect(), 957 inputs: asm.inputs.iter().map(|&(c, _)| c).collect(),
958 outputs: asm 958 outputs: asm
959 .outputs 959 .outputs
960 .iter() 960 .iter()
961 .map(|out| hir::InlineAsmOutput { 961 .map(|out| hir::LlvmInlineAsmOutput {
962 constraint: out.constraint, 962 constraint: out.constraint,
963 is_rw: out.is_rw, 963 is_rw: out.is_rw,
964 is_indirect: out.is_indirect, 964 is_indirect: out.is_indirect,
@@ -972,7 +972,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
972 alignstack: asm.alignstack, 972 alignstack: asm.alignstack,
973 dialect: asm.dialect, 973 dialect: asm.dialect,
974 }; 974 };
975 let hir_asm = hir::InlineAsm { 975 let hir_asm = hir::LlvmInlineAsm {
976 inner, 976 inner,
977 inputs_exprs: self.arena.alloc_from_iter( 977 inputs_exprs: self.arena.alloc_from_iter(
978 asm.inputs.iter().map(|&(_, ref input)| self.lower_expr_mut(input)), 978 asm.inputs.iter().map(|&(_, ref input)| self.lower_expr_mut(input)),
@@ -981,7 +981,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
981 .arena 981 .arena
982 .alloc_from_iter(asm.outputs.iter().map(|out| self.lower_expr_mut(&out.expr))), 982 .alloc_from_iter(asm.outputs.iter().map(|out| self.lower_expr_mut(&out.expr))),
983 }; 983 };
984 hir::ExprKind::InlineAsm(self.arena.alloc(hir_asm)) 984 hir::ExprKind::LlvmInlineAsm(self.arena.alloc(hir_asm))
985 } 985 }
986 986
987 fn lower_field(&mut self, f: &Field) -> hir::Field<'hir> { 987 fn lower_field(&mut self, f: &Field) -> hir::Field<'hir> {
diff --git a/src/librustc_ast_passes/ast_validation.rs b/src/librustc_ast_passes/ast_validation.rs
index d6d1153..885f2f9 100644
--- a/src/librustc_ast_passes/ast_validation.rs
+++ b/src/librustc_ast_passes/ast_validation.rs
@@ -716,12 +716,12 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
716 716
717 fn visit_expr(&mut self, expr: &'a Expr) { 717 fn visit_expr(&mut self, expr: &'a Expr) {
718 match &expr.kind { 718 match &expr.kind {
719 ExprKind::InlineAsm(..) if !self.session.target.target.options.allow_asm => { 719 ExprKind::LlvmInlineAsm(..) if !self.session.target.target.options.allow_asm => {
720 struct_span_err!( 720 struct_span_err!(
721 self.session, 721 self.session,
722 expr.span, 722 expr.span,
723 E0472, 723 E0472,
724 "asm! is unsupported on this target" 724 "llvm_asm! is unsupported on this target"
725 ) 725 )
726 .emit(); 726 .emit();
727 } 727 }
diff --git a/src/librustc_ast_pretty/pprust.rs b/src/librustc_ast_pretty/pprust.rs
index bb73e98..2d6932f 100644
--- a/src/librustc_ast_pretty/pprust.rs
+++ b/src/librustc_ast_pretty/pprust.rs
@@ -2024,8 +2024,8 @@ impl<'a> State<'a> {
2024 self.print_expr_maybe_paren(expr, parser::PREC_JUMP); 2024 self.print_expr_maybe_paren(expr, parser::PREC_JUMP);
2025 } 2025 }
2026 } 2026 }
2027 ast::ExprKind::InlineAsm(ref a) => { 2027 ast::ExprKind::LlvmInlineAsm(ref a) => {
2028 self.s.word("asm!"); 2028 self.s.word("llvm_asm!");
2029 self.popen(); 2029 self.popen();
2030 self.print_string(&a.asm.as_str(), a.asm_str_style); 2030 self.print_string(&a.asm.as_str(), a.asm_str_style);
2031 self.word_space(":"); 2031 self.word_space(":");
@@ -2066,7 +2066,7 @@ impl<'a> State<'a> {
2066 if a.alignstack { 2066 if a.alignstack {
2067 options.push("alignstack"); 2067 options.push("alignstack");
2068 } 2068 }
2069 if a.dialect == ast::AsmDialect::Intel { 2069 if a.dialect == ast::LlvmAsmDialect::Intel {
2070 options.push("intel"); 2070 options.push("intel");
2071 } 2071 }
2072 2072
diff --git a/src/librustc_builtin_macros/lib.rs b/src/librustc_builtin_macros/lib.rs
index 26a59c6..caed0bf 100644
--- a/src/librustc_builtin_macros/lib.rs
+++ b/src/librustc_builtin_macros/lib.rs
@@ -19,7 +19,6 @@ use rustc_expand::proc_macro::BangProcMacro;
19use rustc_span::edition::Edition; 19use rustc_span::edition::Edition;
20use rustc_span::symbol::sym; 20use rustc_span::symbol::sym;
21 21
22mod asm;
23mod assert; 22mod assert;
24mod cfg; 23mod cfg;
25mod cfg_accessible; 24mod cfg_accessible;
@@ -32,6 +31,7 @@ mod format;
32mod format_foreign; 31mod format_foreign;
33mod global_allocator; 32mod global_allocator;
34mod global_asm; 33mod global_asm;
34mod llvm_asm;
35mod log_syntax; 35mod log_syntax;
36mod source_util; 36mod source_util;
37mod test; 37mod test;
@@ -61,7 +61,7 @@ pub fn register_builtin_macros(resolver: &mut dyn Resolver, edition: Edition) {
61 } 61 }
62 62
63 register_bang! { 63 register_bang! {
64 asm: asm::expand_asm, 64 asm: llvm_asm::expand_llvm_asm,
65 assert: assert::expand_assert, 65 assert: assert::expand_assert,
66 cfg: cfg::expand_cfg, 66 cfg: cfg::expand_cfg,
67 column: source_util::expand_column, 67 column: source_util::expand_column,
@@ -77,6 +77,7 @@ pub fn register_builtin_macros(resolver: &mut dyn Resolver, edition: Edition) {
77 include_str: source_util::expand_include_str, 77 include_str: source_util::expand_include_str,
78 include: source_util::expand_include, 78 include: source_util::expand_include,
79 line: source_util::expand_line, 79 line: source_util::expand_line,
80 llvm_asm: llvm_asm::expand_llvm_asm,
80 log_syntax: log_syntax::expand_log_syntax, 81 log_syntax: log_syntax::expand_log_syntax,
81 module_path: source_util::expand_mod, 82 module_path: source_util::expand_mod,
82 option_env: env::expand_option_env, 83 option_env: env::expand_option_env,
diff --git a/src/librustc_builtin_macros/asm.rs b/src/librustc_builtin_macros/llvm_asm.rs
index 9811a66..88756f5 100644
--- a/src/librustc_builtin_macros/asm.rs
+++ b/src/librustc_builtin_macros/llvm_asm.rs
@@ -1,8 +1,8 @@
1// Inline assembly support. 1// Llvm-style inline assembly support.
2// 2//
3use State::*; 3use State::*;
4 4
5use rustc_ast::ast::{self, AsmDialect}; 5use rustc_ast::ast::{self, LlvmAsmDialect};
6use rustc_ast::ptr::P; 6use rustc_ast::ptr::P;
7use rustc_ast::token::{self, Token}; 7use rustc_ast::token::{self, Token};
8use rustc_ast::tokenstream::{self, TokenStream}; 8use rustc_ast::tokenstream::{self, TokenStream};
@@ -36,7 +36,7 @@ impl State {
36 36
37const OPTIONS: &[Symbol] = &[sym::volatile, sym::alignstack, sym::intel]; 37const OPTIONS: &[Symbol] = &[sym::volatile, sym::alignstack, sym::intel];
38 38
39pub fn expand_asm<'cx>( 39pub fn expand_llvm_asm<'cx>(
40 cx: &'cx mut ExtCtxt<'_>, 40 cx: &'cx mut ExtCtxt<'_>,
41 sp: Span, 41 sp: Span,
42 tts: TokenStream, 42 tts: TokenStream,
@@ -58,7 +58,7 @@ pub fn expand_asm<'cx>(
58 58
59 MacEager::expr(P(ast::Expr { 59 MacEager::expr(P(ast::Expr {
60 id: ast::DUMMY_NODE_ID, 60 id: ast::DUMMY_NODE_ID,
61 kind: ast::ExprKind::InlineAsm(P(inline_asm)), 61 kind: ast::ExprKind::LlvmInlineAsm(P(inline_asm)),
62 span: cx.with_def_site_ctxt(sp), 62 span: cx.with_def_site_ctxt(sp),
63 attrs: ast::AttrVec::new(), 63 attrs: ast::AttrVec::new(),
64 })) 64 }))
@@ -80,9 +80,9 @@ fn parse_inline_asm<'a>(
80 cx: &mut ExtCtxt<'a>, 80 cx: &mut ExtCtxt<'a>,
81 sp: Span, 81 sp: Span,
82 tts: TokenStream, 82 tts: TokenStream,
83) -> Result<Option<ast::InlineAsm>, DiagnosticBuilder<'a>> { 83) -> Result<Option<ast::LlvmInlineAsm>, DiagnosticBuilder<'a>> {
84 // Split the tts before the first colon, to avoid `asm!("x": y)` being 84 // Split the tts before the first colon, to avoid `llvm_asm!("x": y)` being
85 // parsed as `asm!(z)` with `z = "x": y` which is type ascription. 85 // parsed as `llvm_asm!(z)` with `z = "x": y` which is type ascription.
86 let first_colon = tts 86 let first_colon = tts
87 .trees() 87 .trees()
88 .position(|tt| match tt { 88 .position(|tt| match tt {
@@ -99,7 +99,7 @@ fn parse_inline_asm<'a>(
99 let mut clobs = Vec::new(); 99 let mut clobs = Vec::new();
100 let mut volatile = false; 100 let mut volatile = false;
101 let mut alignstack = false; 101 let mut alignstack = false;
102 let mut dialect = AsmDialect::Att; 102 let mut dialect = LlvmAsmDialect::Att;
103 103
104 let mut state = Asm; 104 let mut state = Asm;
105 105
@@ -183,7 +183,7 @@ fn parse_inline_asm<'a>(
183 183
184 let is_rw = output.is_some(); 184 let is_rw = output.is_some();
185 let is_indirect = constraint_str.contains('*'); 185 let is_indirect = constraint_str.contains('*');
186 outputs.push(ast::InlineAsmOutput { 186 outputs.push(ast::LlvmInlineAsmOutput {
187 constraint: output.unwrap_or(constraint), 187 constraint: output.unwrap_or(constraint),
188 expr, 188 expr,
189 is_rw, 189 is_rw,
@@ -257,7 +257,7 @@ fn parse_inline_asm<'a>(
257 } else if option == sym::alignstack { 257 } else if option == sym::alignstack {
258 alignstack = true; 258 alignstack = true;
259 } else if option == sym::intel { 259 } else if option == sym::intel {
260 dialect = AsmDialect::Intel; 260 dialect = LlvmAsmDialect::Intel;
261 } else { 261 } else {
262 cx.span_warn(p.prev_token.span, "unrecognized option"); 262 cx.span_warn(p.prev_token.span, "unrecognized option");
263 } 263 }
@@ -287,7 +287,7 @@ fn parse_inline_asm<'a>(
287 } 287 }
288 } 288 }
289 289
290 Ok(Some(ast::InlineAsm { 290 Ok(Some(ast::LlvmInlineAsm {
291 asm, 291 asm,
292 asm_str_style: asm_str_style.unwrap(), 292 asm_str_style: asm_str_style.unwrap(),
293 outputs, 293 outputs,
diff --git a/src/librustc_codegen_llvm/asm.rs b/src/librustc_codegen_llvm/asm.rs
index 6edc3d5..30bf3ce 100644
--- a/src/librustc_codegen_llvm/asm.rs
+++ b/src/librustc_codegen_llvm/asm.rs
@@ -14,9 +14,9 @@ use libc::{c_char, c_uint};
14use log::debug; 14use log::debug;
15 15
16impl AsmBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> { 16impl AsmBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> {
17 fn codegen_inline_asm( 17 fn codegen_llvm_inline_asm(
18 &mut self, 18 &mut self,
19 ia: &hir::InlineAsmInner, 19 ia: &hir::LlvmInlineAsmInner,
20 outputs: Vec<PlaceRef<'tcx, &'ll Value>>, 20 outputs: Vec<PlaceRef<'tcx, &'ll Value>>,
21 mut inputs: Vec<&'ll Value>, 21 mut inputs: Vec<&'ll Value>,
22 span: Span, 22 span: Span,
@@ -138,7 +138,7 @@ fn inline_asm_call(
138 output: &'ll llvm::Type, 138 output: &'ll llvm::Type,
139 volatile: bool, 139 volatile: bool,
140 alignstack: bool, 140 alignstack: bool,
141 dia: ::rustc_ast::ast::AsmDialect, 141 dia: ::rustc_ast::ast::LlvmAsmDialect,
142) -> Option<&'ll Value> { 142) -> Option<&'ll Value> {
143 let volatile = if volatile { llvm::True } else { llvm::False }; 143 let volatile = if volatile { llvm::True } else { llvm::False };
144 let alignstack = if alignstack { llvm::True } else { llvm::False }; 144 let alignstack = if alignstack { llvm::True } else { llvm::False };
diff --git a/src/librustc_codegen_llvm/llvm/ffi.rs b/src/librustc_codegen_llvm/llvm/ffi.rs
index 69881e2..1d61d95 100644
--- a/src/librustc_codegen_llvm/llvm/ffi.rs
+++ b/src/librustc_codegen_llvm/llvm/ffi.rs
@@ -389,10 +389,10 @@ pub enum AsmDialect {
389} 389}
390 390
391impl AsmDialect { 391impl AsmDialect {
392 pub fn from_generic(asm: rustc_ast::ast::AsmDialect) -> Self { 392 pub fn from_generic(asm: rustc_ast::ast::LlvmAsmDialect) -> Self {
393 match asm { 393 match asm {
394 rustc_ast::ast::AsmDialect::Att => AsmDialect::Att, 394 rustc_ast::ast::LlvmAsmDialect::Att => AsmDialect::Att,
395 rustc_ast::ast::AsmDialect::Intel => AsmDialect::Intel, 395 rustc_ast::ast::LlvmAsmDialect::Intel => AsmDialect::Intel,
396 } 396 }
397 } 397 }
398} 398}
diff --git a/src/librustc_codegen_ssa/mir/statement.rs b/src/librustc_codegen_ssa/mir/statement.rs
index e68b41a..5edd9b9 100644
--- a/src/librustc_codegen_ssa/mir/statement.rs
+++ b/src/librustc_codegen_ssa/mir/statement.rs
@@ -66,7 +66,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
66 } 66 }
67 bx 67 bx
68 } 68 }
69 mir::StatementKind::InlineAsm(ref asm) => { 69 mir::StatementKind::LlvmInlineAsm(ref asm) => {
70 let outputs = asm 70 let outputs = asm
71 .outputs 71 .outputs
72 .iter() 72 .iter()
@@ -93,7 +93,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
93 ); 93 );
94 94
95 if input_vals.len() == asm.inputs.len() { 95 if input_vals.len() == asm.inputs.len() {
96 let res = bx.codegen_inline_asm( 96 let res = bx.codegen_llvm_inline_asm(
97 &asm.asm, 97 &asm.asm,
98 outputs, 98 outputs,
99 input_vals, 99 input_vals,
diff --git a/src/librustc_codegen_ssa/traits/asm.rs b/src/librustc_codegen_ssa/traits/asm.rs
index d31b063..1cdfd3a 100644
--- a/src/librustc_codegen_ssa/traits/asm.rs
+++ b/src/librustc_codegen_ssa/traits/asm.rs
@@ -1,13 +1,13 @@
1use super::BackendTypes; 1use super::BackendTypes;
2use crate::mir::place::PlaceRef; 2use crate::mir::place::PlaceRef;
3use rustc_hir::{GlobalAsm, InlineAsmInner}; 3use rustc_hir::{GlobalAsm, LlvmInlineAsmInner};
4use rustc_span::Span; 4use rustc_span::Span;
5 5
6pub trait AsmBuilderMethods<'tcx>: BackendTypes { 6pub trait AsmBuilderMethods<'tcx>: BackendTypes {
7 /// Take an inline assembly expression and splat it out via LLVM 7 /// Take an inline assembly expression and splat it out via LLVM
8 fn codegen_inline_asm( 8 fn codegen_llvm_inline_asm(
9 &mut self, 9 &mut self,
10 ia: &InlineAsmInner, 10 ia: &LlvmInlineAsmInner,
11 outputs: Vec<PlaceRef<'tcx, Self::Value>>, 11 outputs: Vec<PlaceRef<'tcx, Self::Value>>,
12 inputs: Vec<Self::Value>, 12 inputs: Vec<Self::Value>,
13 span: Span, 13 span: Span,
diff --git a/src/librustc_error_codes/error_codes.rs b/src/librustc_error_codes/error_codes.rs
index fdcf3d6..fe68e9e 100644
--- a/src/librustc_error_codes/error_codes.rs
+++ b/src/librustc_error_codes/error_codes.rs
@@ -541,7 +541,7 @@ E0751: include_str!("./error_codes/E0751.md"),
541// E0467, removed 541// E0467, removed
542// E0470, removed 542// E0470, removed
543// E0471, // constant evaluation error (in pattern) 543// E0471, // constant evaluation error (in pattern)
544 E0472, // asm! is unsupported on this target 544 E0472, // llvm_asm! is unsupported on this target
545 E0473, // dereference of reference outside its lifetime 545 E0473, // dereference of reference outside its lifetime
546 E0474, // captured variable `..` does not outlive the enclosing closure 546 E0474, // captured variable `..` does not outlive the enclosing closure
547 E0475, // index of slice outside its lifetime 547 E0475, // index of slice outside its lifetime
diff --git a/src/librustc_error_codes/error_codes/E0660.md b/src/librustc_error_codes/error_codes/E0660.md
index 1894591..732de6a 100644
--- a/src/librustc_error_codes/error_codes/E0660.md
+++ b/src/librustc_error_codes/error_codes/E0660.md
@@ -1,9 +1,9 @@
1The argument to the `asm` macro is not well-formed. 1The argument to the `llvm_asm` macro is not well-formed.
2 2
3Erroneous code example: 3Erroneous code example:
4 4
5```compile_fail,E0660 5```compile_fail,E0660
6asm!("nop" "nop"); 6llvm_asm!("nop" "nop");
7``` 7```
8 8
9Considering that this would be a long explanation, we instead recommend you 9Considering that this would be a long explanation, we instead recommend you
diff --git a/src/librustc_error_codes/error_codes/E0661.md b/src/librustc_error_codes/error_codes/E0661.md
index b171ada..3d5cd90 100644
--- a/src/librustc_error_codes/error_codes/E0661.md
+++ b/src/librustc_error_codes/error_codes/E0661.md
@@ -1,10 +1,10 @@
1An invalid syntax was passed to the second argument of an `asm` macro line. 1An invalid syntax was passed to the second argument of an `llvm_asm` macro line.
2 2
3Erroneous code example: 3Erroneous code example:
4 4
5```compile_fail,E0661 5```compile_fail,E0661
6let a; 6let a;
7asm!("nop" : "r"(a)); 7llvm_asm!("nop" : "r"(a));
8``` 8```
9 9
10Considering that this would be a long explanation, we instead recommend you 10Considering that this would be a long explanation, we instead recommend you
diff --git a/src/librustc_error_codes/error_codes/E0662.md b/src/librustc_error_codes/error_codes/E0662.md
index c15e736..9858abd 100644
--- a/src/librustc_error_codes/error_codes/E0662.md
+++ b/src/librustc_error_codes/error_codes/E0662.md
@@ -1,12 +1,13 @@
1An invalid input operand constraint was passed to the `asm` macro (third line). 1An invalid input operand constraint was passed to the `llvm_asm` macro
2(third line).
2 3
3Erroneous code example: 4Erroneous code example:
4 5
5```compile_fail,E0662 6```compile_fail,E0662
6asm!("xor %eax, %eax" 7llvm_asm!("xor %eax, %eax"
7 : 8 :
8 : "=test"("a") 9 : "=test"("a")
9 ); 10 );
10``` 11```
11 12
12Considering that this would be a long explanation, we instead recommend you 13Considering that this would be a long explanation, we instead recommend you
diff --git a/src/librustc_error_codes/error_codes/E0663.md b/src/librustc_error_codes/error_codes/E0663.md
index bd45023..36b87be 100644
--- a/src/librustc_error_codes/error_codes/E0663.md
+++ b/src/librustc_error_codes/error_codes/E0663.md
@@ -1,12 +1,13 @@
1An invalid input operand constraint was passed to the `asm` macro (third line). 1An invalid input operand constraint was passed to the `llvm_asm` macro
2(third line).
2 3
3Erroneous code example: 4Erroneous code example:
4 5
5```compile_fail,E0663 6```compile_fail,E0663
6asm!("xor %eax, %eax" 7llvm_asm!("xor %eax, %eax"
7 : 8 :
8 : "+test"("a") 9 : "+test"("a")
9 ); 10 );
10``` 11```
11 12
12Considering that this would be a long explanation, we instead recommend you 13Considering that this would be a long explanation, we instead recommend you
diff --git a/src/librustc_error_codes/error_codes/E0664.md b/src/librustc_error_codes/error_codes/E0664.md
index 768ffdf..33924b1 100644
--- a/src/librustc_error_codes/error_codes/E0664.md
+++ b/src/librustc_error_codes/error_codes/E0664.md
@@ -1,13 +1,13 @@
1A clobber was surrounded by braces in the `asm` macro. 1A clobber was surrounded by braces in the `llvm_asm` macro.
2 2
3Erroneous code example: 3Erroneous code example:
4 4
5```compile_fail,E0664 5```compile_fail,E0664
6asm!("mov $$0x200, %eax" 6llvm_asm!("mov $$0x200, %eax"
7 : 7 :
8 : 8 :
9 : "{eax}" 9 : "{eax}"
10 ); 10 );
11``` 11```
12 12
13Considering that this would be a long explanation, we instead recommend you 13Considering that this would be a long explanation, we instead recommend you
diff --git a/src/librustc_error_codes/error_codes/E0668.md b/src/librustc_error_codes/error_codes/E0668.md
index f5d2624..3b43a1b 100644
--- a/src/librustc_error_codes/error_codes/E0668.md
+++ b/src/librustc_error_codes/error_codes/E0668.md
@@ -7,12 +7,12 @@ assembly call.
7In particular, it can happen if you forgot the closing bracket of a register 7In particular, it can happen if you forgot the closing bracket of a register
8constraint (see issue #51430): 8constraint (see issue #51430):
9```compile_fail,E0668 9```compile_fail,E0668
10#![feature(asm)] 10#![feature(llvm_asm)]
11 11
12fn main() { 12fn main() {
13 let rax: u64; 13 let rax: u64;
14 unsafe { 14 unsafe {
15 asm!("" :"={rax"(rax)); 15 llvm_asm!("" :"={rax"(rax));
16 println!("Accumulator is: {}", rax); 16 println!("Accumulator is: {}", rax);
17 } 17 }
18} 18}
diff --git a/src/librustc_hir/arena.rs b/src/librustc_hir/arena.rs
index 978565a..b8a691d 100644
--- a/src/librustc_hir/arena.rs
+++ b/src/librustc_hir/arena.rs
@@ -28,7 +28,7 @@ macro_rules! arena_types {
28 [] fn_decl: rustc_hir::FnDecl<$tcx>, 28 [] fn_decl: rustc_hir::FnDecl<$tcx>,
29 [] foreign_item: rustc_hir::ForeignItem<$tcx>, 29 [] foreign_item: rustc_hir::ForeignItem<$tcx>,
30 [] impl_item_ref: rustc_hir::ImplItemRef<$tcx>, 30 [] impl_item_ref: rustc_hir::ImplItemRef<$tcx>,
31 [] inline_asm: rustc_hir::InlineAsm<$tcx>, 31 [] inline_asm: rustc_hir::LlvmInlineAsm<$tcx>,
32 [] local: rustc_hir::Local<$tcx>, 32 [] local: rustc_hir::Local<$tcx>,
33 [few] macro_def: rustc_hir::MacroDef<$tcx>, 33 [few] macro_def: rustc_hir::MacroDef<$tcx>,
34 [] param: rustc_hir::Param<$tcx>, 34 [] param: rustc_hir::Param<$tcx>,
diff --git a/src/librustc_hir/hir.rs b/src/librustc_hir/hir.rs
index 2054759..b719d57 100644
--- a/src/librustc_hir/hir.rs
+++ b/src/librustc_hir/hir.rs
@@ -3,7 +3,7 @@ use crate::def_id::DefId;
3crate use crate::hir_id::HirId; 3crate use crate::hir_id::HirId;
4use crate::itemlikevisit; 4use crate::itemlikevisit;
5 5
6use rustc_ast::ast::{self, AsmDialect, CrateSugar, Ident, Name}; 6use rustc_ast::ast::{self, CrateSugar, Ident, LlvmAsmDialect, Name};
7use rustc_ast::ast::{AttrVec, Attribute, FloatTy, IntTy, Label, LitKind, StrStyle, UintTy}; 7use rustc_ast::ast::{AttrVec, Attribute, FloatTy, IntTy, Label, LitKind, StrStyle, UintTy};
8pub use rustc_ast::ast::{BorrowKind, ImplPolarity, IsAuto}; 8pub use rustc_ast::ast::{BorrowKind, ImplPolarity, IsAuto};
9pub use rustc_ast::ast::{CaptureBy, Movability, Mutability}; 9pub use rustc_ast::ast::{CaptureBy, Movability, Mutability};
@@ -1344,7 +1344,7 @@ impl Expr<'_> {
1344 ExprKind::Break(..) => ExprPrecedence::Break, 1344 ExprKind::Break(..) => ExprPrecedence::Break,
1345 ExprKind::Continue(..) => ExprPrecedence::Continue, 1345 ExprKind::Continue(..) => ExprPrecedence::Continue,
1346 ExprKind::Ret(..) => ExprPrecedence::Ret, 1346 ExprKind::Ret(..) => ExprPrecedence::Ret,
1347 ExprKind::InlineAsm(..) => ExprPrecedence::InlineAsm, 1347 ExprKind::LlvmInlineAsm(..) => ExprPrecedence::InlineAsm,
1348 ExprKind::Struct(..) => ExprPrecedence::Struct, 1348 ExprKind::Struct(..) => ExprPrecedence::Struct,
1349 ExprKind::Repeat(..) => ExprPrecedence::Repeat, 1349 ExprKind::Repeat(..) => ExprPrecedence::Repeat,
1350 ExprKind::Yield(..) => ExprPrecedence::Yield, 1350 ExprKind::Yield(..) => ExprPrecedence::Yield,
@@ -1399,7 +1399,7 @@ impl Expr<'_> {
1399 | ExprKind::Ret(..) 1399 | ExprKind::Ret(..)
1400 | ExprKind::Loop(..) 1400 | ExprKind::Loop(..)
1401 | ExprKind::Assign(..) 1401 | ExprKind::Assign(..)
1402 | ExprKind::InlineAsm(..) 1402 | ExprKind::LlvmInlineAsm(..)
1403 | ExprKind::AssignOp(..) 1403 | ExprKind::AssignOp(..)
1404 | ExprKind::Lit(_) 1404 | ExprKind::Lit(_)
1405 | ExprKind::Unary(..) 1405 | ExprKind::Unary(..)
@@ -1575,8 +1575,8 @@ pub enum ExprKind<'hir> {
1575 /// A `return`, with an optional value to be returned. 1575 /// A `return`, with an optional value to be returned.
1576 Ret(Option<&'hir Expr<'hir>>), 1576 Ret(Option<&'hir Expr<'hir>>),
1577 1577
1578 /// Inline assembly (from `asm!`), with its outputs and inputs. 1578 /// Inline assembly (from `llvm_asm!`), with its outputs and inputs.
1579 InlineAsm(&'hir InlineAsm<'hir>), 1579 LlvmInlineAsm(&'hir LlvmInlineAsm<'hir>),
1580 1580
1581 /// A struct or struct-like variant literal expression. 1581 /// A struct or struct-like variant literal expression.
1582 /// 1582 ///
@@ -1999,7 +1999,7 @@ pub enum TyKind<'hir> {
1999} 1999}
2000 2000
2001#[derive(Copy, Clone, RustcEncodable, RustcDecodable, Debug, HashStable_Generic, PartialEq)] 2001#[derive(Copy, Clone, RustcEncodable, RustcDecodable, Debug, HashStable_Generic, PartialEq)]
2002pub struct InlineAsmOutput { 2002pub struct LlvmInlineAsmOutput {
2003 pub constraint: Symbol, 2003 pub constraint: Symbol,
2004 pub is_rw: bool, 2004 pub is_rw: bool,
2005 pub is_indirect: bool, 2005 pub is_indirect: bool,
@@ -2009,20 +2009,20 @@ pub struct InlineAsmOutput {
2009// NOTE(eddyb) This is used within MIR as well, so unlike the rest of the HIR, 2009// NOTE(eddyb) This is used within MIR as well, so unlike the rest of the HIR,
2010// it needs to be `Clone` and use plain `Vec<T>` instead of arena-allocated slice. 2010// it needs to be `Clone` and use plain `Vec<T>` instead of arena-allocated slice.
2011#[derive(Clone, RustcEncodable, RustcDecodable, Debug, HashStable_Generic, PartialEq)] 2011#[derive(Clone, RustcEncodable, RustcDecodable, Debug, HashStable_Generic, PartialEq)]
2012pub struct InlineAsmInner { 2012pub struct LlvmInlineAsmInner {
2013 pub asm: Symbol, 2013 pub asm: Symbol,
2014 pub asm_str_style: StrStyle, 2014 pub asm_str_style: StrStyle,
2015 pub outputs: Vec<InlineAsmOutput>, 2015 pub outputs: Vec<LlvmInlineAsmOutput>,
2016 pub inputs: Vec<Symbol>, 2016 pub inputs: Vec<Symbol>,
2017 pub clobbers: Vec<Symbol>, 2017 pub clobbers: Vec<Symbol>,
2018 pub volatile: bool, 2018 pub volatile: bool,
2019 pub alignstack: bool, 2019 pub alignstack: bool,
2020 pub dialect: AsmDialect, 2020 pub dialect: LlvmAsmDialect,
2021} 2021}
2022 2022
2023#[derive(RustcEncodable, RustcDecodable, Debug, HashStable_Generic)] 2023#[derive(RustcEncodable, RustcDecodable, Debug, HashStable_Generic)]
2024pub struct InlineAsm<'hir> { 2024pub struct LlvmInlineAsm<'hir> {
2025 pub inner: InlineAsmInner, 2025 pub inner: LlvmInlineAsmInner,
2026 pub outputs_exprs: &'hir [Expr<'hir>], 2026 pub outputs_exprs: &'hir [Expr<'hir>],
2027 pub inputs_exprs: &'hir [Expr<'hir>], 2027 pub inputs_exprs: &'hir [Expr<'hir>],
2028} 2028}
diff --git a/src/librustc_hir/intravisit.rs b/src/librustc_hir/intravisit.rs
index 08b4ef1..5a763e4 100644
--- a/src/librustc_hir/intravisit.rs
+++ b/src/librustc_hir/intravisit.rs
@@ -1156,7 +1156,7 @@ pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr<'v>)
1156 ExprKind::Ret(ref optional_expression) => { 1156 ExprKind::Ret(ref optional_expression) => {
1157 walk_list!(visitor, visit_expr, optional_expression); 1157 walk_list!(visitor, visit_expr, optional_expression);
1158 } 1158 }
1159 ExprKind::InlineAsm(ref asm) => { 1159 ExprKind::LlvmInlineAsm(ref asm) => {
1160 walk_list!(visitor, visit_expr, asm.outputs_exprs); 1160 walk_list!(visitor, visit_expr, asm.outputs_exprs);
1161 walk_list!(visitor, visit_expr, asm.inputs_exprs); 1161 walk_list!(visitor, visit_expr, asm.inputs_exprs);
1162 } 1162 }
diff --git a/src/librustc_hir_pretty/lib.rs b/src/librustc_hir_pretty/lib.rs
index 88b1288..f30af78 100644
--- a/src/librustc_hir_pretty/lib.rs
+++ b/src/librustc_hir_pretty/lib.rs
@@ -1407,9 +1407,9 @@ impl<'a> State<'a> {
1407 self.print_expr_maybe_paren(&expr, parser::PREC_JUMP); 1407 self.print_expr_maybe_paren(&expr, parser::PREC_JUMP);
1408 } 1408 }
1409 } 1409 }
1410 hir::ExprKind::InlineAsm(ref a) => { 1410 hir::ExprKind::LlvmInlineAsm(ref a) => {
1411 let i = &a.inner; 1411 let i = &a.inner;
1412 self.s.word("asm!"); 1412 self.s.word("llvm_asm!");
1413 self.popen(); 1413 self.popen();
1414 self.print_string(&i.asm.as_str(), i.asm_str_style); 1414 self.print_string(&i.asm.as_str(), i.asm_str_style);
1415 self.word_space(":"); 1415 self.word_space(":");
@@ -1454,7 +1454,7 @@ impl<'a> State<'a> {
1454 if i.alignstack { 1454 if i.alignstack {
1455 options.push("alignstack"); 1455 options.push("alignstack");
1456 } 1456 }
1457 if i.dialect == ast::AsmDialect::Intel { 1457 if i.dialect == ast::LlvmAsmDialect::Intel {
1458 options.push("intel"); 1458 options.push("intel");
1459 } 1459 }
1460 1460
diff --git a/src/librustc_mir/borrow_check/invalidation.rs b/src/librustc_mir/borrow_check/invalidation.rs
index d33639a..3d1768c 100644
--- a/src/librustc_mir/borrow_check/invalidation.rs
+++ b/src/librustc_mir/borrow_check/invalidation.rs
@@ -68,7 +68,7 @@ impl<'cx, 'tcx> Visitor<'tcx> for InvalidationGenerator<'cx, 'tcx> {
68 StatementKind::SetDiscriminant { ref place, variant_index: _ } => { 68 StatementKind::SetDiscriminant { ref place, variant_index: _ } => {
69 self.mutate_place(location, place, Shallow(None), JustWrite); 69 self.mutate_place(location, place, Shallow(None), JustWrite);
70 } 70 }
71 StatementKind::InlineAsm(ref asm) => { 71 StatementKind::LlvmInlineAsm(ref asm) => {
72 for (o, output) in asm.asm.outputs.iter().zip(asm.outputs.iter()) { 72 for (o, output) in asm.asm.outputs.iter().zip(asm.outputs.iter()) {
73 if o.is_indirect { 73 if o.is_indirect {
74 // FIXME(eddyb) indirect inline asm outputs should 74 // FIXME(eddyb) indirect inline asm outputs should
diff --git a/src/librustc_mir/borrow_check/mod.rs b/src/librustc_mir/borrow_check/mod.rs
index 882c6bd..e3dc9e0 100644
--- a/src/librustc_mir/borrow_check/mod.rs
+++ b/src/librustc_mir/borrow_check/mod.rs
@@ -550,7 +550,7 @@ impl<'cx, 'tcx> dataflow::ResultsVisitor<'cx, 'tcx> for MirBorrowckCtxt<'cx, 'tc
550 StatementKind::SetDiscriminant { ref place, variant_index: _ } => { 550 StatementKind::SetDiscriminant { ref place, variant_index: _ } => {
551 self.mutate_place(location, (place, span), Shallow(None), JustWrite, flow_state); 551 self.mutate_place(location, (place, span), Shallow(None), JustWrite, flow_state);
552 } 552 }
553 StatementKind::InlineAsm(ref asm) => { 553 StatementKind::LlvmInlineAsm(ref asm) => {
554 for (o, output) in asm.asm.outputs.iter().zip(asm.outputs.iter()) { 554 for (o, output) in asm.asm.outputs.iter().zip(asm.outputs.iter()) {
555 if o.is_indirect { 555 if o.is_indirect {
556 // FIXME(eddyb) indirect inline asm outputs should 556 // FIXME(eddyb) indirect inline asm outputs should
diff --git a/src/librustc_mir/borrow_check/type_check/mod.rs b/src/librustc_mir/borrow_check/type_check/mod.rs
index 02f6bca..54ca0c6 100644
--- a/src/librustc_mir/borrow_check/type_check/mod.rs
+++ b/src/librustc_mir/borrow_check/type_check/mod.rs
@@ -1529,7 +1529,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
1529 StatementKind::FakeRead(..) 1529 StatementKind::FakeRead(..)
1530 | StatementKind::StorageLive(..) 1530 | StatementKind::StorageLive(..)
1531 | StatementKind::StorageDead(..) 1531 | StatementKind::StorageDead(..)
1532 | StatementKind::InlineAsm { .. } 1532 | StatementKind::LlvmInlineAsm { .. }
1533 | StatementKind::Retag { .. } 1533 | StatementKind::Retag { .. }
1534 | StatementKind::Nop => {} 1534 | StatementKind::Nop => {}
1535 } 1535 }
diff --git a/src/librustc_mir/dataflow/impls/borrows.rs b/src/librustc_mir/dataflow/impls/borrows.rs
index 9e9e414..d25d3a9 100644
--- a/src/librustc_mir/dataflow/impls/borrows.rs
+++ b/src/librustc_mir/dataflow/impls/borrows.rs
@@ -289,7 +289,7 @@ impl<'tcx> dataflow::GenKillAnalysis<'tcx> for Borrows<'_, 'tcx> {
289 self.kill_borrows_on_place(trans, &Place::from(local)); 289 self.kill_borrows_on_place(trans, &Place::from(local));
290 } 290 }
291 291
292 mir::StatementKind::InlineAsm(ref asm) => { 292 mir::StatementKind::LlvmInlineAsm(ref asm) => {
293 for (output, kind) in asm.outputs.iter().zip(&asm.asm.outputs) { 293 for (output, kind) in asm.outputs.iter().zip(&asm.asm.outputs) {
294 if !kind.is_indirect && !kind.is_rw { 294 if !kind.is_indirect && !kind.is_rw {
295 self.kill_borrows_on_place(trans, output); 295 self.kill_borrows_on_place(trans, output);
diff --git a/src/librustc_mir/dataflow/impls/storage_liveness.rs b/src/librustc_mir/dataflow/impls/storage_liveness.rs
index f8d1efa..67d024e 100644
--- a/src/librustc_mir/dataflow/impls/storage_liveness.rs
+++ b/src/librustc_mir/dataflow/impls/storage_liveness.rs
@@ -124,7 +124,7 @@ impl<'mir, 'tcx> dataflow::GenKillAnalysis<'tcx> for MaybeRequiresStorage<'mir,
124 | StatementKind::SetDiscriminant { box place, .. } => { 124 | StatementKind::SetDiscriminant { box place, .. } => {
125 trans.gen(place.local); 125 trans.gen(place.local);
126 } 126 }
127 StatementKind::InlineAsm(asm) => { 127 StatementKind::LlvmInlineAsm(asm) => {
128 for place in &*asm.outputs { 128 for place in &*asm.outputs {
129 trans.gen(place.local); 129 trans.gen(place.local);
130 } 130 }
diff --git a/src/librustc_mir/dataflow/move_paths/builder.rs b/src/librustc_mir/dataflow/move_paths/builder.rs
index 276aabe..8061765 100644
--- a/src/librustc_mir/dataflow/move_paths/builder.rs
+++ b/src/librustc_mir/dataflow/move_paths/builder.rs
@@ -295,7 +295,7 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, 'tcx> {
295 StatementKind::FakeRead(_, ref place) => { 295 StatementKind::FakeRead(_, ref place) => {
296 self.create_move_path(place); 296 self.create_move_path(place);
297 } 297 }
298 StatementKind::InlineAsm(ref asm) => { 298 StatementKind::LlvmInlineAsm(ref asm) => {
299 for (output, kind) in asm.outputs.iter().zip(&asm.asm.outputs) { 299 for (output, kind) in asm.outputs.iter().zip(&asm.asm.outputs) {
300 if !kind.is_indirect { 300 if !kind.is_indirect {
301 self.gather_init(output.as_ref(), InitKind::Deep); 301 self.gather_init(output.as_ref(), InitKind::Deep);
diff --git a/src/librustc_mir/interpret/step.rs b/src/librustc_mir/interpret/step.rs
index 6ec11d4..01446c1 100644
--- a/src/librustc_mir/interpret/step.rs
+++ b/src/librustc_mir/interpret/step.rs
@@ -124,7 +124,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
124 // size of MIR constantly. 124 // size of MIR constantly.
125 Nop => {} 125 Nop => {}
126 126
127 InlineAsm { .. } => throw_unsup_format!("inline assembly is not supported"), 127 LlvmInlineAsm { .. } => throw_unsup_format!("inline assembly is not supported"),
128 } 128 }
129 129
130 self.stack[frame_idx].stmt += 1; 130 self.stack[frame_idx].stmt += 1;
diff --git a/src/librustc_mir/transform/check_consts/validation.rs b/src/librustc_mir/transform/check_consts/validation.rs
index 7f4714e..c315a8a 100644
--- a/src/librustc_mir/transform/check_consts/validation.rs
+++ b/src/librustc_mir/transform/check_consts/validation.rs
@@ -488,7 +488,7 @@ impl Visitor<'tcx> for Validator<'_, 'mir, 'tcx> {
488 StatementKind::FakeRead(..) 488 StatementKind::FakeRead(..)
489 | StatementKind::StorageLive(_) 489 | StatementKind::StorageLive(_)
490 | StatementKind::StorageDead(_) 490 | StatementKind::StorageDead(_)
491 | StatementKind::InlineAsm { .. } 491 | StatementKind::LlvmInlineAsm { .. }
492 | StatementKind::Retag { .. } 492 | StatementKind::Retag { .. }
493 | StatementKind::AscribeUserType(..) 493 | StatementKind::AscribeUserType(..)
494 | StatementKind::Nop => {} 494 | StatementKind::Nop => {}
diff --git a/src/librustc_mir/transform/check_unsafety.rs b/src/librustc_mir/transform/check_unsafety.rs
index 3ba60e6..7d5f286 100644
--- a/src/librustc_mir/transform/check_unsafety.rs
+++ b/src/librustc_mir/transform/check_unsafety.rs
@@ -106,7 +106,7 @@ impl<'a, 'tcx> Visitor<'tcx> for UnsafetyChecker<'a, 'tcx> {
106 // safe (at least as emitted during MIR construction) 106 // safe (at least as emitted during MIR construction)
107 } 107 }
108 108
109 StatementKind::InlineAsm { .. } => self.require_unsafe( 109 StatementKind::LlvmInlineAsm { .. } => self.require_unsafe(
110 "use of inline assembly", 110 "use of inline assembly",
111 "inline assembly is entirely unchecked and can cause undefined behavior", 111 "inline assembly is entirely unchecked and can cause undefined behavior",
112 UnsafetyViolationKind::General, 112 UnsafetyViolationKind::General,
diff --git a/src/librustc_mir/transform/qualify_min_const_fn.rs b/src/librustc_mir/transform/qualify_min_const_fn.rs
index 5a99ee2..b2d21d7 100644
--- a/src/librustc_mir/transform/qualify_min_const_fn.rs
+++ b/src/librustc_mir/transform/qualify_min_const_fn.rs
@@ -230,7 +230,7 @@ fn check_statement(
230 // just an assignment 230 // just an assignment
231 StatementKind::SetDiscriminant { place, .. } => check_place(tcx, place, span, def_id, body), 231 StatementKind::SetDiscriminant { place, .. } => check_place(tcx, place, span, def_id, body),
232 232
233 StatementKind::InlineAsm { .. } => { 233 StatementKind::LlvmInlineAsm { .. } => {
234 Err((span, "cannot use inline assembly in const fn".into())) 234 Err((span, "cannot use inline assembly in const fn".into()))
235 } 235 }
236 236
diff --git a/src/librustc_mir/transform/remove_noop_landing_pads.rs b/src/librustc_mir/transform/remove_noop_landing_pads.rs
index 7ac9ecc..91f8b7b 100644
--- a/src/librustc_mir/transform/remove_noop_landing_pads.rs
+++ b/src/librustc_mir/transform/remove_noop_landing_pads.rs
@@ -52,7 +52,7 @@ impl RemoveNoopLandingPads {
52 52
53 StatementKind::Assign { .. } 53 StatementKind::Assign { .. }
54 | StatementKind::SetDiscriminant { .. } 54 | StatementKind::SetDiscriminant { .. }
55 | StatementKind::InlineAsm { .. } 55 | StatementKind::LlvmInlineAsm { .. }
56 | StatementKind::Retag { .. } => { 56 | StatementKind::Retag { .. } => {
57 return false; 57 return false;
58 } 58 }
diff --git a/src/librustc_mir/transform/simplify_try.rs b/src/librustc_mir/transform/simplify_try.rs
index 3f28f03..1c5f676 100644
--- a/src/librustc_mir/transform/simplify_try.rs
+++ b/src/librustc_mir/transform/simplify_try.rs
@@ -172,7 +172,7 @@ impl<'tcx> MirPass<'tcx> for SimplifyBranchSame {
172 // so we cannot assume that the `unreachable` terminator itself is reachable. 172 // so we cannot assume that the `unreachable` terminator itself is reachable.
173 // FIXME(Centril): use a normalization pass instead of a check. 173 // FIXME(Centril): use a normalization pass instead of a check.
174 || bb.statements.iter().any(|stmt| match stmt.kind { 174 || bb.statements.iter().any(|stmt| match stmt.kind {
175 StatementKind::InlineAsm(..) => true, 175 StatementKind::LlvmInlineAsm(..) => true,
176 _ => false, 176 _ => false,
177 }) 177 })
178 }) 178 })
diff --git a/src/librustc_mir/transform/unreachable_prop.rs b/src/librustc_mir/transform/unreachable_prop.rs
index 27173e0..c5c84ac 100644
--- a/src/librustc_mir/transform/unreachable_prop.rs
+++ b/src/librustc_mir/transform/unreachable_prop.rs
@@ -29,7 +29,7 @@ impl MirPass<'_> for UnreachablePropagation {
29 // Accompanying testcases: mir-opt/unreachable_asm.rs and mir-opt/unreachable_asm_2.rs 29 // Accompanying testcases: mir-opt/unreachable_asm.rs and mir-opt/unreachable_asm_2.rs
30 let asm_stmt_in_block = || { 30 let asm_stmt_in_block = || {
31 bb_data.statements.iter().any(|stmt: &Statement<'_>| match stmt.kind { 31 bb_data.statements.iter().any(|stmt: &Statement<'_>| match stmt.kind {
32 StatementKind::InlineAsm(..) => true, 32 StatementKind::LlvmInlineAsm(..) => true,
33 _ => false, 33 _ => false,
34 }) 34 })
35 }; 35 };
diff --git a/src/librustc_mir_build/build/expr/as_place.rs b/src/librustc_mir_build/build/expr/as_place.rs
index d77cc49..8fa7bc7 100644
--- a/src/librustc_mir_build/build/expr/as_place.rs
+++ b/src/librustc_mir_build/build/expr/as_place.rs
@@ -255,7 +255,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
255 | ExprKind::Return { .. } 255 | ExprKind::Return { .. }
256 | ExprKind::Literal { .. } 256 | ExprKind::Literal { .. }
257 | ExprKind::StaticRef { .. } 257 | ExprKind::StaticRef { .. }
258 | ExprKind::InlineAsm { .. } 258 | ExprKind::LlvmInlineAsm { .. }
259 | ExprKind::Yield { .. } 259 | ExprKind::Yield { .. }
260 | ExprKind::Call { .. } => { 260 | ExprKind::Call { .. } => {
261 // these are not places, so we need to make a temporary. 261 // these are not places, so we need to make a temporary.
diff --git a/src/librustc_mir_build/build/expr/as_rvalue.rs b/src/librustc_mir_build/build/expr/as_rvalue.rs
index dc97f32..4c7ff50 100644
--- a/src/librustc_mir_build/build/expr/as_rvalue.rs
+++ b/src/librustc_mir_build/build/expr/as_rvalue.rs
@@ -251,7 +251,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
251 | ExprKind::Break { .. } 251 | ExprKind::Break { .. }
252 | ExprKind::Continue { .. } 252 | ExprKind::Continue { .. }
253 | ExprKind::Return { .. } 253 | ExprKind::Return { .. }
254 | ExprKind::InlineAsm { .. } 254 | ExprKind::LlvmInlineAsm { .. }
255 | ExprKind::PlaceTypeAscription { .. } 255 | ExprKind::PlaceTypeAscription { .. }
256 | ExprKind::ValueTypeAscription { .. } => { 256 | ExprKind::ValueTypeAscription { .. } => {
257 // these do not have corresponding `Rvalue` variants, 257 // these do not have corresponding `Rvalue` variants,
diff --git a/src/librustc_mir_build/build/expr/category.rs b/src/librustc_mir_build/build/expr/category.rs
index cc139de..f8cae20 100644
--- a/src/librustc_mir_build/build/expr/category.rs
+++ b/src/librustc_mir_build/build/expr/category.rs
@@ -64,7 +64,7 @@ impl Category {
64 | ExprKind::Repeat { .. } 64 | ExprKind::Repeat { .. }
65 | ExprKind::Assign { .. } 65 | ExprKind::Assign { .. }
66 | ExprKind::AssignOp { .. } 66 | ExprKind::AssignOp { .. }
67 | ExprKind::InlineAsm { .. } => Some(Category::Rvalue(RvalueFunc::AsRvalue)), 67 | ExprKind::LlvmInlineAsm { .. } => Some(Category::Rvalue(RvalueFunc::AsRvalue)),
68 68
69 ExprKind::Literal { .. } | ExprKind::StaticRef { .. } => Some(Category::Constant), 69 ExprKind::Literal { .. } | ExprKind::StaticRef { .. } => Some(Category::Constant),
70 70
diff --git a/src/librustc_mir_build/build/expr/into.rs b/src/librustc_mir_build/build/expr/into.rs
index 4583e24..62158d3 100644
--- a/src/librustc_mir_build/build/expr/into.rs
+++ b/src/librustc_mir_build/build/expr/into.rs
@@ -328,7 +328,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
328 | ExprKind::AssignOp { .. } 328 | ExprKind::AssignOp { .. }
329 | ExprKind::Continue { .. } 329 | ExprKind::Continue { .. }
330 | ExprKind::Break { .. } 330 | ExprKind::Break { .. }
331 | ExprKind::InlineAsm { .. } 331 | ExprKind::LlvmInlineAsm { .. }
332 | ExprKind::Return { .. } => { 332 | ExprKind::Return { .. } => {
333 unpack!(block = this.stmt_expr(block, expr, None)); 333 unpack!(block = this.stmt_expr(block, expr, None));
334 this.cfg.push_assign_unit(block, source_info, destination); 334 this.cfg.push_assign_unit(block, source_info, destination);
diff --git a/src/librustc_mir_build/build/expr/stmt.rs b/src/librustc_mir_build/build/expr/stmt.rs
index 882c5e8..1dc530a 100644
--- a/src/librustc_mir_build/build/expr/stmt.rs
+++ b/src/librustc_mir_build/build/expr/stmt.rs
@@ -96,8 +96,8 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
96 ExprKind::Return { value } => { 96 ExprKind::Return { value } => {
97 this.break_scope(block, value, BreakableTarget::Return, source_info) 97 this.break_scope(block, value, BreakableTarget::Return, source_info)
98 } 98 }
99 ExprKind::InlineAsm { asm, outputs, inputs } => { 99 ExprKind::LlvmInlineAsm { asm, outputs, inputs } => {
100 debug!("stmt_expr InlineAsm block_context.push(SubExpr) : {:?}", expr2); 100 debug!("stmt_expr LlvmInlineAsm block_context.push(SubExpr) : {:?}", expr2);
101 this.block_context.push(BlockFrame::SubExpr); 101 this.block_context.push(BlockFrame::SubExpr);
102 let outputs = outputs 102 let outputs = outputs
103 .into_iter() 103 .into_iter()
@@ -115,7 +115,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
115 block, 115 block,
116 Statement { 116 Statement {
117 source_info, 117 source_info,
118 kind: StatementKind::InlineAsm(box InlineAsm { 118 kind: StatementKind::LlvmInlineAsm(box LlvmInlineAsm {
119 asm: asm.clone(), 119 asm: asm.clone(),
120 outputs, 120 outputs,
121 inputs, 121 inputs,
diff --git a/src/librustc_mir_build/hair/cx/expr.rs b/src/librustc_mir_build/hair/cx/expr.rs
index 9f93b81..ba17e2a 100644
--- a/src/librustc_mir_build/hair/cx/expr.rs
+++ b/src/librustc_mir_build/hair/cx/expr.rs
@@ -398,7 +398,7 @@ fn make_mirror_unadjusted<'a, 'tcx>(
398 convert_path_expr(cx, expr, res) 398 convert_path_expr(cx, expr, res)
399 } 399 }
400 400
401 hir::ExprKind::InlineAsm(ref asm) => ExprKind::InlineAsm { 401 hir::ExprKind::LlvmInlineAsm(ref asm) => ExprKind::LlvmInlineAsm {
402 asm: &asm.inner, 402 asm: &asm.inner,
403 outputs: asm.outputs_exprs.to_ref(), 403 outputs: asm.outputs_exprs.to_ref(),
404 inputs: asm.inputs_exprs.to_ref(), 404 inputs: asm.inputs_exprs.to_ref(),
diff --git a/src/librustc_mir_build/hair/mod.rs b/src/librustc_mir_build/hair/mod.rs
index 7704224..ed60c79 100644
--- a/src/librustc_mir_build/hair/mod.rs
+++ b/src/librustc_mir_build/hair/mod.rs
@@ -277,8 +277,8 @@ crate enum ExprKind<'tcx> {
277 literal: &'tcx Const<'tcx>, 277 literal: &'tcx Const<'tcx>,
278 def_id: DefId, 278 def_id: DefId,
279 }, 279 },
280 InlineAsm { 280 LlvmInlineAsm {
281 asm: &'tcx hir::InlineAsmInner, 281 asm: &'tcx hir::LlvmInlineAsmInner,
282 outputs: Vec<ExprRef<'tcx>>, 282 outputs: Vec<ExprRef<'tcx>>,
283 inputs: Vec<ExprRef<'tcx>>, 283 inputs: Vec<ExprRef<'tcx>>,
284 }, 284 },
diff --git a/src/librustc_passes/liveness.rs b/src/librustc_passes/liveness.rs
index e729c2d..5df15a6 100644
--- a/src/librustc_passes/liveness.rs
+++ b/src/librustc_passes/liveness.rs
@@ -532,7 +532,7 @@ fn visit_expr<'tcx>(ir: &mut IrMaps<'tcx>, expr: &'tcx Expr<'tcx>) {
532 | hir::ExprKind::AssignOp(..) 532 | hir::ExprKind::AssignOp(..)
533 | hir::ExprKind::Struct(..) 533 | hir::ExprKind::Struct(..)
534 | hir::ExprKind::Repeat(..) 534 | hir::ExprKind::Repeat(..)
535 | hir::ExprKind::InlineAsm(..) 535 | hir::ExprKind::LlvmInlineAsm(..)
536 | hir::ExprKind::Box(..) 536 | hir::ExprKind::Box(..)
537 | hir::ExprKind::Yield(..) 537 | hir::ExprKind::Yield(..)
538 | hir::ExprKind::Type(..) 538 | hir::ExprKind::Type(..)
@@ -1177,7 +1177,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
1177 | hir::ExprKind::Yield(ref e, _) 1177 | hir::ExprKind::Yield(ref e, _)
1178 | hir::ExprKind::Repeat(ref e, _) => self.propagate_through_expr(&e, succ), 1178 | hir::ExprKind::Repeat(ref e, _) => self.propagate_through_expr(&e, succ),
1179 1179
1180 hir::ExprKind::InlineAsm(ref asm) => { 1180 hir::ExprKind::LlvmInlineAsm(ref asm) => {
1181 let ia = &asm.inner; 1181 let ia = &asm.inner;
1182 let outputs = asm.outputs_exprs; 1182 let outputs = asm.outputs_exprs;
1183 let inputs = asm.inputs_exprs; 1183 let inputs = asm.inputs_exprs;
@@ -1398,7 +1398,7 @@ fn check_expr<'tcx>(this: &mut Liveness<'_, 'tcx>, expr: &'tcx Expr<'tcx>) {
1398 } 1398 }
1399 } 1399 }
1400 1400
1401 hir::ExprKind::InlineAsm(ref asm) => { 1401 hir::ExprKind::LlvmInlineAsm(ref asm) => {
1402 for input in asm.inputs_exprs { 1402 for input in asm.inputs_exprs {
1403 this.visit_expr(input); 1403 this.visit_expr(input);
1404 } 1404 }
diff --git a/src/librustc_span/symbol.rs b/src/librustc_span/symbol.rs
index bb41629..54b404e 100644
--- a/src/librustc_span/symbol.rs
+++ b/src/librustc_span/symbol.rs
@@ -424,6 +424,7 @@ symbols! {
424 LintPass, 424 LintPass,
425 lint_reasons, 425 lint_reasons,
426 literal, 426 literal,
427 llvm_asm,
427 local_inner_macros, 428 local_inner_macros,
428 log_syntax, 429 log_syntax,
429 loop_break_value, 430 loop_break_value,
diff --git a/src/librustc_typeck/check/expr.rs b/src/librustc_typeck/check/expr.rs
index 53a20d9..8cd6f7b 100644
--- a/src/librustc_typeck/check/expr.rs
+++ b/src/librustc_typeck/check/expr.rs
@@ -230,7 +230,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
230 self.check_expr_addr_of(kind, mutbl, oprnd, expected, expr) 230 self.check_expr_addr_of(kind, mutbl, oprnd, expected, expr)
231 } 231 }
232 ExprKind::Path(ref qpath) => self.check_expr_path(qpath, expr), 232 ExprKind::Path(ref qpath) => self.check_expr_path(qpath, expr),
233 ExprKind::InlineAsm(ref asm) => { 233 ExprKind::LlvmInlineAsm(ref asm) => {
234 for expr in asm.outputs_exprs.iter().chain(asm.inputs_exprs.iter()) { 234 for expr in asm.outputs_exprs.iter().chain(asm.inputs_exprs.iter()) {
235 self.check_expr(expr); 235 self.check_expr(expr);
236 } 236 }
diff --git a/src/librustc_typeck/expr_use_visitor.rs b/src/librustc_typeck/expr_use_visitor.rs
index a45d8ce..4eb6a6b 100644
--- a/src/librustc_typeck/expr_use_visitor.rs
+++ b/src/librustc_typeck/expr_use_visitor.rs
@@ -220,7 +220,7 @@ impl<'a, 'tcx> ExprUseVisitor<'a, 'tcx> {
220 self.borrow_expr(&base, bk); 220 self.borrow_expr(&base, bk);
221 } 221 }
222 222
223 hir::ExprKind::InlineAsm(ref ia) => { 223 hir::ExprKind::LlvmInlineAsm(ref ia) => {
224 for (o, output) in ia.inner.outputs.iter().zip(ia.outputs_exprs) { 224 for (o, output) in ia.inner.outputs.iter().zip(ia.outputs_exprs) {
225 if o.is_indirect { 225 if o.is_indirect {
226 self.consume_expr(output); 226 self.consume_expr(output);
diff --git a/src/librustc_typeck/mem_categorization.rs b/src/librustc_typeck/mem_categorization.rs
index 7d8bf71..e76c677 100644
--- a/src/librustc_typeck/mem_categorization.rs
+++ b/src/librustc_typeck/mem_categorization.rs
@@ -405,7 +405,7 @@ impl<'a, 'tcx> MemCategorizationContext<'a, 'tcx> {
405 | hir::ExprKind::Continue(..) 405 | hir::ExprKind::Continue(..)
406 | hir::ExprKind::Struct(..) 406 | hir::ExprKind::Struct(..)
407 | hir::ExprKind::Repeat(..) 407 | hir::ExprKind::Repeat(..)
408 | hir::ExprKind::InlineAsm(..) 408 | hir::ExprKind::LlvmInlineAsm(..)
409 | hir::ExprKind::Box(..) 409 | hir::ExprKind::Box(..)
410 | hir::ExprKind::Err => Ok(self.cat_rvalue(expr.hir_id, expr.span, expr_ty)), 410 | hir::ExprKind::Err => Ok(self.cat_rvalue(expr.hir_id, expr.span, expr_ty)),
411 } 411 }
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index d411052..09bc183 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -274,6 +274,7 @@
274#![feature(libc)] 274#![feature(libc)]
275#![feature(link_args)] 275#![feature(link_args)]
276#![feature(linkage)] 276#![feature(linkage)]
277#![feature(llvm_asm)]
277#![feature(log_syntax)] 278#![feature(log_syntax)]
278#![feature(maybe_uninit_ref)] 279#![feature(maybe_uninit_ref)]
279#![feature(maybe_uninit_slice)] 280#![feature(maybe_uninit_slice)]
@@ -533,29 +534,9 @@ pub use core::{
533// Re-export built-in macros defined through libcore. 534// Re-export built-in macros defined through libcore.
534#[stable(feature = "builtin_macro_prelude", since = "1.38.0")] 535#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
535pub use core::{ 536pub use core::{
536 // Unstable 537 asm, assert, cfg, column, compile_error, concat, concat_idents, env, file, format_args,
537 asm, 538 format_args_nl, global_asm, include, include_bytes, include_str, line, llvm_asm, log_syntax,
538 // Stable 539 module_path, option_env, stringify, trace_macros,
539 assert,
540 cfg,
541 column,
542 compile_error,
543 concat,
544 concat_idents,
545 env,
546 file,
547 format_args,
548 format_args_nl,
549 global_asm,
550 include,
551 include_bytes,
552 include_str,
553 line,
554 log_syntax,
555 module_path,
556 option_env,
557 stringify,
558 trace_macros,
559}; 540};
560 541
561#[stable(feature = "core_primitive", since = "1.43.0")] 542#[stable(feature = "core_primitive", since = "1.43.0")]
diff --git a/src/libstd/prelude/v1.rs b/src/libstd/prelude/v1.rs
index 6712f5b..03686d7 100644
--- a/src/libstd/prelude/v1.rs
+++ b/src/libstd/prelude/v1.rs
@@ -39,8 +39,8 @@ pub use crate::result::Result::{self, Err, Ok};
39#[doc(no_inline)] 39#[doc(no_inline)]
40pub use core::prelude::v1::{ 40pub use core::prelude::v1::{
41 asm, assert, cfg, column, compile_error, concat, concat_idents, env, file, format_args, 41 asm, assert, cfg, column, compile_error, concat, concat_idents, env, file, format_args,
42 format_args_nl, global_asm, include, include_bytes, include_str, line, log_syntax, module_path, 42 format_args_nl, global_asm, include, include_bytes, include_str, line, llvm_asm, log_syntax,
43 option_env, stringify, trace_macros, 43 module_path, option_env, stringify, trace_macros,
44}; 44};
45 45
46// FIXME: Attribute and derive macros are not documented because for them rustdoc generates 46// FIXME: Attribute and derive macros are not documented because for them rustdoc generates
diff --git a/src/libstd/sys/sgx/abi/mem.rs b/src/libstd/sys/sgx/abi/mem.rs
index 500e62b..57fd7ef 100644
--- a/src/libstd/sys/sgx/abi/mem.rs
+++ b/src/libstd/sys/sgx/abi/mem.rs
@@ -22,7 +22,7 @@ extern "C" {
22#[unstable(feature = "sgx_platform", issue = "56975")] 22#[unstable(feature = "sgx_platform", issue = "56975")]
23pub fn image_base() -> u64 { 23pub fn image_base() -> u64 {
24 let base; 24 let base;
25 unsafe { asm!("lea IMAGE_BASE(%rip),$0":"=r"(base)) }; 25 unsafe { llvm_asm!("lea IMAGE_BASE(%rip),$0":"=r"(base)) };
26 base 26 base
27} 27}
28 28
diff --git a/src/libstd/sys/sgx/ext/arch.rs b/src/libstd/sys/sgx/ext/arch.rs
index 5056e38..0c97a87 100644
--- a/src/libstd/sys/sgx/ext/arch.rs
+++ b/src/libstd/sys/sgx/ext/arch.rs
@@ -31,7 +31,7 @@ pub fn egetkey(request: &Align512<[u8; 512]>) -> Result<Align16<[u8; 16]>, u32>
31 let mut out = MaybeUninit::uninit(); 31 let mut out = MaybeUninit::uninit();
32 let error; 32 let error;
33 33
34 asm!( 34 llvm_asm!(
35 "enclu" 35 "enclu"
36 : "={eax}"(error) 36 : "={eax}"(error)
37 : "{eax}"(ENCLU_EGETKEY), 37 : "{eax}"(ENCLU_EGETKEY),
@@ -60,7 +60,7 @@ pub fn ereport(
60 unsafe { 60 unsafe {
61 let mut report = MaybeUninit::uninit(); 61 let mut report = MaybeUninit::uninit();
62 62
63 asm!( 63 llvm_asm!(
64 "enclu" 64 "enclu"
65 : /* no output registers */ 65 : /* no output registers */
66 : "{eax}"(ENCLU_EREPORT), 66 : "{eax}"(ENCLU_EREPORT),
diff --git a/src/libstd/sys/windows/mod.rs b/src/libstd/sys/windows/mod.rs
index b004cd1..74dd41f 100644
--- a/src/libstd/sys/windows/mod.rs
+++ b/src/libstd/sys/windows/mod.rs
@@ -267,7 +267,7 @@ pub fn dur2timeout(dur: Duration) -> c::DWORD {
267pub unsafe fn abort_internal() -> ! { 267pub unsafe fn abort_internal() -> ! {
268 #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] 268 #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
269 { 269 {
270 asm!("int $$0x29" :: "{ecx}"(7) ::: volatile); // 7 is FAST_FAIL_FATAL_APP_EXIT 270 llvm_asm!("int $$0x29" :: "{ecx}"(7) ::: volatile); // 7 is FAST_FAIL_FATAL_APP_EXIT
271 crate::intrinsics::unreachable(); 271 crate::intrinsics::unreachable();
272 } 272 }
273 crate::intrinsics::abort(); 273 crate::intrinsics::abort();
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs
index 55f9df9..933b647 100644
--- a/src/libtest/lib.rs
+++ b/src/libtest/lib.rs
@@ -20,7 +20,6 @@
20#![crate_name = "test"] 20#![crate_name = "test"]
21#![unstable(feature = "test", issue = "50297")] 21#![unstable(feature = "test", issue = "50297")]
22#![doc(html_root_url = "https://doc.rust-lang.org/nightly/", test(attr(deny(warnings))))] 22#![doc(html_root_url = "https://doc.rust-lang.org/nightly/", test(attr(deny(warnings))))]
23#![feature(asm)]
24#![cfg_attr(any(unix, target_os = "cloudabi"), feature(libc))] 23#![cfg_attr(any(unix, target_os = "cloudabi"), feature(libc))]
25#![feature(rustc_private)] 24#![feature(rustc_private)]
26#![feature(nll)] 25#![feature(nll)]
diff --git a/src/test/codegen/no-output-asm-is-volatile.rs b/src/test/codegen/no-output-asm-is-volatile.rs
index 47b38d2..4037621 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 @@
1// compile-flags: -O 1// compile-flags: -O
2 2
3#![feature(asm)] 3#![feature(llvm_asm)]
4#![crate_type = "lib"] 4#![crate_type = "lib"]
5 5
6// Check that inline assembly expressions without any outputs 6// Check that inline assembly expressions without any outputs
@@ -9,6 +9,6 @@
9// CHECK-LABEL: @assembly 9// CHECK-LABEL: @assembly
10#[no_mangle] 10#[no_mangle]
11pub fn assembly() { 11pub fn assembly() {
12 unsafe { asm!("") } 12 unsafe { llvm_asm!("") }
13// CHECK: tail call void asm sideeffect "", {{.*}} 13// CHECK: tail call void asm sideeffect "", {{.*}}
14} 14}
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 798eb32..c9415ae 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 @@
3// compile-flags: -C codegen-units=2 3// compile-flags: -C codegen-units=2
4// ignore-emscripten 4// ignore-emscripten
5 5
6#![feature(asm)] 6#![feature(llvm_asm)]
7 7
8fn main() { 8fn main() {
9 unsafe { 9 unsafe {
10 asm!("nowayisthisavalidinstruction"); //~ ERROR instruction 10 llvm_asm!("nowayisthisavalidinstruction"); //~ ERROR instruction
11 } 11 }
12} 12}
diff --git a/src/test/compile-fail/asm-src-loc.rs b/src/test/compile-fail/asm-src-loc.rs
index 0b60256..7c87f37 100644
--- a/src/test/compile-fail/asm-src-loc.rs
+++ b/src/test/compile-fail/asm-src-loc.rs
@@ -1,9 +1,9 @@
1// ignore-emscripten 1// ignore-emscripten
2 2
3#![feature(asm)] 3#![feature(llvm_asm)]
4 4
5fn main() { 5fn main() {
6 unsafe { 6 unsafe {
7 asm!("nowayisthisavalidinstruction"); //~ ERROR instruction 7 llvm_asm!("nowayisthisavalidinstruction"); //~ ERROR instruction
8 } 8 }
9} 9}
diff --git a/src/test/incremental/hashes/inline_asm.rs b/src/test/incremental/hashes/inline_asm.rs
index fb3c637..3eaffc4 100644
--- a/src/test/incremental/hashes/inline_asm.rs
+++ b/src/test/incremental/hashes/inline_asm.rs
@@ -11,7 +11,7 @@
11 11
12#![allow(warnings)] 12#![allow(warnings)]
13#![feature(rustc_attrs)] 13#![feature(rustc_attrs)]
14#![feature(asm)] 14#![feature(llvm_asm)]
15#![crate_type="rlib"] 15#![crate_type="rlib"]
16 16
17 17
@@ -22,12 +22,12 @@
22pub fn change_template(a: i32) -> i32 { 22pub fn change_template(a: i32) -> i32 {
23 let c: i32; 23 let c: i32;
24 unsafe { 24 unsafe {
25 asm!("add 1, $0" 25 llvm_asm!("add 1, $0"
26 : "=r"(c) 26 : "=r"(c)
27 : "0"(a) 27 : "0"(a)
28 : 28 :
29 : 29 :
30 ); 30 );
31 } 31 }
32 c 32 c
33} 33}
@@ -39,12 +39,12 @@ pub fn change_template(a: i32) -> i32 {
39pub fn change_template(a: i32) -> i32 { 39pub fn change_template(a: i32) -> i32 {
40 let c: i32; 40 let c: i32;
41 unsafe { 41 unsafe {
42 asm!("add 2, $0" 42 llvm_asm!("add 2, $0"
43 : "=r"(c) 43 : "=r"(c)
44 : "0"(a) 44 : "0"(a)
45 : 45 :
46 : 46 :
47 ); 47 );
48 } 48 }
49 c 49 c
50} 50}
@@ -58,12 +58,12 @@ pub fn change_output(a: i32) -> i32 {
58 let mut _out1: i32 = 0; 58 let mut _out1: i32 = 0;
59 let mut _out2: i32 = 0; 59 let mut _out2: i32 = 0;
60 unsafe { 60 unsafe {
61 asm!("add 1, $0" 61 llvm_asm!("add 1, $0"
62 : "=r"(_out1) 62 : "=r"(_out1)
63 : "0"(a) 63 : "0"(a)
64 : 64 :
65 : 65 :
66 ); 66 );
67 } 67 }
68 _out1 68 _out1
69} 69}
@@ -76,12 +76,12 @@ pub fn change_output(a: i32) -> i32 {
76 let mut _out1: i32 = 0; 76 let mut _out1: i32 = 0;
77 let mut _out2: i32 = 0; 77 let mut _out2: i32 = 0;
78 unsafe { 78 unsafe {
79 asm!("add 1, $0" 79 llvm_asm!("add 1, $0"
80 : "=r"(_out2) 80 : "=r"(_out2)
81 : "0"(a) 81 : "0"(a)
82 : 82 :
83 : 83 :
84 ); 84 );
85 } 85 }
86 _out1 86 _out1
87} 87}
@@ -94,12 +94,12 @@ pub fn change_output(a: i32) -> i32 {
94pub fn change_input(_a: i32, _b: i32) -> i32 { 94pub fn change_input(_a: i32, _b: i32) -> i32 {
95 let _out; 95 let _out;
96 unsafe { 96 unsafe {
97 asm!("add 1, $0" 97 llvm_asm!("add 1, $0"
98 : "=r"(_out) 98 : "=r"(_out)
99 : "0"(_a) 99 : "0"(_a)
100 : 100 :
101 : 101 :
102 ); 102 );
103 } 103 }
104 _out 104 _out
105} 105}
@@ -111,12 +111,12 @@ pub fn change_input(_a: i32, _b: i32) -> i32 {
111pub fn change_input(_a: i32, _b: i32) -> i32 { 111pub fn change_input(_a: i32, _b: i32) -> i32 {
112 let _out; 112 let _out;
113 unsafe { 113 unsafe {
114 asm!("add 1, $0" 114 llvm_asm!("add 1, $0"
115 : "=r"(_out) 115 : "=r"(_out)
116 : "0"(_b) 116 : "0"(_b)
117 : 117 :
118 : 118 :
119 ); 119 );
120 } 120 }
121 _out 121 _out
122} 122}
@@ -129,12 +129,12 @@ pub fn change_input(_a: i32, _b: i32) -> i32 {
129pub fn change_input_constraint(_a: i32, _b: i32) -> i32 { 129pub fn change_input_constraint(_a: i32, _b: i32) -> i32 {
130 let _out; 130 let _out;
131 unsafe { 131 unsafe {
132 asm!("add 1, $0" 132 llvm_asm!("add 1, $0"
133 : "=r"(_out) 133 : "=r"(_out)
134 : "0"(_a), "r"(_b) 134 : "0"(_a), "r"(_b)
135 : 135 :
136 : 136 :
137 ); 137 );
138 } 138 }
139 _out 139 _out
140} 140}
@@ -146,12 +146,12 @@ pub fn change_input_constraint(_a: i32, _b: i32) -> i32 {
146pub fn change_input_constraint(_a: i32, _b: i32) -> i32 { 146pub fn change_input_constraint(_a: i32, _b: i32) -> i32 {
147 let _out; 147 let _out;
148 unsafe { 148 unsafe {
149 asm!("add 1, $0" 149 llvm_asm!("add 1, $0"
150 : "=r"(_out) 150 : "=r"(_out)
151 : "r"(_a), "0"(_b) 151 : "r"(_a), "0"(_b)
152 : 152 :
153 : 153 :
154 ); 154 );
155 } 155 }
156 _out 156 _out
157} 157}
@@ -164,12 +164,12 @@ pub fn change_input_constraint(_a: i32, _b: i32) -> i32 {
164pub fn change_clobber(_a: i32) -> i32 { 164pub fn change_clobber(_a: i32) -> i32 {
165 let _out; 165 let _out;
166 unsafe { 166 unsafe {
167 asm!("add 1, $0" 167 llvm_asm!("add 1, $0"
168 : "=r"(_out) 168 : "=r"(_out)
169 : "0"(_a) 169 : "0"(_a)
170 : 170 :
171 : 171 :
172 ); 172 );
173 } 173 }
174 _out 174 _out
175} 175}
@@ -181,12 +181,12 @@ pub fn change_clobber(_a: i32) -> i32 {
181pub fn change_clobber(_a: i32) -> i32 { 181pub fn change_clobber(_a: i32) -> i32 {
182 let _out; 182 let _out;
183 unsafe { 183 unsafe {
184 asm!("add 1, $0" 184 llvm_asm!("add 1, $0"
185 : "=r"(_out) 185 : "=r"(_out)
186 : "0"(_a) 186 : "0"(_a)
187 : "eax" 187 : "eax"
188 : 188 :
189 ); 189 );
190 } 190 }
191 _out 191 _out
192} 192}
@@ -199,12 +199,12 @@ pub fn change_clobber(_a: i32) -> i32 {
199pub fn change_options(_a: i32) -> i32 { 199pub fn change_options(_a: i32) -> i32 {
200 let _out; 200 let _out;
201 unsafe { 201 unsafe {
202 asm!("add 1, $0" 202 llvm_asm!("add 1, $0"
203 : "=r"(_out) 203 : "=r"(_out)
204 : "0"(_a) 204 : "0"(_a)
205 : 205 :
206 : 206 :
207 ); 207 );
208 } 208 }
209 _out 209 _out
210} 210}
@@ -216,12 +216,12 @@ pub fn change_options(_a: i32) -> i32 {
216pub fn change_options(_a: i32) -> i32 { 216pub fn change_options(_a: i32) -> i32 {
217 let _out; 217 let _out;
218 unsafe { 218 unsafe {
219 asm!("add 1, $0" 219 llvm_asm!("add 1, $0"
220 : "=r"(_out) 220 : "=r"(_out)
221 : "0"(_a) 221 : "0"(_a)
222 : 222 :
223 : "volatile" 223 : "volatile"
224 ); 224 );
225 } 225 }
226 _out 226 _out
227} 227}
diff --git a/src/test/mir-opt/unreachable_asm.rs b/src/test/mir-opt/unreachable_asm.rs
index ca614ac..9901416 100644
--- a/src/test/mir-opt/unreachable_asm.rs
+++ b/src/test/mir-opt/unreachable_asm.rs
@@ -1,5 +1,5 @@
1// ignore-tidy-linelength 1// ignore-tidy-linelength
2#![feature(asm)] 2#![feature(llvm_asm)]
3 3
4enum Empty {} 4enum Empty {}
5 5
@@ -18,7 +18,7 @@ fn main() {
18 } 18 }
19 19
20 // asm instruction stops unreachable propagation to if else blocks bb4 and bb5. 20 // asm instruction stops unreachable propagation to if else blocks bb4 and bb5.
21 unsafe { asm!("NOP"); } 21 unsafe { llvm_asm!("NOP"); }
22 match _x { } 22 match _x { }
23 } 23 }
24} 24}
@@ -39,7 +39,7 @@ fn main() {
39// StorageDead(_6); 39// StorageDead(_6);
40// StorageDead(_5); 40// StorageDead(_5);
41// StorageLive(_7); 41// StorageLive(_7);
42// asm!(InlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []); 42// llvm_asm!(LlvmInlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []);
43// _7 = (); 43// _7 = ();
44// StorageDead(_7); 44// StorageDead(_7);
45// StorageLive(_8); 45// StorageLive(_8);
@@ -62,7 +62,7 @@ fn main() {
62// StorageDead(_6); 62// StorageDead(_6);
63// StorageDead(_5); 63// StorageDead(_5);
64// StorageLive(_7); 64// StorageLive(_7);
65// asm!(InlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []); 65// llvm_asm!(LlvmInlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []);
66// _7 = (); 66// _7 = ();
67// StorageDead(_7); 67// StorageDead(_7);
68// StorageLive(_8); 68// StorageLive(_8);
diff --git a/src/test/mir-opt/unreachable_asm_2.rs b/src/test/mir-opt/unreachable_asm_2.rs
index 8fdbcfb..0851e24 100644
--- a/src/test/mir-opt/unreachable_asm_2.rs
+++ b/src/test/mir-opt/unreachable_asm_2.rs
@@ -1,5 +1,5 @@
1// ignore-tidy-linelength 1// ignore-tidy-linelength
2#![feature(asm)] 2#![feature(llvm_asm)]
3 3
4enum Empty {} 4enum Empty {}
5 5
@@ -13,11 +13,11 @@ fn main() {
13 13
14 if true { 14 if true {
15 // asm instruction stops unreachable propagation to block bb3. 15 // asm instruction stops unreachable propagation to block bb3.
16 unsafe { asm!("NOP"); } 16 unsafe { llvm_asm!("NOP"); }
17 _y = 21; 17 _y = 21;
18 } else { 18 } else {
19 // asm instruction stops unreachable propagation to block bb3. 19 // asm instruction stops unreachable propagation to block bb3.
20 unsafe { asm!("NOP"); } 20 unsafe { llvm_asm!("NOP"); }
21 _y = 42; 21 _y = 42;
22 } 22 }
23 23
@@ -33,7 +33,7 @@ fn main() {
33// } 33// }
34// bb4: { 34// bb4: {
35// StorageLive(_8); 35// StorageLive(_8);
36// asm!(InlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []); 36// llvm_asm!(LlvmInlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []);
37// _8 = (); 37// _8 = ();
38// StorageDead(_8); 38// StorageDead(_8);
39// _4 = const 42i32; 39// _4 = const 42i32;
@@ -42,7 +42,7 @@ fn main() {
42// } 42// }
43// bb5: { 43// bb5: {
44// StorageLive(_7); 44// StorageLive(_7);
45// asm!(InlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []); 45// llvm_asm!(LlvmInlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []);
46// _7 = (); 46// _7 = ();
47// StorageDead(_7); 47// StorageDead(_7);
48// _4 = const 21i32; 48// _4 = const 21i32;
@@ -64,7 +64,7 @@ fn main() {
64// } 64// }
65// bb4: { 65// bb4: {
66// StorageLive(_8); 66// StorageLive(_8);
67// asm!(InlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []); 67// llvm_asm!(LlvmInlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []);
68// _8 = (); 68// _8 = ();
69// StorageDead(_8); 69// StorageDead(_8);
70// _4 = const 42i32; 70// _4 = const 42i32;
@@ -73,7 +73,7 @@ fn main() {
73// } 73// }
74// bb5: { 74// bb5: {
75// StorageLive(_7); 75// StorageLive(_7);
76// asm!(InlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []); 76// llvm_asm!(LlvmInlineAsmInner { asm: "NOP", asm_str_style: Cooked, outputs: [], inputs: [], clobbers: [], volatile: true, alignstack: false, dialect: Att } : [] : []);
77// _7 = (); 77// _7 = ();
78// StorageDead(_7); 78// StorageDead(_7);
79// _4 = const 21i32; 79// _4 = const 21i32;
diff --git a/src/test/pretty/asm-clobbers.rs b/src/test/pretty/asm-clobbers.rs
index 1bc9f00..2c09646 100644
--- a/src/test/pretty/asm-clobbers.rs
+++ b/src/test/pretty/asm-clobbers.rs
@@ -1,3 +1,3 @@
1#![feature(asm)] 1#![feature(llvm_asm)]
2 2
3pub fn main() { unsafe { asm!("" : : : "hello", "world") }; } 3pub fn main() { unsafe { llvm_asm!("" : : : "hello", "world") }; }
diff --git a/src/test/pretty/asm-options.rs b/src/test/pretty/asm-options.rs
index 5c2bbd9..86a881b 100644
--- a/src/test/pretty/asm-options.rs
+++ b/src/test/pretty/asm-options.rs
@@ -1,11 +1,11 @@
1#![feature(asm)] 1#![feature(llvm_asm)]
2 2
3// pp-exact 3// pp-exact
4 4
5pub fn main() { 5pub fn main() {
6 unsafe { 6 unsafe {
7 asm!("" : : : : "volatile"); 7 llvm_asm!("" : : : : "volatile");
8 asm!("" : : : : "alignstack"); 8 llvm_asm!("" : : : : "alignstack");
9 asm!("" : : : : "intel"); 9 llvm_asm!("" : : : : "intel");
10 } 10 }
11} 11}
diff --git a/src/test/pretty/raw-str-nonexpr.rs b/src/test/pretty/raw-str-nonexpr.rs
index cb23124..4122789 100644
--- a/src/test/pretty/raw-str-nonexpr.rs
+++ b/src/test/pretty/raw-str-nonexpr.rs
@@ -1,8 +1,8 @@
1// pp-exact 1// pp-exact
2 2
3#![feature(asm)] 3#![feature(llvm_asm)]
4 4
5#[cfg(foo = r#"just parse this"#)] 5#[cfg(foo = r#"just parse this"#)]
6extern crate blah as blah; 6extern crate blah as blah;
7 7
8fn main() { unsafe { asm!(r###"blah"###); } } 8fn 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 936001c..2e81667 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 @@
1#![feature(asm)] 1#![feature(llvm_asm)]
2#![crate_type="lib"] 2#![crate_type="lib"]
3 3
4#[deny(unreachable_code)] 4#[deny(unreachable_code)]
5pub fn exit(n: usize) -> i32 { 5pub fn exit(n: usize) -> i32 {
6 unsafe { 6 unsafe {
7 // Pretend this asm is an exit() syscall. 7 // Pretend this asm is an exit() syscall.
8 asm!("" :: "r"(n) :: "volatile"); 8 llvm_asm!("" :: "r"(n) :: "volatile");
9 // Can't actually reach this point, but rustc doesn't know that. 9 // Can't actually reach this point, but rustc doesn't know that.
10 } 10 }
11 // This return value is just here to generate some extra code for a return 11 // 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 00b09cb..fb3848b 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 @@
1#![feature(asm, core_intrinsics)] 1#![feature(llvm_asm, core_intrinsics)]
2#![crate_type="lib"] 2#![crate_type="lib"]
3 3
4use std::intrinsics; 4use std::intrinsics;
@@ -7,7 +7,7 @@ use std::intrinsics;
7pub fn exit(n: usize) -> i32 { 7pub fn exit(n: usize) -> i32 {
8 unsafe { 8 unsafe {
9 // Pretend this asm is an exit() syscall. 9 // Pretend this asm is an exit() syscall.
10 asm!("" :: "r"(n) :: "volatile"); 10 llvm_asm!("" :: "r"(n) :: "volatile");
11 intrinsics::unreachable() 11 intrinsics::unreachable()
12 } 12 }
13 // This return value is just here to generate some extra code for a return 13 // 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 0c7e2d9..fcdff59 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 @@
6// ignore-arm 6// ignore-arm
7// ignore-aarch64 7// ignore-aarch64
8 8
9#![feature(asm)] 9#![feature(llvm_asm)]
10 10
11#[cfg(target_arch = "x86_64")] 11#[cfg(target_arch = "x86_64")]
12pub extern "sysv64" fn all_the_registers(rdi: i64, rsi: i64, rdx: i64, 12pub 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
54pub fn main() { 54pub fn main() {
55 let result: i64; 55 let result: i64;
56 unsafe { 56 unsafe {
57 asm!("mov rdi, 1; 57 llvm_asm!("mov rdi, 1;
58 mov rsi, 2; 58 mov rsi, 2;
59 mov rdx, 3; 59 mov rdx, 3;
60 mov rcx, 4; 60 mov rcx, 4;
61 mov r8, 5; 61 mov r8, 5;
62 mov r9, 6; 62 mov r9, 6;
63 mov eax, 0x3F800000; 63 mov eax, 0x3F800000;
64 movd xmm0, eax; 64 movd xmm0, eax;
65 mov eax, 0x40000000; 65 mov eax, 0x40000000;
66 movd xmm1, eax; 66 movd xmm1, eax;
67 mov eax, 0x40800000; 67 mov eax, 0x40800000;
68 movd xmm2, eax; 68 movd xmm2, eax;
69 mov eax, 0x41000000; 69 mov eax, 0x41000000;
70 movd xmm3, eax; 70 movd xmm3, eax;
71 mov eax, 0x41800000; 71 mov eax, 0x41800000;
72 movd xmm4, eax; 72 movd xmm4, eax;
73 mov eax, 0x42000000; 73 mov eax, 0x42000000;
74 movd xmm5, eax; 74 movd xmm5, eax;
75 mov eax, 0x42800000; 75 mov eax, 0x42800000;
76 movd xmm6, eax; 76 movd xmm6, eax;
77 mov eax, 0x43000000; 77 mov eax, 0x43000000;
78 movd xmm7, eax; 78 movd xmm7, eax;
79 call r10 79 call r10
80 " 80 "
81 : "={rax}"(result) 81 : "={rax}"(result)
82 : "{r10}"(all_the_registers as usize) 82 : "{r10}"(all_the_registers as usize)
83 : "rdi", "rsi", "rdx", "rcx", "r8", "r9", "r11", "cc", "memory" 83 : "rdi", "rsi", "rdx", "rcx", "r8", "r9", "r11", "cc", "memory"
84 : "intel", "alignstack" 84 : "intel", "alignstack"
85 ) 85 )
86 } 86 }
87 assert_eq!(result, 42); 87 assert_eq!(result, 42);
diff --git a/src/test/ui/asm-concat-src.rs b/src/test/ui/asm-concat-src.rs
index c4160bf..1dc1c85 100644
--- a/src/test/ui/asm-concat-src.rs
+++ b/src/test/ui/asm-concat-src.rs
@@ -2,8 +2,8 @@
2// pretty-expanded FIXME #23616 2// pretty-expanded FIXME #23616
3// ignore-emscripten no asm 3// ignore-emscripten no asm
4 4
5#![feature(asm)] 5#![feature(llvm_asm)]
6 6
7pub fn main() { 7pub fn main() {
8 unsafe { asm!(concat!("", "")) }; 8 unsafe { llvm_asm!(concat!("", "")) };
9} 9}
diff --git a/src/test/ui/asm-in-moved.rs b/src/test/ui/asm-in-moved.rs
index 6525d2f..35f4d92 100644
--- a/src/test/ui/asm-in-moved.rs
+++ b/src/test/ui/asm-in-moved.rs
@@ -1,6 +1,6 @@
1// run-pass 1// run-pass
2 2
3#![feature(asm)] 3#![feature(llvm_asm)]
4#![allow(dead_code)] 4#![allow(dead_code)]
5 5
6use std::cell::Cell; 6use std::cell::Cell;
@@ -20,7 +20,7 @@ fn main() {
20 let _y: Box<NoisyDrop>; 20 let _y: Box<NoisyDrop>;
21 let x = Box::new(NoisyDrop(&status)); 21 let x = Box::new(NoisyDrop(&status));
22 unsafe { 22 unsafe {
23 asm!("mov $1, $0" : "=r"(_y) : "r"(x)); 23 llvm_asm!("mov $1, $0" : "=r"(_y) : "r"(x));
24 } 24 }
25 assert_eq!(status.get(), "alive"); 25 assert_eq!(status.get(), "alive");
26 } 26 }
diff --git a/src/test/ui/asm-in-out-operand.rs b/src/test/ui/asm-in-out-operand.rs
index 13d0363..acefabd 100644
--- a/src/test/ui/asm-in-out-operand.rs
+++ b/src/test/ui/asm-in-out-operand.rs
@@ -1,21 +1,21 @@
1// run-pass 1// run-pass
2 2
3#![feature(asm)] 3#![feature(llvm_asm)]
4 4
5#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] 5#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
6unsafe fn next_power_of_2(n: u32) -> u32 { 6unsafe fn next_power_of_2(n: u32) -> u32 {
7 let mut tmp = n; 7 let mut tmp = n;
8 asm!("dec $0" : "+rm"(tmp) :: "cc"); 8 llvm_asm!("dec $0" : "+rm"(tmp) :: "cc");
9 let mut shift = 1_u32; 9 let mut shift = 1_u32;
10 while shift <= 16 { 10 while shift <= 16 {
11 asm!( 11 llvm_asm!(
12 "shr %cl, $2 12 "shr %cl, $2
13 or $2, $0 13 or $2, $0
14 shl $$1, $1" 14 shl $$1, $1"
15 : "+&rm"(tmp), "+{ecx}"(shift) : "r"(tmp) : "cc" 15 : "+&rm"(tmp), "+{ecx}"(shift) : "r"(tmp) : "cc"
16 ); 16 );
17 } 17 }
18 asm!("inc $0" : "+rm"(tmp) :: "cc"); 18 llvm_asm!("inc $0" : "+rm"(tmp) :: "cc");
19 return tmp; 19 return tmp;
20} 20}
21 21
@@ -30,7 +30,7 @@ pub fn main() {
30 let x: isize; 30 let x: isize;
31 unsafe { 31 unsafe {
32 // Treat the output as initialization. 32 // Treat the output as initialization.
33 asm!( 33 llvm_asm!(
34 "shl $2, $1 34 "shl $2, $1
35 add $3, $1 35 add $3, $1
36 mov $1, $0" 36 mov $1, $0"
@@ -47,7 +47,7 @@ pub fn main() {
47 // Assignment to mutable. 47 // Assignment to mutable.
48 // Early clobber "&": 48 // Early clobber "&":
49 // Forbids the use of a single register by both operands. 49 // Forbids the use of a single register by both operands.
50 asm!("shr $$2, $1; add $1, $0" : "+&r"(x) : "r"(x) : "cc"); 50 llvm_asm!("shr $$2, $1; add $1, $0" : "+&r"(x) : "r"(x) : "cc");
51 } 51 }
52 assert_eq!(x, 60); 52 assert_eq!(x, 60);
53} 53}
diff --git a/src/test/ui/asm-indirect-memory.rs b/src/test/ui/asm-indirect-memory.rs
index 2e8011a..556ad83 100644
--- a/src/test/ui/asm-indirect-memory.rs
+++ b/src/test/ui/asm-indirect-memory.rs
@@ -1,12 +1,12 @@
1// run-pass 1// run-pass
2 2
3#![feature(asm)] 3#![feature(llvm_asm)]
4 4
5#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] 5#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
6fn read(ptr: &u32) -> u32 { 6fn read(ptr: &u32) -> u32 {
7 let out: u32; 7 let out: u32;
8 unsafe { 8 unsafe {
9 asm!("mov $1, $0" : "=r" (out) : "*m" (ptr)); 9 llvm_asm!("mov $1, $0" : "=r" (out) : "*m" (ptr));
10 } 10 }
11 out 11 out
12} 12}
@@ -14,7 +14,7 @@ fn read(ptr: &u32) -> u32 {
14#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] 14#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
15fn write(ptr: &mut u32, val: u32) { 15fn write(ptr: &mut u32, val: u32) {
16 unsafe { 16 unsafe {
17 asm!("mov $1, $0" : "=*m" (ptr) : "r" (val)); 17 llvm_asm!("mov $1, $0" : "=*m" (ptr) : "r" (val));
18 } 18 }
19} 19}
20 20
@@ -22,7 +22,7 @@ fn write(ptr: &mut u32, val: u32) {
22fn replace(ptr: &mut u32, val: u32) -> u32 { 22fn replace(ptr: &mut u32, val: u32) -> u32 {
23 let out: u32; 23 let out: u32;
24 unsafe { 24 unsafe {
25 asm!("mov $0, $1; mov $2, $0" : "+*m" (ptr), "=&r" (out) : "r" (val)); 25 llvm_asm!("mov $0, $1; mov $2, $0" : "+*m" (ptr), "=&r" (out) : "r" (val));
26 } 26 }
27 out 27 out
28} 28}
diff --git a/src/test/ui/asm-out-assign.rs b/src/test/ui/asm-out-assign.rs
index ed63d1b..321f285 100644
--- a/src/test/ui/asm-out-assign.rs
+++ b/src/test/ui/asm-out-assign.rs
@@ -1,13 +1,13 @@
1// run-pass 1// run-pass
2 2
3#![feature(asm)] 3#![feature(llvm_asm)]
4 4
5#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] 5#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
6pub fn main() { 6pub fn main() {
7 let x: isize; 7 let x: isize;
8 unsafe { 8 unsafe {
9 // Treat the output as initialization. 9 // Treat the output as initialization.
10 asm!("mov $1, $0" : "=r"(x) : "r"(5_usize)); 10 llvm_asm!("mov $1, $0" : "=r"(x) : "r"(5_usize));
11 } 11 }
12 assert_eq!(x, 5); 12 assert_eq!(x, 5);
13 13
@@ -16,7 +16,7 @@ pub fn main() {
16 16
17 unsafe { 17 unsafe {
18 // Assignment to mutable. 18 // Assignment to mutable.
19 asm!("mov $1, $0" : "=r"(x) : "r"(x + 7)); 19 llvm_asm!("mov $1, $0" : "=r"(x) : "r"(x + 7));
20 } 20 }
21 assert_eq!(x, 13); 21 assert_eq!(x, 13);
22} 22}
diff --git a/src/test/ui/asm/asm-bad-clobber.rs b/src/test/ui/asm/asm-bad-clobber.rs
index 8406a1c..9f5662c 100644
--- a/src/test/ui/asm/asm-bad-clobber.rs
+++ b/src/test/ui/asm/asm-bad-clobber.rs
@@ -11,7 +11,7 @@
11// ignore-mips 11// ignore-mips
12// ignore-mips64 12// ignore-mips64
13 13
14#![feature(asm)] 14#![feature(llvm_asm)]
15 15
16#[cfg(any(target_arch = "x86", 16#[cfg(any(target_arch = "x86",
17 target_arch = "x86_64"))] 17 target_arch = "x86_64"))]
@@ -19,7 +19,7 @@
19pub fn main() { 19pub fn main() {
20 unsafe { 20 unsafe {
21 // clobber formatted as register input/output 21 // clobber formatted as register input/output
22 asm!("xor %eax, %eax" : : : "{eax}"); 22 llvm_asm!("xor %eax, %eax" : : : "{eax}");
23 //~^ ERROR clobber should not be surrounded by braces 23 //~^ ERROR clobber should not be surrounded by braces
24 } 24 }
25} 25}
diff --git a/src/test/ui/asm/asm-bad-clobber.stderr b/src/test/ui/asm/asm-bad-clobber.stderr
index a279421..8c5d046 100644
--- a/src/test/ui/asm/asm-bad-clobber.stderr
+++ b/src/test/ui/asm/asm-bad-clobber.stderr
@@ -1,8 +1,8 @@
1error[E0664]: clobber should not be surrounded by braces 1error[E0664]: clobber should not be surrounded by braces
2 --> $DIR/asm-bad-clobber.rs:22:37 2 --> $DIR/asm-bad-clobber.rs:22:42
3 | 3 |
4LL | asm!("xor %eax, %eax" : : : "{eax}"); 4LL | llvm_asm!("xor %eax, %eax" : : : "{eax}");
5 | ^^^^^^^ 5 | ^^^^^^^
6 6
7error: aborting due to previous error 7error: aborting due to previous error
8 8
diff --git a/src/test/ui/asm/asm-in-bad-modifier.rs b/src/test/ui/asm/asm-in-bad-modifier.rs
index 38cd11e..b791ec3 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 @@
8// ignore-mips 8// ignore-mips
9// ignore-mips64 9// ignore-mips64
10 10
11#![feature(asm)] 11#![feature(llvm_asm)]
12 12
13fn foo(x: isize) { println!("{}", x); } 13fn foo(x: isize) { println!("{}", x); }
14 14
@@ -20,8 +20,8 @@ pub fn main() {
20 let x: isize; 20 let x: isize;
21 let y: isize; 21 let y: isize;
22 unsafe { 22 unsafe {
23 asm!("mov $1, $0" : "=r"(x) : "=r"(5)); //~ ERROR operand constraint contains '=' 23 llvm_asm!("mov $1, $0" : "=r"(x) : "=r"(5)); //~ ERROR operand constraint contains '='
24 asm!("mov $1, $0" : "=r"(y) : "+r"(5)); //~ ERROR operand constraint contains '+' 24 llvm_asm!("mov $1, $0" : "=r"(y) : "+r"(5)); //~ ERROR operand constraint contains '+'
25 } 25 }
26 foo(x); 26 foo(x);
27 foo(y); 27 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 d45b3e5..f1624f7 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 @@
1error[E0662]: input operand constraint contains '=' 1error[E0662]: input operand constraint contains '='
2 --> $DIR/asm-in-bad-modifier.rs:23:39 2 --> $DIR/asm-in-bad-modifier.rs:23:44
3 | 3 |
4LL | asm!("mov $1, $0" : "=r"(x) : "=r"(5)); 4LL | llvm_asm!("mov $1, $0" : "=r"(x) : "=r"(5));
5 | ^^^^ 5 | ^^^^
6 6
7error[E0663]: input operand constraint contains '+' 7error[E0663]: input operand constraint contains '+'
8 --> $DIR/asm-in-bad-modifier.rs:24:39 8 --> $DIR/asm-in-bad-modifier.rs:24:44
9 | 9 |
10LL | asm!("mov $1, $0" : "=r"(y) : "+r"(5)); 10LL | llvm_asm!("mov $1, $0" : "=r"(y) : "+r"(5));
11 | ^^^^ 11 | ^^^^
12 12
13error: aborting due to 2 previous errors 13error: aborting due to 2 previous errors
14 14
diff --git a/src/test/ui/asm/asm-literal-escaping.rs b/src/test/ui/asm/asm-literal-escaping.rs
index 8d464e7..5d45f50 100644
--- a/src/test/ui/asm/asm-literal-escaping.rs
+++ b/src/test/ui/asm/asm-literal-escaping.rs
@@ -1,12 +1,12 @@
1// build-pass 1// build-pass
2// only-x86_64 2// only-x86_64
3 3
4#![feature(asm)] 4#![feature(llvm_asm)]
5 5
6fn main() { 6fn main() {
7 unsafe { 7 unsafe {
8 // "nop" :: "r"(x) : "eax" : "volatile" 8 // "nop" :: "r"(x) : "eax" : "volatile"
9 let x = 10; 9 let x = 10;
10 asm!("\x6Eop" :: "\x72"(x) : "\x65ax" : "\x76olatile"); 10 llvm_asm!("\x6Eop" :: "\x72"(x) : "\x65ax" : "\x76olatile");
11 } 11 }
12} 12}
diff --git a/src/test/ui/asm/asm-misplaced-option.rs b/src/test/ui/asm/asm-misplaced-option.rs
index 14ff4c2..3c44fc9 100644
--- a/src/test/ui/asm/asm-misplaced-option.rs
+++ b/src/test/ui/asm/asm-misplaced-option.rs
@@ -12,7 +12,7 @@
12// ignore-mips 12// ignore-mips
13// ignore-mips64 13// ignore-mips64
14 14
15#![feature(asm)] 15#![feature(llvm_asm)]
16 16
17#[cfg(any(target_arch = "x86", 17#[cfg(any(target_arch = "x86",
18 target_arch = "x86_64"))] 18 target_arch = "x86_64"))]
@@ -21,14 +21,14 @@ fn main() {
21 let mut x: isize = 0; 21 let mut x: isize = 0;
22 unsafe { 22 unsafe {
23 // extra colon 23 // extra colon
24 asm!("mov $1, $0" : "=r"(x) : "r"(5_usize), "0"(x) : : "cc"); 24 llvm_asm!("mov $1, $0" : "=r"(x) : "r"(5_usize), "0"(x) : : "cc");
25 //~^ WARNING unrecognized option 25 //~^ WARNING unrecognized option
26 } 26 }
27 assert_eq!(x, 5); 27 assert_eq!(x, 5);
28 28
29 unsafe { 29 unsafe {
30 // comma in place of a colon 30 // comma in place of a colon
31 asm!("add $2, $1; mov $1, $0" : "=r"(x) : "r"(x), "r"(8_usize) : "cc", "volatile"); 31 llvm_asm!("add $2, $1; mov $1, $0" : "=r"(x) : "r"(x), "r"(8_usize) : "cc", "volatile");
32 //~^ WARNING expected a clobber, found an option 32 //~^ WARNING expected a clobber, found an option
33 } 33 }
34 assert_eq!(x, 13); 34 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 3d4b28c..ea9267c 100644
--- a/src/test/ui/asm/asm-misplaced-option.stderr
+++ b/src/test/ui/asm/asm-misplaced-option.stderr
@@ -1,12 +1,12 @@
1warning: unrecognized option 1warning: unrecognized option
2 --> $DIR/asm-misplaced-option.rs:24:64 2 --> $DIR/asm-misplaced-option.rs:24:69
3 | 3 |
4LL | asm!("mov $1, $0" : "=r"(x) : "r"(5_usize), "0"(x) : : "cc"); 4LL | llvm_asm!("mov $1, $0" : "=r"(x) : "r"(5_usize), "0"(x) : : "cc");
5 | ^^^^ 5 | ^^^^
6 6
7warning: expected a clobber, found an option 7warning: expected a clobber, found an option
8 --> $DIR/asm-misplaced-option.rs:31:80 8 --> $DIR/asm-misplaced-option.rs:31:85
9 | 9 |
10LL | asm!("add $2, $1; mov $1, $0" : "=r"(x) : "r"(x), "r"(8_usize) : "cc", "volatile"); 10LL | llvm_asm!("add $2, $1; mov $1, $0" : "=r"(x) : "r"(x), "r"(8_usize) : "cc", "volatile");
11 | ^^^^^^^^^^ 11 | ^^^^^^^^^^
12 12
diff --git a/src/test/ui/asm/asm-out-assign-imm.rs b/src/test/ui/asm/asm-out-assign-imm.rs
index 7a8be2a..1a46879 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 @@
8// ignore-mips 8// ignore-mips
9// ignore-mips64 9// ignore-mips64
10 10
11#![feature(asm)] 11#![feature(llvm_asm)]
12 12
13fn foo(x: isize) { println!("{}", x); } 13fn foo(x: isize) { println!("{}", x); }
14 14
@@ -21,7 +21,7 @@ pub fn main() {
21 x = 1; 21 x = 1;
22 foo(x); 22 foo(x);
23 unsafe { 23 unsafe {
24 asm!("mov $1, $0" : "=r"(x) : "r"(5)); 24 llvm_asm!("mov $1, $0" : "=r"(x) : "r"(5));
25 //~^ ERROR cannot assign twice to immutable variable `x` 25 //~^ ERROR cannot assign twice to immutable variable `x`
26 } 26 }
27 foo(x); 27 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 ac38218..feec61b 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 @@
1error[E0384]: cannot assign twice to immutable variable `x` 1error[E0384]: cannot assign twice to immutable variable `x`
2 --> $DIR/asm-out-assign-imm.rs:24:34 2 --> $DIR/asm-out-assign-imm.rs:24:39
3 | 3 |
4LL | let x: isize; 4LL | let x: isize;
5 | - help: make this binding mutable: `mut x` 5 | - help: make this binding mutable: `mut x`
6LL | x = 1; 6LL | x = 1;
7 | ----- first assignment to `x` 7 | ----- first assignment to `x`
8... 8...
9LL | asm!("mov $1, $0" : "=r"(x) : "r"(5)); 9LL | llvm_asm!("mov $1, $0" : "=r"(x) : "r"(5));
10 | ^ cannot assign twice to immutable variable 10 | ^ cannot assign twice to immutable variable
11 11
12error: aborting due to previous error 12error: aborting due to previous error
13 13
diff --git a/src/test/ui/asm/asm-out-no-modifier.rs b/src/test/ui/asm/asm-out-no-modifier.rs
index d9142b9..d198437 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 @@
8// ignore-mips 8// ignore-mips
9// ignore-mips64 9// ignore-mips64
10 10
11#![feature(asm)] 11#![feature(llvm_asm)]
12 12
13fn foo(x: isize) { println!("{}", x); } 13fn foo(x: isize) { println!("{}", x); }
14 14
@@ -19,7 +19,7 @@ fn foo(x: isize) { println!("{}", x); }
19pub fn main() { 19pub fn main() {
20 let x: isize; 20 let x: isize;
21 unsafe { 21 unsafe {
22 asm!("mov $1, $0" : "r"(x) : "r"(5)); //~ ERROR output operand constraint lacks '=' 22 llvm_asm!("mov $1, $0" : "r"(x) : "r"(5)); //~ ERROR output operand constraint lacks '='
23 } 23 }
24 foo(x); 24 foo(x);
25} 25}
diff --git a/src/test/ui/asm/asm-out-no-modifier.stderr b/src/test/ui/asm/asm-out-no-modifier.stderr
index 99134ce..1c9e108 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 @@
1error[E0661]: output operand constraint lacks '=' or '+' 1error[E0661]: output operand constraint lacks '=' or '+'
2 --> $DIR/asm-out-no-modifier.rs:22:29 2 --> $DIR/asm-out-no-modifier.rs:22:34
3 | 3 |
4LL | asm!("mov $1, $0" : "r"(x) : "r"(5)); 4LL | llvm_asm!("mov $1, $0" : "r"(x) : "r"(5));
5 | ^^^ 5 | ^^^
6 6
7error: aborting due to previous error 7error: aborting due to previous error
8 8
diff --git a/src/test/ui/asm/asm-out-read-uninit.rs b/src/test/ui/asm/asm-out-read-uninit.rs
index 78458ff..d45498d 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 @@
8// ignore-mips 8// ignore-mips
9// ignore-mips64 9// ignore-mips64
10 10
11#![feature(asm)] 11#![feature(llvm_asm)]
12 12
13fn foo(x: isize) { println!("{}", x); } 13fn foo(x: isize) { println!("{}", x); }
14 14
@@ -19,7 +19,7 @@ fn foo(x: isize) { println!("{}", x); }
19pub fn main() { 19pub fn main() {
20 let x: isize; 20 let x: isize;
21 unsafe { 21 unsafe {
22 asm!("mov $1, $0" : "=r"(x) : "r"(x)); 22 llvm_asm!("mov $1, $0" : "=r"(x) : "r"(x));
23 //~^ ERROR use of possibly-uninitialized variable: `x` 23 //~^ ERROR use of possibly-uninitialized variable: `x`
24 } 24 }
25 foo(x); 25 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 71aeda2..3c3f3a6 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 @@
1error[E0381]: use of possibly-uninitialized variable: `x` 1error[E0381]: use of possibly-uninitialized variable: `x`
2 --> $DIR/asm-out-read-uninit.rs:22:43 2 --> $DIR/asm-out-read-uninit.rs:22:48
3 | 3 |
4LL | asm!("mov $1, $0" : "=r"(x) : "r"(x)); 4LL | llvm_asm!("mov $1, $0" : "=r"(x) : "r"(x));
5 | ^ use of possibly-uninitialized `x` 5 | ^ use of possibly-uninitialized `x`
6 6
7error: aborting due to previous error 7error: aborting due to previous error
8 8
diff --git a/src/test/ui/asm/asm-parse-errors.rs b/src/test/ui/asm/asm-parse-errors.rs
index e712ac5..d458be8 100644
--- a/src/test/ui/asm/asm-parse-errors.rs
+++ b/src/test/ui/asm/asm-parse-errors.rs
@@ -1,15 +1,15 @@
1#![feature(asm)] 1#![feature(llvm_asm)]
2 2
3fn main() { 3fn main() {
4 asm!(); //~ ERROR requires a string literal as an argument 4 llvm_asm!(); //~ ERROR requires a string literal as an argument
5 asm!("nop" : struct); //~ ERROR expected string literal 5 llvm_asm!("nop" : struct); //~ ERROR expected string literal
6 asm!("mov %eax, $$0x2" : struct); //~ ERROR expected string literal 6 llvm_asm!("mov %eax, $$0x2" : struct); //~ ERROR expected string literal
7 asm!("mov %eax, $$0x2" : "={eax}" struct); //~ ERROR expected `(` 7 llvm_asm!("mov %eax, $$0x2" : "={eax}" struct); //~ ERROR expected `(`
8 asm!("mov %eax, $$0x2" : "={eax}"(struct)); //~ ERROR expected expression 8 llvm_asm!("mov %eax, $$0x2" : "={eax}"(struct)); //~ ERROR expected expression
9 asm!("in %dx, %al" : "={al}"(result) : struct); //~ ERROR expected string literal 9 llvm_asm!("in %dx, %al" : "={al}"(result) : struct); //~ ERROR expected string literal
10 asm!("in %dx, %al" : "={al}"(result) : "{dx}" struct); //~ ERROR expected `(` 10 llvm_asm!("in %dx, %al" : "={al}"(result) : "{dx}" struct); //~ ERROR expected `(`
11 asm!("in %dx, %al" : "={al}"(result) : "{dx}"(struct)); //~ ERROR expected expression 11 llvm_asm!("in %dx, %al" : "={al}"(result) : "{dx}"(struct)); //~ ERROR expected expression
12 asm!("mov $$0x200, %eax" : : : struct); //~ ERROR expected string literal 12 llvm_asm!("mov $$0x200, %eax" : : : struct); //~ ERROR expected string literal
13 asm!("mov eax, 2" : "={eax}"(foo) : : : struct); //~ ERROR expected string literal 13 llvm_asm!("mov eax, 2" : "={eax}"(foo) : : : struct); //~ ERROR expected string literal
14 asm!(123); //~ ERROR inline assembly must be a string literal 14 llvm_asm!(123); //~ ERROR inline assembly must be a string literal
15} 15}
diff --git a/src/test/ui/asm/asm-parse-errors.stderr b/src/test/ui/asm/asm-parse-errors.stderr
index 2b29332..64f295c 100644
--- a/src/test/ui/asm/asm-parse-errors.stderr
+++ b/src/test/ui/asm/asm-parse-errors.stderr
@@ -1,68 +1,68 @@
1error: macro requires a string literal as an argument 1error: macro requires a string literal as an argument
2 --> $DIR/asm-parse-errors.rs:4:5 2 --> $DIR/asm-parse-errors.rs:4:5
3 | 3 |
4LL | asm!(); 4LL | llvm_asm!();
5 | ^^^^^^^ string literal required 5 | ^^^^^^^^^^^^ string literal required
6 6
7error: expected string literal 7error: expected string literal
8 --> $DIR/asm-parse-errors.rs:5:18 8 --> $DIR/asm-parse-errors.rs:5:23
9 | 9 |
10LL | asm!("nop" : struct); 10LL | llvm_asm!("nop" : struct);
11 | ^^^^^^ not a string literal 11 | ^^^^^^ not a string literal
12 12
13error: expected string literal 13error: expected string literal
14 --> $DIR/asm-parse-errors.rs:6:30 14 --> $DIR/asm-parse-errors.rs:6:35
15 | 15 |
16LL | asm!("mov %eax, $$0x2" : struct); 16LL | llvm_asm!("mov %eax, $$0x2" : struct);
17 | ^^^^^^ not a string literal 17 | ^^^^^^ not a string literal
18 18
19error: expected `(`, found keyword `struct` 19error: expected `(`, found keyword `struct`
20 --> $DIR/asm-parse-errors.rs:7:39 20 --> $DIR/asm-parse-errors.rs:7:44
21 | 21 |
22LL | asm!("mov %eax, $$0x2" : "={eax}" struct); 22LL | llvm_asm!("mov %eax, $$0x2" : "={eax}" struct);
23 | ^^^^^^ expected `(` 23 | ^^^^^^ expected `(`
24 24
25error: expected expression, found keyword `struct` 25error: expected expression, found keyword `struct`
26 --> $DIR/asm-parse-errors.rs:8:39 26 --> $DIR/asm-parse-errors.rs:8:44
27 | 27 |
28LL | asm!("mov %eax, $$0x2" : "={eax}"(struct)); 28LL | llvm_asm!("mov %eax, $$0x2" : "={eax}"(struct));
29 | ^^^^^^ expected expression 29 | ^^^^^^ expected expression
30 30
31error: expected string literal 31error: expected string literal
32 --> $DIR/asm-parse-errors.rs:9:44 32 --> $DIR/asm-parse-errors.rs:9:49
33 | 33 |
34LL | asm!("in %dx, %al" : "={al}"(result) : struct); 34LL | llvm_asm!("in %dx, %al" : "={al}"(result) : struct);
35 | ^^^^^^ not a string literal 35 | ^^^^^^ not a string literal
36 36
37error: expected `(`, found keyword `struct` 37error: expected `(`, found keyword `struct`
38 --> $DIR/asm-parse-errors.rs:10:51 38 --> $DIR/asm-parse-errors.rs:10:56
39 | 39 |
40LL | asm!("in %dx, %al" : "={al}"(result) : "{dx}" struct); 40LL | llvm_asm!("in %dx, %al" : "={al}"(result) : "{dx}" struct);
41 | ^^^^^^ expected `(` 41 | ^^^^^^ expected `(`
42 42
43error: expected expression, found keyword `struct` 43error: expected expression, found keyword `struct`
44 --> $DIR/asm-parse-errors.rs:11:51 44 --> $DIR/asm-parse-errors.rs:11:56
45 | 45 |
46LL | asm!("in %dx, %al" : "={al}"(result) : "{dx}"(struct)); 46LL | llvm_asm!("in %dx, %al" : "={al}"(result) : "{dx}"(struct));
47 | ^^^^^^ expected expression 47 | ^^^^^^ expected expression
48 48
49error: expected string literal 49error: expected string literal
50 --> $DIR/asm-parse-errors.rs:12:36 50 --> $DIR/asm-parse-errors.rs:12:41
51 | 51 |
52LL | asm!("mov $$0x200, %eax" : : : struct); 52LL | llvm_asm!("mov $$0x200, %eax" : : : struct);
53 | ^^^^^^ not a string literal 53 | ^^^^^^ not a string literal
54 54
55error: expected string literal 55error: expected string literal
56 --> $DIR/asm-parse-errors.rs:13:45 56 --> $DIR/asm-parse-errors.rs:13:50
57 | 57 |
58LL | asm!("mov eax, 2" : "={eax}"(foo) : : : struct); 58LL | llvm_asm!("mov eax, 2" : "={eax}"(foo) : : : struct);
59 | ^^^^^^ not a string literal 59 | ^^^^^^ not a string literal
60 60
61error: inline assembly must be a string literal 61error: inline assembly must be a string literal
62 --> $DIR/asm-parse-errors.rs:14:10 62 --> $DIR/asm-parse-errors.rs:14:15
63 | 63 |
64LL | asm!(123); 64LL | llvm_asm!(123);
65 | ^^^ 65 | ^^^
66 66
67error: aborting due to 11 previous errors 67error: aborting due to 11 previous errors
68 68
diff --git a/src/test/ui/asm/issue-51431.rs b/src/test/ui/asm/issue-51431.rs
index 4cef42d..ca06bda 100644
--- a/src/test/ui/asm/issue-51431.rs
+++ b/src/test/ui/asm/issue-51431.rs
@@ -1,11 +1,11 @@
1// build-fail 1// build-fail
2// ignore-emscripten no asm! support 2// ignore-emscripten no llvm_asm! support
3 3
4#![feature(asm)] 4#![feature(llvm_asm)]
5 5
6fn main() { 6fn main() {
7 unsafe { 7 unsafe {
8 asm! {"mov $0,$1"::"0"("bx"),"1"(0x00)} 8 llvm_asm! {"mov $0,$1"::"0"("bx"),"1"(0x00)}
9 //~^ ERROR: invalid value for constraint in inline assembly 9 //~^ ERROR: invalid value for constraint in inline assembly
10 } 10 }
11} 11}
diff --git a/src/test/ui/asm/issue-51431.stderr b/src/test/ui/asm/issue-51431.stderr
index a024f33..b4b39a2 100644
--- a/src/test/ui/asm/issue-51431.stderr
+++ b/src/test/ui/asm/issue-51431.stderr
@@ -1,8 +1,8 @@
1error[E0669]: invalid value for constraint in inline assembly 1error[E0669]: invalid value for constraint in inline assembly
2 --> $DIR/issue-51431.rs:8:32 2 --> $DIR/issue-51431.rs:8:37
3 | 3 |
4LL | asm! {"mov $0,$1"::"0"("bx"),"1"(0x00)} 4LL | llvm_asm! {"mov $0,$1"::"0"("bx"),"1"(0x00)}
5 | ^^^^ 5 | ^^^^
6 6
7error: aborting due to previous error 7error: aborting due to previous error
8 8
diff --git a/src/test/ui/asm/issue-62046.rs b/src/test/ui/asm/issue-62046.rs
index 105dadd..fd4d9bd 100644
--- a/src/test/ui/asm/issue-62046.rs
+++ b/src/test/ui/asm/issue-62046.rs
@@ -1,11 +1,11 @@
1// build-fail 1// build-fail
2// ignore-emscripten no asm! support 2// ignore-emscripten no asm! support
3 3
4#![feature(asm)] 4#![feature(llvm_asm)]
5 5
6fn main() { 6fn main() {
7 unsafe { 7 unsafe {
8 asm!("nop" : "+r"("r15")); 8 llvm_asm!("nop" : "+r"("r15"));
9 //~^ malformed inline assembly 9 //~^ malformed inline assembly
10 } 10 }
11} 11}
diff --git a/src/test/ui/asm/issue-62046.stderr b/src/test/ui/asm/issue-62046.stderr
index a38a300..cf27052 100644
--- a/src/test/ui/asm/issue-62046.stderr
+++ b/src/test/ui/asm/issue-62046.stderr
@@ -1,8 +1,8 @@
1error[E0668]: malformed inline assembly 1error[E0668]: malformed inline assembly
2 --> $DIR/issue-62046.rs:8:9 2 --> $DIR/issue-62046.rs:8:9
3 | 3 |
4LL | asm!("nop" : "+r"("r15")); 4LL | llvm_asm!("nop" : "+r"("r15"));
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 | 6 |
7 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) 7 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
8 8
diff --git a/src/test/ui/asm/issue-69092.rs b/src/test/ui/asm/issue-69092.rs
index caa5c2e..ecce7bf 100644
--- a/src/test/ui/asm/issue-69092.rs
+++ b/src/test/ui/asm/issue-69092.rs
@@ -2,9 +2,9 @@
2// ignore-emscripten no asm! support 2// ignore-emscripten no asm! support
3// Regression test for #69092 3// Regression test for #69092
4 4
5#![feature(asm)] 5#![feature(llvm_asm)]
6 6
7fn main() { 7fn main() {
8 unsafe { asm!(".ascii \"Xen\0\""); } 8 unsafe { llvm_asm!(".ascii \"Xen\0\""); }
9 //~^ ERROR: <inline asm>:1:9: error: expected string in '.ascii' directive 9 //~^ ERROR: <inline asm>:1:9: error: expected string in '.ascii' directive
10} 10}
diff --git a/src/test/ui/asm/issue-69092.stderr b/src/test/ui/asm/issue-69092.stderr
index 5661097..35f77ed 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
4 4
5 --> $DIR/issue-69092.rs:8:14 5 --> $DIR/issue-69092.rs:8:14
6 | 6 |
7LL | unsafe { asm!(".ascii \"Xen\0\""); } 7LL | unsafe { llvm_asm!(".ascii \"Xen\0\""); }
8 | ^^^^^^^^^^^^^^^^^^^^^^^^^ 8 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9 9
10error: aborting due to previous error 10error: aborting due to previous error
11 11
diff --git a/src/test/ui/ast-json/ast-json-ice.rs b/src/test/ui/ast-json/ast-json-ice.rs
index e8a622e..60e6c88 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 @@
8// check-pass 8// check-pass
9// dont-check-compiler-stdout - don't check for any AST change. 9// dont-check-compiler-stdout - don't check for any AST change.
10 10
11#![feature(asm)] 11#![feature(llvm_asm)]
12 12
13enum V { 13enum V {
14 A(i32), 14 A(i32),
@@ -30,7 +30,7 @@ fn main() {
30 target_arch = "x86_64", 30 target_arch = "x86_64",
31 target_arch = "arm", 31 target_arch = "arm",
32 target_arch = "aarch64"))] 32 target_arch = "aarch64"))]
33 unsafe { asm!(""::::); } 33 unsafe { llvm_asm!(""::::); }
34 34
35 let x: (i32) = 35; 35 let x: (i32) = 35;
36 let y = x as i64<> + 5; 36 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 c1b0f39..d16b424 100644
--- a/src/test/ui/borrowck/borrowck-asm.rs
+++ b/src/test/ui/borrowck/borrowck-asm.rs
@@ -6,7 +6,7 @@
6// ignore-sparc 6// ignore-sparc
7// ignore-sparc64 7// ignore-sparc64
8 8
9#![feature(asm)] 9#![feature(llvm_asm)]
10 10
11#[cfg(any(target_arch = "x86", 11#[cfg(any(target_arch = "x86",
12 target_arch = "x86_64", 12 target_arch = "x86_64",
@@ -19,7 +19,7 @@ mod test_cases {
19 let y: &mut isize; 19 let y: &mut isize;
20 let x = &mut 0isize; 20 let x = &mut 0isize;
21 unsafe { 21 unsafe {
22 asm!("nop" : : "r"(x)); 22 llvm_asm!("nop" : : "r"(x));
23 } 23 }
24 let z = x; //~ ERROR use of moved value: `x` 24 let z = x; //~ ERROR use of moved value: `x`
25 } 25 }
@@ -28,7 +28,7 @@ mod test_cases {
28 let mut x = 3; 28 let mut x = 3;
29 let y = &mut x; 29 let y = &mut x;
30 unsafe { 30 unsafe {
31 asm!("nop" : : "r"(x)); //~ ERROR cannot use 31 llvm_asm!("nop" : : "r"(x)); //~ ERROR cannot use
32 } 32 }
33 let z = y; 33 let z = y;
34 } 34 }
@@ -36,12 +36,12 @@ mod test_cases {
36 fn out_is_assign() { 36 fn out_is_assign() {
37 let x = 3; 37 let x = 3;
38 unsafe { 38 unsafe {
39 asm!("nop" : "=r"(x)); //~ ERROR cannot assign twice 39 llvm_asm!("nop" : "=r"(x)); //~ ERROR cannot assign twice
40 } 40 }
41 let mut a = &mut 3; 41 let mut a = &mut 3;
42 let b = &*a; 42 let b = &*a;
43 unsafe { 43 unsafe {
44 asm!("nop" : "=r"(a)); // OK, Shallow write to `a` 44 llvm_asm!("nop" : "=r"(a)); // OK, Shallow write to `a`
45 } 45 }
46 let c = b; 46 let c = b;
47 let d = *a; 47 let d = *a;
@@ -50,14 +50,14 @@ mod test_cases {
50 fn rw_is_assign() { 50 fn rw_is_assign() {
51 let x = 3; 51 let x = 3;
52 unsafe { 52 unsafe {
53 asm!("nop" : "+r"(x)); //~ ERROR cannot assign twice 53 llvm_asm!("nop" : "+r"(x)); //~ ERROR cannot assign twice
54 } 54 }
55 } 55 }
56 56
57 fn indirect_is_not_init() { 57 fn indirect_is_not_init() {
58 let x: i32; 58 let x: i32;
59 unsafe { 59 unsafe {
60 asm!("nop" : "=*r"(x)); //~ ERROR use of possibly-uninitialized variable 60 llvm_asm!("nop" : "=*r"(x)); //~ ERROR use of possibly-uninitialized variable
61 } 61 }
62 } 62 }
63 63
@@ -65,7 +65,7 @@ mod test_cases {
65 let mut x = &mut 3; 65 let mut x = &mut 3;
66 let y = &*x; 66 let y = &*x;
67 unsafe { 67 unsafe {
68 asm!("nop" : "+r"(x)); //~ ERROR cannot assign to `x` because it is borrowed 68 llvm_asm!("nop" : "+r"(x)); //~ ERROR cannot assign to `x` because it is borrowed
69 } 69 }
70 let z = y; 70 let z = y;
71 } 71 }
@@ -73,7 +73,7 @@ mod test_cases {
73 fn two_moves() { 73 fn two_moves() {
74 let x = &mut 2; 74 let x = &mut 2;
75 unsafe { 75 unsafe {
76 asm!("nop" : : "r"(x), "r"(x) ); //~ ERROR use of moved value 76 llvm_asm!("nop" : : "r"(x), "r"(x) ); //~ ERROR use of moved value
77 } 77 }
78 } 78 }
79} 79}
diff --git a/src/test/ui/borrowck/borrowck-asm.stderr b/src/test/ui/borrowck/borrowck-asm.stderr
index f85b598..d7e94bd 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`
4LL | let x = &mut 0isize; 4LL | let x = &mut 0isize;
5 | - move occurs because `x` has type `&mut isize`, which does not implement the `Copy` trait 5 | - move occurs because `x` has type `&mut isize`, which does not implement the `Copy` trait
6LL | unsafe { 6LL | unsafe {
7LL | asm!("nop" : : "r"(x)); 7LL | llvm_asm!("nop" : : "r"(x));
8 | - value moved here 8 | - value moved here
9LL | } 9LL | }
10LL | let z = x; 10LL | let z = x;
11 | ^ value used here after move 11 | ^ value used here after move
12 12
13error[E0503]: cannot use `x` because it was mutably borrowed 13error[E0503]: cannot use `x` because it was mutably borrowed
14 --> $DIR/borrowck-asm.rs:31:32 14 --> $DIR/borrowck-asm.rs:31:37
15 | 15 |
16LL | let y = &mut x; 16LL | let y = &mut x;
17 | ------ borrow of `x` occurs here 17 | ------ borrow of `x` occurs here
18LL | unsafe { 18LL | unsafe {
19LL | asm!("nop" : : "r"(x)); 19LL | llvm_asm!("nop" : : "r"(x));
20 | ^ use of borrowed `x` 20 | ^ use of borrowed `x`
21LL | } 21LL | }
22LL | let z = y; 22LL | let z = y;
23 | - borrow later used here 23 | - borrow later used here
24 24
25error[E0384]: cannot assign twice to immutable variable `x` 25error[E0384]: cannot assign twice to immutable variable `x`
26 --> $DIR/borrowck-asm.rs:39:31 26 --> $DIR/borrowck-asm.rs:39:36
27 | 27 |
28LL | let x = 3; 28LL | let x = 3;
29 | - 29 | -
@@ -31,11 +31,11 @@ LL | let x = 3;
31 | first assignment to `x` 31 | first assignment to `x`
32 | help: make this binding mutable: `mut x` 32 | help: make this binding mutable: `mut x`
33LL | unsafe { 33LL | unsafe {
34LL | asm!("nop" : "=r"(x)); 34LL | llvm_asm!("nop" : "=r"(x));
35 | ^ cannot assign twice to immutable variable 35 | ^ cannot assign twice to immutable variable
36 36
37error[E0384]: cannot assign twice to immutable variable `x` 37error[E0384]: cannot assign twice to immutable variable `x`
38 --> $DIR/borrowck-asm.rs:53:31 38 --> $DIR/borrowck-asm.rs:53:36
39 | 39 |
40LL | let x = 3; 40LL | let x = 3;
41 | - 41 | -
@@ -43,37 +43,37 @@ LL | let x = 3;
43 | first assignment to `x` 43 | first assignment to `x`
44 | help: make this binding mutable: `mut x` 44 | help: make this binding mutable: `mut x`
45LL | unsafe { 45LL | unsafe {
46LL | asm!("nop" : "+r"(x)); 46LL | llvm_asm!("nop" : "+r"(x));
47 | ^ cannot assign twice to immutable variable 47 | ^ cannot assign twice to immutable variable
48 48
49error[E0381]: use of possibly-uninitialized variable: `x` 49error[E0381]: use of possibly-uninitialized variable: `x`
50 --> $DIR/borrowck-asm.rs:60:32 50 --> $DIR/borrowck-asm.rs:60:37
51 | 51 |
52LL | asm!("nop" : "=*r"(x)); 52LL | llvm_asm!("nop" : "=*r"(x));
53 | ^ use of possibly-uninitialized `x` 53 | ^ use of possibly-uninitialized `x`
54 54
55error[E0506]: cannot assign to `x` because it is borrowed 55error[E0506]: cannot assign to `x` because it is borrowed
56 --> $DIR/borrowck-asm.rs:68:31 56 --> $DIR/borrowck-asm.rs:68:36
57 | 57 |
58LL | let y = &*x; 58LL | let y = &*x;
59 | --- borrow of `x` occurs here 59 | --- borrow of `x` occurs here
60LL | unsafe { 60LL | unsafe {
61LL | asm!("nop" : "+r"(x)); 61LL | llvm_asm!("nop" : "+r"(x));
62 | ^ assignment to borrowed `x` occurs here 62 | ^ assignment to borrowed `x` occurs here
63LL | } 63LL | }
64LL | let z = y; 64LL | let z = y;
65 | - borrow later used here 65 | - borrow later used here
66 66
67error[E0382]: use of moved value: `x` 67error[E0382]: use of moved value: `x`
68 --> $DIR/borrowck-asm.rs:76:40 68 --> $DIR/borrowck-asm.rs:76:45
69 | 69 |
70LL | let x = &mut 2; 70LL | let x = &mut 2;
71 | - move occurs because `x` has type `&mut i32`, which does not implement the `Copy` trait 71 | - move occurs because `x` has type `&mut i32`, which does not implement the `Copy` trait
72LL | unsafe { 72LL | unsafe {
73LL | asm!("nop" : : "r"(x), "r"(x) ); 73LL | llvm_asm!("nop" : : "r"(x), "r"(x) );
74 | - ^ value used here after move 74 | - ^ value used here after move
75 | | 75 | |
76 | value moved here 76 | value moved here
77 77
78error: aborting due to 7 previous errors 78error: aborting due to 7 previous errors
79 79
diff --git a/src/test/ui/error-codes/E0660.rs b/src/test/ui/error-codes/E0660.rs
index 6280d39..842ae59 100644
--- a/src/test/ui/error-codes/E0660.rs
+++ b/src/test/ui/error-codes/E0660.rs
@@ -1,9 +1,9 @@
1#![feature(asm)] 1#![feature(llvm_asm)]
2 2
3fn main() { 3fn main() {
4 let a; 4 let a;
5 asm!("nop" "nop"); 5 llvm_asm!("nop" "nop");
6 //~^ ERROR E0660 6 //~^ ERROR E0660
7 asm!("nop" "nop" : "=r"(a)); 7 llvm_asm!("nop" "nop" : "=r"(a));
8 //~^ ERROR E0660 8 //~^ ERROR E0660
9} 9}
diff --git a/src/test/ui/error-codes/E0660.stderr b/src/test/ui/error-codes/E0660.stderr
index d355531..69288ea6 100644
--- a/src/test/ui/error-codes/E0660.stderr
+++ b/src/test/ui/error-codes/E0660.stderr
@@ -1,14 +1,14 @@
1error[E0660]: malformed inline assembly 1error[E0660]: malformed inline assembly
2 --> $DIR/E0660.rs:5:5 2 --> $DIR/E0660.rs:5:5
3 | 3 |
4LL | asm!("nop" "nop"); 4LL | llvm_asm!("nop" "nop");
5 | ^^^^^^^^^^^^^^^^^^ 5 | ^^^^^^^^^^^^^^^^^^^^^^^
6 6
7error[E0660]: malformed inline assembly 7error[E0660]: malformed inline assembly
8 --> $DIR/E0660.rs:7:5 8 --> $DIR/E0660.rs:7:5
9 | 9 |
10LL | asm!("nop" "nop" : "=r"(a)); 10LL | llvm_asm!("nop" "nop" : "=r"(a));
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 12
13error: aborting due to 2 previous errors 13error: aborting due to 2 previous errors
14 14
diff --git a/src/test/ui/error-codes/E0661.rs b/src/test/ui/error-codes/E0661.rs
index 5ac0c41..1099edd 100644
--- a/src/test/ui/error-codes/E0661.rs
+++ b/src/test/ui/error-codes/E0661.rs
@@ -1,9 +1,9 @@
1// ignore-emscripten 1// ignore-emscripten
2 2
3#![feature(asm)] 3#![feature(llvm_asm)]
4 4
5fn main() { 5fn main() {
6 let a; //~ ERROR type annotations needed 6 let a; //~ ERROR type annotations needed
7 asm!("nop" : "r"(a)); 7 llvm_asm!("nop" : "r"(a));
8 //~^ ERROR E0661 8 //~^ ERROR E0661
9} 9}
diff --git a/src/test/ui/error-codes/E0661.stderr b/src/test/ui/error-codes/E0661.stderr
index 6e84964..fe3887e 100644
--- a/src/test/ui/error-codes/E0661.stderr
+++ b/src/test/ui/error-codes/E0661.stderr
@@ -1,8 +1,8 @@
1error[E0661]: output operand constraint lacks '=' or '+' 1error[E0661]: output operand constraint lacks '=' or '+'
2 --> $DIR/E0661.rs:7:18 2 --> $DIR/E0661.rs:7:23
3 | 3 |
4LL | asm!("nop" : "r"(a)); 4LL | llvm_asm!("nop" : "r"(a));
5 | ^^^ 5 | ^^^
6 6
7error[E0282]: type annotations needed 7error[E0282]: type annotations needed
8 --> $DIR/E0661.rs:6:9 8 --> $DIR/E0661.rs:6:9
diff --git a/src/test/ui/error-codes/E0662.rs b/src/test/ui/error-codes/E0662.rs
index 343ed27..0950059 100644
--- a/src/test/ui/error-codes/E0662.rs
+++ b/src/test/ui/error-codes/E0662.rs
@@ -1,10 +1,10 @@
1// ignore-emscripten 1// ignore-emscripten
2 2
3#![feature(asm)] 3#![feature(llvm_asm)]
4 4
5fn main() { 5fn main() {
6 asm!("xor %eax, %eax" 6 llvm_asm!("xor %eax, %eax"
7 : 7 :
8 : "=test"("a") //~ ERROR E0662 8 : "=test"("a") //~ ERROR E0662
9 ); 9 );
10} 10}
diff --git a/src/test/ui/error-codes/E0662.stderr b/src/test/ui/error-codes/E0662.stderr
index 7480f03..ebc5f62 100644
--- a/src/test/ui/error-codes/E0662.stderr
+++ b/src/test/ui/error-codes/E0662.stderr
@@ -1,8 +1,8 @@
1error[E0662]: input operand constraint contains '=' 1error[E0662]: input operand constraint contains '='
2 --> $DIR/E0662.rs:8:12 2 --> $DIR/E0662.rs:8:17
3 | 3 |
4LL | : "=test"("a") 4LL | : "=test"("a")
5 | ^^^^^^^ 5 | ^^^^^^^
6 6
7error: aborting due to previous error 7error: aborting due to previous error
8 8
diff --git a/src/test/ui/error-codes/E0663.rs b/src/test/ui/error-codes/E0663.rs
index cfbb4b3..0783d70 100644
--- a/src/test/ui/error-codes/E0663.rs
+++ b/src/test/ui/error-codes/E0663.rs
@@ -1,10 +1,10 @@
1// ignore-emscripten 1// ignore-emscripten
2 2
3#![feature(asm)] 3#![feature(llvm_asm)]
4 4
5fn main() { 5fn main() {
6 asm!("xor %eax, %eax" 6 llvm_asm!("xor %eax, %eax"
7 : 7 :
8 : "+test"("a") //~ ERROR E0663 8 : "+test"("a") //~ ERROR E0663
9 ); 9 );
10} 10}
diff --git a/src/test/ui/error-codes/E0663.stderr b/src/test/ui/error-codes/E0663.stderr
index 2b7598d..4e421aa 100644
--- a/src/test/ui/error-codes/E0663.stderr
+++ b/src/test/ui/error-codes/E0663.stderr
@@ -1,8 +1,8 @@
1error[E0663]: input operand constraint contains '+' 1error[E0663]: input operand constraint contains '+'
2 --> $DIR/E0663.rs:8:12 2 --> $DIR/E0663.rs:8:17
3 | 3 |
4LL | : "+test"("a") 4LL | : "+test"("a")
5 | ^^^^^^^ 5 | ^^^^^^^
6 6
7error: aborting due to previous error 7error: aborting due to previous error
8 8
diff --git a/src/test/ui/error-codes/E0664.rs b/src/test/ui/error-codes/E0664.rs
index fe70c9f..f8ca5c9 100644
--- a/src/test/ui/error-codes/E0664.rs
+++ b/src/test/ui/error-codes/E0664.rs
@@ -1,11 +1,11 @@
1// ignore-emscripten 1// ignore-emscripten
2 2
3#![feature(asm)] 3#![feature(llvm_asm)]
4 4
5fn main() { 5fn main() {
6 asm!("mov $$0x200, %eax" 6 llvm_asm!("mov $$0x200, %eax"
7 : 7 :
8 : 8 :
9 : "{eax}" //~ ERROR E0664 9 : "{eax}" //~ ERROR E0664
10 ); 10 );
11} 11}
diff --git a/src/test/ui/error-codes/E0664.stderr b/src/test/ui/error-codes/E0664.stderr
index 224fc63..d0ed0f0 100644
--- a/src/test/ui/error-codes/E0664.stderr
+++ b/src/test/ui/error-codes/E0664.stderr
@@ -1,8 +1,8 @@
1error[E0664]: clobber should not be surrounded by braces 1error[E0664]: clobber should not be surrounded by braces
2 --> $DIR/E0664.rs:9:12 2 --> $DIR/E0664.rs:9:17
3 | 3 |
4LL | : "{eax}" 4LL | : "{eax}"
5 | ^^^^^^^ 5 | ^^^^^^^
6 6
7error: aborting due to previous error 7error: aborting due to previous error
8 8
diff --git a/src/test/ui/feature-gates/feature-gate-asm.rs b/src/test/ui/feature-gates/feature-gate-asm.rs
index 1fce279..7eeeb4b 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 @@
3fn main() { 3fn main() {
4 unsafe { 4 unsafe {
5 asm!(""); //~ ERROR inline assembly is not stable enough 5 asm!(""); //~ ERROR inline assembly is not stable enough
6 llvm_asm!(""); //~ ERROR inline assembly is not stable enough
6 } 7 }
7} 8}
diff --git a/src/test/ui/feature-gates/feature-gate-asm.stderr b/src/test/ui/feature-gates/feature-gate-asm.stderr
index 265d38f..1f9eaa5 100644
--- a/src/test/ui/feature-gates/feature-gate-asm.stderr
+++ b/src/test/ui/feature-gates/feature-gate-asm.stderr
@@ -4,9 +4,18 @@ error[E0658]: use of unstable library feature 'asm': inline assembly is not stab
4LL | asm!(""); 4LL | asm!("");
5 | ^^^ 5 | ^^^
6 | 6 |
7 = note: see issue #29722 <https://github.com/rust-lang/rust/issues/29722> for more information 7 = note: see issue #70173 <https://github.com/rust-lang/rust/issues/70173> for more information
8 = help: add `#![feature(asm)]` to the crate attributes to enable 8 = help: add `#![feature(asm)]` to the crate attributes to enable
9 9
10error: aborting due to previous error 10error[E0658]: use of unstable library feature 'llvm_asm': inline assembly is not stable enough for use and is subject to change
11 --> $DIR/feature-gate-asm.rs:6:9
12 |
13LL | llvm_asm!("");
14 | ^^^^^^^^
15 |
16 = note: see issue #70173 <https://github.com/rust-lang/rust/issues/70173> for more information
17 = help: add `#![feature(llvm_asm)]` to the crate attributes to enable
18
19error: aborting due to 2 previous errors
11 20
12For more information about this error, try `rustc --explain E0658`. 21For 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 4f56aa7..666a489 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 @@
3fn main() { 3fn main() {
4 unsafe { 4 unsafe {
5 println!("{:?}", asm!("")); //~ ERROR inline assembly is not stable 5 println!("{:?}", asm!("")); //~ ERROR inline assembly is not stable
6 println!("{:?}", llvm_asm!("")); //~ ERROR inline assembly is not stable
6 } 7 }
7} 8}
diff --git a/src/test/ui/feature-gates/feature-gate-asm2.stderr b/src/test/ui/feature-gates/feature-gate-asm2.stderr
index 7ea7bda..17ba66e 100644
--- a/src/test/ui/feature-gates/feature-gate-asm2.stderr
+++ b/src/test/ui/feature-gates/feature-gate-asm2.stderr
@@ -4,9 +4,18 @@ error[E0658]: use of unstable library feature 'asm': inline assembly is not stab
4LL | println!("{:?}", asm!("")); 4LL | println!("{:?}", asm!(""));
5 | ^^^ 5 | ^^^
6 | 6 |
7 = note: see issue #29722 <https://github.com/rust-lang/rust/issues/29722> for more information 7 = note: see issue #70173 <https://github.com/rust-lang/rust/issues/70173> for more information
8 = help: add `#![feature(asm)]` to the crate attributes to enable 8 = help: add `#![feature(asm)]` to the crate attributes to enable
9 9
10error: aborting due to previous error 10error[E0658]: use of unstable library feature 'llvm_asm': inline assembly is not stable enough for use and is subject to change
11 --> $DIR/feature-gate-asm2.rs:6:26
12 |
13LL | println!("{:?}", llvm_asm!(""));
14 | ^^^^^^^^
15 |
16 = note: see issue #70173 <https://github.com/rust-lang/rust/issues/70173> for more information
17 = help: add `#![feature(llvm_asm)]` to the crate attributes to enable
18
19error: aborting due to 2 previous errors
11 20
12For more information about this error, try `rustc --explain E0658`. 21For 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 04fd576..edf2c2e 100644
--- a/src/test/ui/inline-asm-bad-constraint.rs
+++ b/src/test/ui/inline-asm-bad-constraint.rs
@@ -3,7 +3,7 @@
3// build-fail 3// build-fail
4// ignore-emscripten 4// ignore-emscripten
5 5
6#![feature(asm)] 6#![feature(llvm_asm)]
7 7
8extern "C" { 8extern "C" {
9 fn foo(a: usize); 9 fn foo(a: usize);
@@ -19,7 +19,7 @@ fn main() {
19fn bad_register_constraint() { 19fn bad_register_constraint() {
20 let rax: u64; 20 let rax: u64;
21 unsafe { 21 unsafe {
22 asm!("" :"={rax"(rax)) //~ ERROR E0668 22 llvm_asm!("" :"={rax"(rax)) //~ ERROR E0668
23 }; 23 };
24 println!("Accumulator is: {}", rax); 24 println!("Accumulator is: {}", rax);
25} 25}
@@ -27,14 +27,14 @@ fn bad_register_constraint() {
27// Issue #54376 27// Issue #54376
28fn bad_input() { 28fn bad_input() {
29 unsafe { 29 unsafe {
30 asm!("callq $0" : : "0"(foo)) //~ ERROR E0668 30 llvm_asm!("callq $0" : : "0"(foo)) //~ ERROR E0668
31 }; 31 };
32} 32}
33 33
34fn wrong_size_output() { 34fn wrong_size_output() {
35 let rax: u64 = 0; 35 let rax: u64 = 0;
36 unsafe { 36 unsafe {
37 asm!("addb $1, $0" : "={rax}"((0i32, rax))); //~ ERROR E0668 37 llvm_asm!("addb $1, $0" : "={rax}"((0i32, rax))); //~ ERROR E0668
38 } 38 }
39 println!("rax: {}", rax); 39 println!("rax: {}", rax);
40} 40}
diff --git a/src/test/ui/inline-asm-bad-constraint.stderr b/src/test/ui/inline-asm-bad-constraint.stderr
index 2647e33..d6a3b6e 100644
--- a/src/test/ui/inline-asm-bad-constraint.stderr
+++ b/src/test/ui/inline-asm-bad-constraint.stderr
@@ -1,24 +1,24 @@
1error[E0668]: malformed inline assembly 1error[E0668]: malformed inline assembly
2 --> $DIR/inline-asm-bad-constraint.rs:22:9 2 --> $DIR/inline-asm-bad-constraint.rs:22:9
3 | 3 |
4LL | asm!("" :"={rax"(rax)) 4LL | llvm_asm!("" :"={rax"(rax))
5 | ^^^^^^^^^^^^^^^^^^^^^^ 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 | 6 |
7 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) 7 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
8 8
9error[E0668]: malformed inline assembly 9error[E0668]: malformed inline assembly
10 --> $DIR/inline-asm-bad-constraint.rs:30:9 10 --> $DIR/inline-asm-bad-constraint.rs:30:9
11 | 11 |
12LL | asm!("callq $0" : : "0"(foo)) 12LL | llvm_asm!("callq $0" : : "0"(foo))
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14 | 14 |
15 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) 15 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
16 16
17error[E0668]: malformed inline assembly 17error[E0668]: malformed inline assembly
18 --> $DIR/inline-asm-bad-constraint.rs:37:9 18 --> $DIR/inline-asm-bad-constraint.rs:37:9
19 | 19 |
20LL | asm!("addb $1, $0" : "={rax}"((0i32, rax))); 20LL | llvm_asm!("addb $1, $0" : "={rax}"((0i32, rax)));
21 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 21 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22 | 22 |
23 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) 23 = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
24 24
diff --git a/src/test/ui/inline-asm-bad-operand.rs b/src/test/ui/inline-asm-bad-operand.rs
index f4e9922..e5fc4ee 100644
--- a/src/test/ui/inline-asm-bad-operand.rs
+++ b/src/test/ui/inline-asm-bad-operand.rs
@@ -4,7 +4,7 @@
4// build-fail 4// build-fail
5// ignore-emscripten 5// ignore-emscripten
6 6
7#![feature(asm)] 7#![feature(llvm_asm)]
8 8
9#[repr(C)] 9#[repr(C)]
10struct MyPtr(usize); 10struct MyPtr(usize);
@@ -19,41 +19,41 @@ fn main() {
19 19