Skip to content

Commit 6278299

Browse files
committed
no longer mark x86 soft-float as a forbidden feature
1 parent 98dc988 commit 6278299

File tree

5 files changed

+16
-12
lines changed

5 files changed

+16
-12
lines changed

compiler/rustc_target/src/target_features.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,6 @@ const X86_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
419419
("sha512", Unstable(sym::sha512_sm_x86), &["avx2"]),
420420
("sm3", Unstable(sym::sha512_sm_x86), &["avx"]),
421421
("sm4", Unstable(sym::sha512_sm_x86), &["avx2"]),
422-
("soft-float", Stability::Forbidden { reason: "unsound because it changes float ABI" }, &[]),
423422
("sse", Stable, &[]),
424423
("sse2", Stable, &["sse"]),
425424
("sse3", Stable, &["sse2"]),
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
//@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=lib
2-
//@ needs-llvm-components: x86
1+
//@ compile-flags: --target=riscv32i-unknown-none-elf --crate-type=lib
2+
//@ needs-llvm-components: riscv
33
#![feature(no_core, lang_items)]
44
#![no_core]
55

66
#[lang = "sized"]
77
pub trait Sized {}
88

9-
#[target_feature(enable = "soft-float")]
9+
#[target_feature(enable = "forced-atomics")]
1010
//~^ERROR: cannot be enabled with
1111
pub unsafe fn my_fun() {}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: target feature `soft-float` cannot be enabled with `#[target_feature]`: unsound because it changes float ABI
1+
error: target feature `forced-atomics` cannot be enabled with `#[target_feature]`: unsound because it changes the ABI of atomic operations
22
--> $DIR/forbidden-target-feature-attribute.rs:9:18
33
|
4-
LL | #[target_feature(enable = "soft-float")]
5-
| ^^^^^^^^^^^^^^^^^^^^^
4+
LL | #[target_feature(enable = "forced-atomics")]
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
66

77
error: aborting due to 1 previous error
88

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
warning: target feature `soft-float` cannot be disabled with `-Ctarget-feature`: unsound because it changes float ABI
1+
warning: unknown and unstable feature specified for `-Ctarget-feature`: `soft-float`
22
|
3-
= note: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
4-
= note: for more information, see issue #116344 <https://github.com/rust-lang/rust/issues/116344>
3+
= note: it is still passed through to the codegen backend, but use of this feature might be unsound and the behavior of this feature can change in the future
4+
= help: consider filing a feature request
55

66
warning: 1 warning emitted
77

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
warning: target feature `soft-float` cannot be enabled with `-Ctarget-feature`: unsound because it changes float ABI
1+
warning: unknown and unstable feature specified for `-Ctarget-feature`: `soft-float`
2+
|
3+
= note: it is still passed through to the codegen backend, but use of this feature might be unsound and the behavior of this feature can change in the future
4+
= help: consider filing a feature request
5+
6+
warning: target feature `soft-float` cannot be enabled with `-Ctarget-feature`: this feature is incompatible with the target ABI
27
|
38
= note: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
49
= note: for more information, see issue #116344 <https://github.com/rust-lang/rust/issues/116344>
510

6-
warning: 1 warning emitted
11+
warning: 2 warnings emitted
712

0 commit comments

Comments
 (0)