Skip to content

Commit 7536645

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

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

crates/core_arch/src/wasm32/simd128.rs

+11
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ types! {
3333
/// type in WebAssembly. Operations on `v128` can only be performed with the
3434
/// functions in this module.
3535
// N.B., internals here are arbitrary.
36+
#[target_feature(enable = "simd128")]
3637
#[stable(feature = "wasm_simd", since = "1.54.0")]
3738
pub struct v128(i32, i32, i32, i32);
3839
}
@@ -660,6 +661,7 @@ pub unsafe fn v128_store64_lane<const L: usize>(v: v128, m: *mut u64) {
660661
a15 = 15,
661662
)
662663
)]
664+
#[target_feature(enable = "simd128")]
663665
#[doc(alias("v128.const"))]
664666
#[stable(feature = "wasm_simd", since = "1.54.0")]
665667
#[rustc_const_stable(feature = "wasm_simd", since = "1.54.0")]
@@ -692,6 +694,7 @@ pub const fn i8x16(
692694
/// If possible this will generate a `v128.const` instruction, otherwise it may
693695
/// be lowered to a sequence of instructions to materialize the vector value.
694696
#[inline]
697+
#[target_feature(enable = "simd128")]
695698
#[doc(alias("v128.const"))]
696699
#[stable(feature = "wasm_simd", since = "1.54.0")]
697700
#[rustc_const_stable(feature = "wasm_simd", since = "1.54.0")]
@@ -738,6 +741,7 @@ pub const fn u8x16(
738741
a7 = 7,
739742
)
740743
)]
744+
#[target_feature(enable = "simd128")]
741745
#[doc(alias("v128.const"))]
742746
#[stable(feature = "wasm_simd", since = "1.54.0")]
743747
#[rustc_const_stable(feature = "wasm_simd", since = "1.54.0")]
@@ -750,6 +754,7 @@ pub const fn i16x8(a0: i16, a1: i16, a2: i16, a3: i16, a4: i16, a5: i16, a6: i16
750754
/// If possible this will generate a `v128.const` instruction, otherwise it may
751755
/// be lowered to a sequence of instructions to materialize the vector value.
752756
#[inline]
757+
#[target_feature(enable = "simd128")]
753758
#[doc(alias("v128.const"))]
754759
#[stable(feature = "wasm_simd", since = "1.54.0")]
755760
#[rustc_const_stable(feature = "wasm_simd", since = "1.54.0")]
@@ -763,6 +768,7 @@ pub const fn u16x8(a0: u16, a1: u16, a2: u16, a3: u16, a4: u16, a5: u16, a6: u16
763768
/// be lowered to a sequence of instructions to materialize the vector value.
764769
#[inline]
765770
#[cfg_attr(test, assert_instr(v128.const, a0 = 0, a1 = 1, a2 = 2, a3 = 3))]
771+
#[target_feature(enable = "simd128")]
766772
#[doc(alias("v128.const"))]
767773
#[stable(feature = "wasm_simd", since = "1.54.0")]
768774
#[rustc_const_stable(feature = "wasm_simd", since = "1.54.0")]
@@ -775,6 +781,7 @@ pub const fn i32x4(a0: i32, a1: i32, a2: i32, a3: i32) -> v128 {
775781
/// If possible this will generate a `v128.const` instruction, otherwise it may
776782
/// be lowered to a sequence of instructions to materialize the vector value.
777783
#[inline]
784+
#[target_feature(enable = "simd128")]
778785
#[doc(alias("v128.const"))]
779786
#[stable(feature = "wasm_simd", since = "1.54.0")]
780787
#[rustc_const_stable(feature = "wasm_simd", since = "1.54.0")]
@@ -788,6 +795,7 @@ pub const fn u32x4(a0: u32, a1: u32, a2: u32, a3: u32) -> v128 {
788795
/// be lowered to a sequence of instructions to materialize the vector value.
789796
#[inline]
790797
#[cfg_attr(test, assert_instr(v128.const, a0 = 1, a1 = 2))]
798+
#[target_feature(enable = "simd128")]
791799
#[doc(alias("v128.const"))]
792800
#[stable(feature = "wasm_simd", since = "1.54.0")]
793801
#[rustc_const_stable(feature = "wasm_simd", since = "1.54.0")]
@@ -800,6 +808,7 @@ pub const fn i64x2(a0: i64, a1: i64) -> v128 {
800808
/// If possible this will generate a `v128.const` instruction, otherwise it may
801809
/// be lowered to a sequence of instructions to materialize the vector value.
802810
#[inline]
811+
#[target_feature(enable = "simd128")]
803812
#[doc(alias("v128.const"))]
804813
#[stable(feature = "wasm_simd", since = "1.54.0")]
805814
#[rustc_const_stable(feature = "wasm_simd", since = "1.54.0")]
@@ -813,6 +822,7 @@ pub const fn u64x2(a0: u64, a1: u64) -> v128 {
813822
/// be lowered to a sequence of instructions to materialize the vector value.
814823
#[inline]
815824
#[cfg_attr(test, assert_instr(v128.const, a0 = 0.0, a1 = 1.0, a2 = 2.0, a3 = 3.0))]
825+
#[target_feature(enable = "simd128")]
816826
#[doc(alias("v128.const"))]
817827
#[stable(feature = "wasm_simd", since = "1.54.0")]
818828
#[rustc_const_stable(feature = "wasm_simd_const", since = "1.56.0")]
@@ -826,6 +836,7 @@ pub const fn f32x4(a0: f32, a1: f32, a2: f32, a3: f32) -> v128 {
826836
/// be lowered to a sequence of instructions to materialize the vector value.
827837
#[inline]
828838
#[cfg_attr(test, assert_instr(v128.const, a0 = 0.0, a1 = 1.0))]
839+
#[target_feature(enable = "simd128")]
829840
#[doc(alias("v128.const"))]
830841
#[stable(feature = "wasm_simd", since = "1.54.0")]
831842
#[rustc_const_stable(feature = "wasm_simd_const", since = "1.56.0")]

0 commit comments

Comments
 (0)