-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #105979 - matthiaskrgr:rollup-2luw3mx, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #105791 (docs: add long error explanation for error E0472) - #105897 (Fix an opaque type ICE) - #105904 (Fix arch flag on i686-apple-darwin) - #105949 (Bump `cfg-if` to `1.0` in rustc crates) - #105964 (rustdoc: prevent CSS layout of line numbers shrinking into nothing) - #105972 (rustdoc: simplify section anchor CSS) - #105973 (Avoid going through the happy path in case of non-fn builtin calls) - #105976 (Remove unused `check-stage2-T-arm-linux-androideabi-H-x86_64-unknown-linux-gnu` make rule) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
27 changed files
with
235 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Inline assembly (`asm!`) is not supported on this target. | ||
|
||
Example of erroneous code: | ||
|
||
```ignore (cannot-change-target) | ||
// compile-flags: --target sparc64-unknown-linux-gnu | ||
#![no_std] | ||
use core::arch::asm; | ||
fn main() { | ||
unsafe { | ||
asm!(""); // error: inline assembly is not supported on this target | ||
} | ||
} | ||
``` | ||
|
||
The Rust compiler does not support inline assembly, with the `asm!` macro | ||
(previously `llvm_asm!`), for all targets. All Tier 1 targets do support this | ||
macro but support among Tier 2 and 3 targets is not guaranteed (even when they | ||
have `std` support). Note that this error is related to | ||
`error[E0658]: inline assembly is not stable yet on this architecture`, but | ||
distinct in that with `E0472` support is not planned or in progress. | ||
|
||
There is no way to easily fix this issue, however: | ||
* Consider if you really need inline assembly, is there some other way to | ||
achieve your goal (intrinsics, etc)? | ||
* Consider writing your assembly externally, linking with it and calling it | ||
from Rust. | ||
* Consider contributing to <https://github.com/rust-lang/rust> and help | ||
integrate support for your target! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.