@@ -33,6 +33,7 @@ types! {
33
33
/// type in WebAssembly. Operations on `v128` can only be performed with the
34
34
/// functions in this module.
35
35
// N.B., internals here are arbitrary.
36
+ #[ target_feature( enable = "simd128" ) ]
36
37
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
37
38
pub struct v128( i32 , i32 , i32 , i32 ) ;
38
39
}
@@ -660,6 +661,7 @@ pub unsafe fn v128_store64_lane<const L: usize>(v: v128, m: *mut u64) {
660
661
a15 = 15 ,
661
662
)
662
663
) ]
664
+ #[ target_feature( enable = "simd128" ) ]
663
665
#[ doc( alias( "v128.const" ) ) ]
664
666
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
665
667
#[ rustc_const_stable( feature = "wasm_simd" , since = "1.54.0" ) ]
@@ -692,6 +694,7 @@ pub const fn i8x16(
692
694
/// If possible this will generate a `v128.const` instruction, otherwise it may
693
695
/// be lowered to a sequence of instructions to materialize the vector value.
694
696
#[ inline]
697
+ #[ target_feature( enable = "simd128" ) ]
695
698
#[ doc( alias( "v128.const" ) ) ]
696
699
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
697
700
#[ rustc_const_stable( feature = "wasm_simd" , since = "1.54.0" ) ]
@@ -738,6 +741,7 @@ pub const fn u8x16(
738
741
a7 = 7 ,
739
742
)
740
743
) ]
744
+ #[ target_feature( enable = "simd128" ) ]
741
745
#[ doc( alias( "v128.const" ) ) ]
742
746
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
743
747
#[ 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
750
754
/// If possible this will generate a `v128.const` instruction, otherwise it may
751
755
/// be lowered to a sequence of instructions to materialize the vector value.
752
756
#[ inline]
757
+ #[ target_feature( enable = "simd128" ) ]
753
758
#[ doc( alias( "v128.const" ) ) ]
754
759
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
755
760
#[ 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
763
768
/// be lowered to a sequence of instructions to materialize the vector value.
764
769
#[ inline]
765
770
#[ cfg_attr( test, assert_instr( v128. const , a0 = 0 , a1 = 1 , a2 = 2 , a3 = 3 ) ) ]
771
+ #[ target_feature( enable = "simd128" ) ]
766
772
#[ doc( alias( "v128.const" ) ) ]
767
773
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
768
774
#[ 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 {
775
781
/// If possible this will generate a `v128.const` instruction, otherwise it may
776
782
/// be lowered to a sequence of instructions to materialize the vector value.
777
783
#[ inline]
784
+ #[ target_feature( enable = "simd128" ) ]
778
785
#[ doc( alias( "v128.const" ) ) ]
779
786
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
780
787
#[ 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 {
788
795
/// be lowered to a sequence of instructions to materialize the vector value.
789
796
#[ inline]
790
797
#[ cfg_attr( test, assert_instr( v128. const , a0 = 1 , a1 = 2 ) ) ]
798
+ #[ target_feature( enable = "simd128" ) ]
791
799
#[ doc( alias( "v128.const" ) ) ]
792
800
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
793
801
#[ rustc_const_stable( feature = "wasm_simd" , since = "1.54.0" ) ]
@@ -800,6 +808,7 @@ pub const fn i64x2(a0: i64, a1: i64) -> v128 {
800
808
/// If possible this will generate a `v128.const` instruction, otherwise it may
801
809
/// be lowered to a sequence of instructions to materialize the vector value.
802
810
#[ inline]
811
+ #[ target_feature( enable = "simd128" ) ]
803
812
#[ doc( alias( "v128.const" ) ) ]
804
813
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
805
814
#[ rustc_const_stable( feature = "wasm_simd" , since = "1.54.0" ) ]
@@ -813,6 +822,7 @@ pub const fn u64x2(a0: u64, a1: u64) -> v128 {
813
822
/// be lowered to a sequence of instructions to materialize the vector value.
814
823
#[ inline]
815
824
#[ cfg_attr( test, assert_instr( v128. const , a0 = 0.0 , a1 = 1.0 , a2 = 2.0 , a3 = 3.0 ) ) ]
825
+ #[ target_feature( enable = "simd128" ) ]
816
826
#[ doc( alias( "v128.const" ) ) ]
817
827
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
818
828
#[ 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 {
826
836
/// be lowered to a sequence of instructions to materialize the vector value.
827
837
#[ inline]
828
838
#[ cfg_attr( test, assert_instr( v128. const , a0 = 0.0 , a1 = 1.0 ) ) ]
839
+ #[ target_feature( enable = "simd128" ) ]
829
840
#[ doc( alias( "v128.const" ) ) ]
830
841
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
831
842
#[ rustc_const_stable( feature = "wasm_simd_const" , since = "1.56.0" ) ]
0 commit comments