Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8a6f96a

Browse files
committedMar 20, 2025
rustc_target: Use zvl*b target features in vector ABI check
1 parent 55add8f commit 8a6f96a

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed
 

‎compiler/rustc_target/src/target_features.rs

+14-2
Original file line numberDiff line numberDiff line change
@@ -740,8 +740,20 @@ const ARM_FEATURES_FOR_CORRECT_VECTOR_ABI: &'static [(u64, &'static str)] = &[(1
740740
const POWERPC_FEATURES_FOR_CORRECT_VECTOR_ABI: &'static [(u64, &'static str)] = &[(128, "altivec")];
741741
const WASM_FEATURES_FOR_CORRECT_VECTOR_ABI: &'static [(u64, &'static str)] = &[(128, "simd128")];
742742
const S390X_FEATURES_FOR_CORRECT_VECTOR_ABI: &'static [(u64, &'static str)] = &[(128, "vector")];
743-
const RISCV_FEATURES_FOR_CORRECT_VECTOR_ABI: &'static [(u64, &'static str)] =
744-
&[/*(64, "zvl64b"), */ (128, "v")];
743+
const RISCV_FEATURES_FOR_CORRECT_VECTOR_ABI: &'static [(u64, &'static str)] = &[
744+
(32, "zvl32b"),
745+
(64, "zvl64b"),
746+
(128, "zvl128b"),
747+
(256, "zvl256b"),
748+
(512, "zvl512b"),
749+
(1024, "zvl1024b"),
750+
(2048, "zvl2048b"),
751+
(4096, "zvl4096b"),
752+
(8192, "zvl8192b"),
753+
(16384, "zvl16384b"),
754+
(32768, "zvl32768b"),
755+
(65536, "zvl65536b"),
756+
];
745757
// Always warn on SPARC, as the necessary target features cannot be enabled in Rust at the moment.
746758
const SPARC_FEATURES_FOR_CORRECT_VECTOR_ABI: &'static [(u64, &'static str)] = &[/*(64, "vis")*/];
747759

0 commit comments

Comments
 (0)
Failed to load comments.