Skip to content

Commit 6abab4e

Browse files
committed
Add missing #[target_feature(enable = "simd128")]
1 parent bd9267e commit 6abab4e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

crates/core_arch/src/wasm32/simd128.rs

+10
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,7 @@ pub unsafe fn v128_store64_lane<const L: usize>(v: v128, m: *mut u64) {
660660
a15 = 15,
661661
)
662662
)]
663+
#[target_feature(enable = "simd128")]
663664
#[doc(alias("v128.const"))]
664665
#[stable(feature = "wasm_simd", since = "1.54.0")]
665666
#[rustc_const_stable(feature = "wasm_simd", since = "1.54.0")]
@@ -692,6 +693,7 @@ pub const fn i8x16(
692693
/// If possible this will generate a `v128.const` instruction, otherwise it may
693694
/// be lowered to a sequence of instructions to materialize the vector value.
694695
#[inline]
696+
#[target_feature(enable = "simd128")]
695697
#[doc(alias("v128.const"))]
696698
#[stable(feature = "wasm_simd", since = "1.54.0")]
697699
#[rustc_const_stable(feature = "wasm_simd", since = "1.54.0")]
@@ -738,6 +740,7 @@ pub const fn u8x16(
738740
a7 = 7,
739741
)
740742
)]
743+
#[target_feature(enable = "simd128")]
741744
#[doc(alias("v128.const"))]
742745
#[stable(feature = "wasm_simd", since = "1.54.0")]
743746
#[rustc_const_stable(feature = "wasm_simd", since = "1.54.0")]
@@ -750,6 +753,7 @@ pub const fn i16x8(a0: i16, a1: i16, a2: i16, a3: i16, a4: i16, a5: i16, a6: i16
750753
/// If possible this will generate a `v128.const` instruction, otherwise it may
751754
/// be lowered to a sequence of instructions to materialize the vector value.
752755
#[inline]
756+
#[target_feature(enable = "simd128")]
753757
#[doc(alias("v128.const"))]
754758
#[stable(feature = "wasm_simd", since = "1.54.0")]
755759
#[rustc_const_stable(feature = "wasm_simd", since = "1.54.0")]
@@ -763,6 +767,7 @@ pub const fn u16x8(a0: u16, a1: u16, a2: u16, a3: u16, a4: u16, a5: u16, a6: u16
763767
/// be lowered to a sequence of instructions to materialize the vector value.
764768
#[inline]
765769
#[cfg_attr(test, assert_instr(v128.const, a0 = 0, a1 = 1, a2 = 2, a3 = 3))]
770+
#[target_feature(enable = "simd128")]
766771
#[doc(alias("v128.const"))]
767772
#[stable(feature = "wasm_simd", since = "1.54.0")]
768773
#[rustc_const_stable(feature = "wasm_simd", since = "1.54.0")]
@@ -775,6 +780,7 @@ pub const fn i32x4(a0: i32, a1: i32, a2: i32, a3: i32) -> v128 {
775780
/// If possible this will generate a `v128.const` instruction, otherwise it may
776781
/// be lowered to a sequence of instructions to materialize the vector value.
777782
#[inline]
783+
#[target_feature(enable = "simd128")]
778784
#[doc(alias("v128.const"))]
779785
#[stable(feature = "wasm_simd", since = "1.54.0")]
780786
#[rustc_const_stable(feature = "wasm_simd", since = "1.54.0")]
@@ -788,6 +794,7 @@ pub const fn u32x4(a0: u32, a1: u32, a2: u32, a3: u32) -> v128 {
788794
/// be lowered to a sequence of instructions to materialize the vector value.
789795
#[inline]
790796
#[cfg_attr(test, assert_instr(v128.const, a0 = 1, a1 = 2))]
797+
#[target_feature(enable = "simd128")]
791798
#[doc(alias("v128.const"))]
792799
#[stable(feature = "wasm_simd", since = "1.54.0")]
793800
#[rustc_const_stable(feature = "wasm_simd", since = "1.54.0")]
@@ -800,6 +807,7 @@ pub const fn i64x2(a0: i64, a1: i64) -> v128 {
800807
/// If possible this will generate a `v128.const` instruction, otherwise it may
801808
/// be lowered to a sequence of instructions to materialize the vector value.
802809
#[inline]
810+
#[target_feature(enable = "simd128")]
803811
#[doc(alias("v128.const"))]
804812
#[stable(feature = "wasm_simd", since = "1.54.0")]
805813
#[rustc_const_stable(feature = "wasm_simd", since = "1.54.0")]
@@ -813,6 +821,7 @@ pub const fn u64x2(a0: u64, a1: u64) -> v128 {
813821
/// be lowered to a sequence of instructions to materialize the vector value.
814822
#[inline]
815823
#[cfg_attr(test, assert_instr(v128.const, a0 = 0.0, a1 = 1.0, a2 = 2.0, a3 = 3.0))]
824+
#[target_feature(enable = "simd128")]
816825
#[doc(alias("v128.const"))]
817826
#[stable(feature = "wasm_simd", since = "1.54.0")]
818827
#[rustc_const_stable(feature = "wasm_simd_const", since = "1.56.0")]
@@ -826,6 +835,7 @@ pub const fn f32x4(a0: f32, a1: f32, a2: f32, a3: f32) -> v128 {
826835
/// be lowered to a sequence of instructions to materialize the vector value.
827836
#[inline]
828837
#[cfg_attr(test, assert_instr(v128.const, a0 = 0.0, a1 = 1.0))]
838+
#[target_feature(enable = "simd128")]
829839
#[doc(alias("v128.const"))]
830840
#[stable(feature = "wasm_simd", since = "1.54.0")]
831841
#[rustc_const_stable(feature = "wasm_simd_const", since = "1.56.0")]

0 commit comments

Comments
 (0)