You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollup merge of rust-lang#137225 - RalfJung:vectorcall, r=nnethercote
vectorcall ABI: require SSE2
According to the official docs at https://learn.microsoft.com/en-us/cpp/cpp/vectorcall, SSE2 is required for this ABI. Add a check that enforces this.
I put this together with the other checks ensuring the target features required for a function are present... however, since the ABI is known pre-monomorphization, it would be possible to do this check earlier, which would have the advantage of checking even in `cargo check`. It would have the disadvantage of spreading this code in yet more places.
The first commit just does a little refactoring of the mono-time ABI check to make it easier to add the new check.
Cc `@workingjubilee`
this function call uses SIMD vector type `{$ty}` which (with the chosen ABI) requires the `{$required_feature}` target feature, which is not enabled in the caller
3
-
.label = function called here
4
-
.help = consider enabling it globally (`-C target-feature=+{$required_feature}`) or locally (`#[target_feature(enable="{$required_feature}")]`)
5
-
monomorphize_abi_error_disabled_vector_type_def =
6
-
this function definition uses SIMD vector type `{$ty}` which (with the chosen ABI) requires the `{$required_feature}` target feature, which is not enabled
7
-
.label = function defined here
1
+
monomorphize_abi_error_disabled_vector_type =
2
+
this function {$is_call->
3
+
[true] call
4
+
*[false] definition
5
+
} uses SIMD vector type `{$ty}` which (with the chosen ABI) requires the `{$required_feature}` target feature, which is not enabled{$is_call->
6
+
[true] {""}in the caller
7
+
*[false] {""}
8
+
}
9
+
.label = function {$is_call->
10
+
[true] called
11
+
*[false] defined
12
+
} here
8
13
.help = consider enabling it globally (`-C target-feature=+{$required_feature}`) or locally (`#[target_feature(enable="{$required_feature}")]`)
warning: this function definition uses SIMD vector type `SseVector` which (with the chosen ABI) requires the `sse` target feature, which is not enabled
2
+
--> $DIR/sse-abi-checks.rs:19:1
3
+
|
4
+
LL | pub unsafe extern "C" fn f(_: SseVector) {
5
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
6
+
|
7
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8
+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
9
+
= help: consider enabling it globally (`-C target-feature=+sse`) or locally (`#[target_feature(enable="sse")]`)
10
+
= note: `#[warn(abi_unsupported_vector_types)]` on by default
warning: this function definition uses SIMD vector type `SseVector` which (with the chosen ABI) requires the `sse` target feature, which is not enabled
16
+
--> $DIR/sse-abi-checks.rs:19:1
17
+
|
18
+
LL | pub unsafe extern "C" fn f(_: SseVector) {
19
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here
20
+
|
21
+
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
22
+
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558>
23
+
= help: consider enabling it globally (`-C target-feature=+sse`) or locally (`#[target_feature(enable="sse")]`)
24
+
= note: `#[warn(abi_unsupported_vector_types)]` on by default
0 commit comments