-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add rustc_abi to control ABI decisions LLVM does not have flags for, …
…and use it for x86 softfloat
- Loading branch information
Showing
12 changed files
with
125 additions
and
43 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
6 changes: 3 additions & 3 deletions
6
tests/ui/target-feature/forbidden-target-feature-attribute.rs
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
//@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=lib | ||
//@ needs-llvm-components: x86 | ||
//@ compile-flags: --target=riscv32e-unknown-none-elf --crate-type=lib | ||
//@ needs-llvm-components: riscv | ||
#![feature(no_core, lang_items)] | ||
#![no_core] | ||
|
||
#[lang = "sized"] | ||
pub trait Sized {} | ||
|
||
#[target_feature(enable = "soft-float")] | ||
#[target_feature(enable = "forced-atomics")] | ||
//~^ERROR: cannot be enabled with | ||
pub unsafe fn my_fun() {} |
6 changes: 3 additions & 3 deletions
6
tests/ui/target-feature/forbidden-target-feature-attribute.stderr
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
error: target feature `soft-float` cannot be enabled with `#[target_feature]`: unsound because it changes float ABI | ||
error: target feature `forced-atomics` cannot be enabled with `#[target_feature]`: unsound because it changes the ABI of atomic operations | ||
--> $DIR/forbidden-target-feature-attribute.rs:9:18 | ||
| | ||
LL | #[target_feature(enable = "soft-float")] | ||
| ^^^^^^^^^^^^^^^^^^^^^ | ||
LL | #[target_feature(enable = "forced-atomics")] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 1 previous error | ||
|
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
5 changes: 2 additions & 3 deletions
5
tests/ui/target-feature/forbidden-target-feature-flag-disable.stderr
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
warning: target feature `soft-float` cannot be disabled with `-Ctarget-feature`: unsound because it changes float ABI | ||
warning: unstable feature specified for `-Ctarget-feature`: `soft-float` | ||
| | ||
= note: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #116344 <https://github.com/rust-lang/rust/issues/116344> | ||
= note: this feature is not stably supported; its behavior can change in the future | ||
|
||
warning: 1 warning emitted | ||
|
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 |
---|---|---|
@@ -1,7 +1,11 @@ | ||
warning: target feature `soft-float` cannot be enabled with `-Ctarget-feature`: unsound because it changes float ABI | ||
warning: unstable feature specified for `-Ctarget-feature`: `soft-float` | ||
| | ||
= note: this feature is not stably supported; its behavior can change in the future | ||
|
||
warning: target feature `soft-float` cannot be enabled with `-Ctarget-feature`: this feature is incompatible with the target ABI | ||
| | ||
= note: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #116344 <https://github.com/rust-lang/rust/issues/116344> | ||
|
||
warning: 1 warning emitted | ||
warning: 2 warnings emitted | ||
|