diff options
| author | bors <bors@rust-lang.org> | 2020-03-27 03:27:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-03-27 03:27:09 +0000 |
| commit | 6c19a10e24af157b96687ca8dc1b48ebac4b9489 (patch) | |
| tree | af4246ff21626b91d238c82664ea09f49422c948 /src/librustc_error_codes/error_codes | |
| parent | 7b73d14b0b35e7b4f79f2d71dc1bbbab31698288 (diff) | |
| parent | 1cc521ef9d8a8a2eb48f0e11ddfc1e70734aff10 (diff) | |
| download | rust-6c19a10e24af157b96687ca8dc1b48ebac4b9489.tar.gz rust-6c19a10e24af157b96687ca8dc1b48ebac4b9489.zip | |
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!`.
Diffstat (limited to 'src/librustc_error_codes/error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0660.md | 4 | ||||
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0661.md | 4 | ||||
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0662.md | 11 | ||||
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0663.md | 11 | ||||
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0664.md | 12 | ||||
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0668.md | 4 |
6 files changed, 24 insertions, 22 deletions
diff --git a/src/librustc_error_codes/error_codes/E0660.md b/src/librustc_error_codes/error_codes/E0660.md index 189459175dc..732de6a3818 100644 --- a/src/librustc_error_codes/error_codes/E0660.md +++ b/src/librustc_error_codes/error_codes/E0660.md @@ -1,9 +1,9 @@ -The argument to the `asm` macro is not well-formed. +The argument to the `llvm_asm` macro is not well-formed. Erroneous code example: ```compile_fail,E0660 -asm!("nop" "nop"); +llvm_asm!("nop" "nop"); ``` Considering 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 b171ada6205..3d5cd90f6a3 100644 --- a/src/librustc_error_codes/error_codes/E0661.md +++ b/src/librustc_error_codes/error_codes/E0661.md @@ -1,10 +1,10 @@ -An invalid syntax was passed to the second argument of an `asm` macro line. +An invalid syntax was passed to the second argument of an `llvm_asm` macro line. Erroneous code example: ```compile_fail,E0661 let a; -asm!("nop" : "r"(a)); +llvm_asm!("nop" : "r"(a)); ``` Considering 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 c15e736610b..9858abd10c5 100644 --- a/src/librustc_error_codes/error_codes/E0662.md +++ b/src/librustc_error_codes/error_codes/E0662.md @@ -1,12 +1,13 @@ -An invalid input operand constraint was passed to the `asm` macro (third line). +An invalid input operand constraint was passed to the `llvm_asm` macro +(third line). Erroneous code example: ```compile_fail,E0662 -asm!("xor %eax, %eax" - : - : "=test"("a") - ); +llvm_asm!("xor %eax, %eax" + : + : "=test"("a") + ); ``` Considering 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 bd450230ec3..36b87be7d6e 100644 --- a/src/librustc_error_codes/error_codes/E0663.md +++ b/src/librustc_error_codes/error_codes/E0663.md @@ -1,12 +1,13 @@ -An invalid input operand constraint was passed to the `asm` macro (third line). +An invalid input operand constraint was passed to the `llvm_asm` macro +(third line). Erroneous code example: ```compile_fail,E0663 -asm!("xor %eax, %eax" - : - : "+test"("a") - ); +llvm_asm!("xor %eax, %eax" + : + : "+test"("a") + ); ``` Considering 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 768ffdf2de9..33924b14e6d 100644 --- a/src/librustc_error_codes/error_codes/E0664.md +++ b/src/librustc_error_codes/error_codes/E0664.md @@ -1,13 +1,13 @@ -A clobber was surrounded by braces in the `asm` macro. +A clobber was surrounded by braces in the `llvm_asm` macro. Erroneous code example: ```compile_fail,E0664 -asm!("mov $$0x200, %eax" - : - : - : "{eax}" - ); +llvm_asm!("mov $$0x200, %eax" + : + : + : "{eax}" + ); ``` Considering 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 f5d26244fb9..3b43a1bcae9 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. In particular, it can happen if you forgot the closing bracket of a register constraint (see issue #51430): ```compile_fail,E0668 -#![feature(asm)] +#![feature(llvm_asm)] fn main() { let rax: u64; unsafe { - asm!("" :"={rax"(rax)); + llvm_asm!("" :"={rax"(rax)); println!("Accumulator is: {}", rax); } } |
