@@ -663,6 +663,7 @@ pub unsafe fn v128_store64_lane<const L: usize>(v: v128, m: *mut u64) {
663
663
#[ doc( alias( "v128.const" ) ) ]
664
664
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
665
665
#[ rustc_const_stable( feature = "wasm_simd" , since = "1.54.0" ) ]
666
+ #[ target_feature( enable = "simd128" ) ]
666
667
pub const fn i8x16 (
667
668
a0 : i8 ,
668
669
a1 : i8 ,
@@ -695,6 +696,7 @@ pub const fn i8x16(
695
696
#[ doc( alias( "v128.const" ) ) ]
696
697
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
697
698
#[ rustc_const_stable( feature = "wasm_simd" , since = "1.54.0" ) ]
699
+ #[ target_feature( enable = "simd128" ) ]
698
700
pub const fn u8x16 (
699
701
a0 : u8 ,
700
702
a1 : u8 ,
@@ -741,6 +743,7 @@ pub const fn u8x16(
741
743
#[ doc( alias( "v128.const" ) ) ]
742
744
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
743
745
#[ rustc_const_stable( feature = "wasm_simd" , since = "1.54.0" ) ]
746
+ #[ target_feature( enable = "simd128" ) ]
744
747
pub const fn i16x8 ( a0 : i16 , a1 : i16 , a2 : i16 , a3 : i16 , a4 : i16 , a5 : i16 , a6 : i16 , a7 : i16 ) -> v128 {
745
748
simd:: i16x8:: new ( a0, a1, a2, a3, a4, a5, a6, a7) . v128 ( )
746
749
}
@@ -753,6 +756,7 @@ pub const fn i16x8(a0: i16, a1: i16, a2: i16, a3: i16, a4: i16, a5: i16, a6: i16
753
756
#[ doc( alias( "v128.const" ) ) ]
754
757
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
755
758
#[ rustc_const_stable( feature = "wasm_simd" , since = "1.54.0" ) ]
759
+ #[ target_feature( enable = "simd128" ) ]
756
760
pub const fn u16x8 ( a0 : u16 , a1 : u16 , a2 : u16 , a3 : u16 , a4 : u16 , a5 : u16 , a6 : u16 , a7 : u16 ) -> v128 {
757
761
simd:: u16x8:: new ( a0, a1, a2, a3, a4, a5, a6, a7) . v128 ( )
758
762
}
@@ -766,6 +770,7 @@ pub const fn u16x8(a0: u16, a1: u16, a2: u16, a3: u16, a4: u16, a5: u16, a6: u16
766
770
#[ doc( alias( "v128.const" ) ) ]
767
771
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
768
772
#[ rustc_const_stable( feature = "wasm_simd" , since = "1.54.0" ) ]
773
+ #[ target_feature( enable = "simd128" ) ]
769
774
pub const fn i32x4 ( a0 : i32 , a1 : i32 , a2 : i32 , a3 : i32 ) -> v128 {
770
775
simd:: i32x4:: new ( a0, a1, a2, a3) . v128 ( )
771
776
}
@@ -778,6 +783,7 @@ pub const fn i32x4(a0: i32, a1: i32, a2: i32, a3: i32) -> v128 {
778
783
#[ doc( alias( "v128.const" ) ) ]
779
784
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
780
785
#[ rustc_const_stable( feature = "wasm_simd" , since = "1.54.0" ) ]
786
+ #[ target_feature( enable = "simd128" ) ]
781
787
pub const fn u32x4 ( a0 : u32 , a1 : u32 , a2 : u32 , a3 : u32 ) -> v128 {
782
788
simd:: u32x4:: new ( a0, a1, a2, a3) . v128 ( )
783
789
}
@@ -791,6 +797,7 @@ pub const fn u32x4(a0: u32, a1: u32, a2: u32, a3: u32) -> v128 {
791
797
#[ doc( alias( "v128.const" ) ) ]
792
798
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
793
799
#[ rustc_const_stable( feature = "wasm_simd" , since = "1.54.0" ) ]
800
+ #[ target_feature( enable = "simd128" ) ]
794
801
pub const fn i64x2 ( a0 : i64 , a1 : i64 ) -> v128 {
795
802
simd:: i64x2:: new ( a0, a1) . v128 ( )
796
803
}
@@ -803,6 +810,7 @@ pub const fn i64x2(a0: i64, a1: i64) -> v128 {
803
810
#[ doc( alias( "v128.const" ) ) ]
804
811
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
805
812
#[ rustc_const_stable( feature = "wasm_simd" , since = "1.54.0" ) ]
813
+ #[ target_feature( enable = "simd128" ) ]
806
814
pub const fn u64x2 ( a0 : u64 , a1 : u64 ) -> v128 {
807
815
simd:: u64x2:: new ( a0, a1) . v128 ( )
808
816
}
@@ -816,6 +824,7 @@ pub const fn u64x2(a0: u64, a1: u64) -> v128 {
816
824
#[ doc( alias( "v128.const" ) ) ]
817
825
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
818
826
#[ rustc_const_stable( feature = "wasm_simd_const" , since = "1.56.0" ) ]
827
+ #[ target_feature( enable = "simd128" ) ]
819
828
pub const fn f32x4 ( a0 : f32 , a1 : f32 , a2 : f32 , a3 : f32 ) -> v128 {
820
829
simd:: f32x4:: new ( a0, a1, a2, a3) . v128 ( )
821
830
}
@@ -829,6 +838,7 @@ pub const fn f32x4(a0: f32, a1: f32, a2: f32, a3: f32) -> v128 {
829
838
#[ doc( alias( "v128.const" ) ) ]
830
839
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
831
840
#[ rustc_const_stable( feature = "wasm_simd_const" , since = "1.56.0" ) ]
841
+ #[ target_feature( enable = "simd128" ) ]
832
842
pub const fn f64x2 ( a0 : f64 , a1 : f64 ) -> v128 {
833
843
simd:: f64x2:: new ( a0, a1) . v128 ( )
834
844
}
@@ -4207,6 +4217,17 @@ mod tests {
4207
4217
use std:: num:: Wrapping ;
4208
4218
use std:: prelude:: v1:: * ;
4209
4219
4220
+ const _C1: v128 = i8x16 ( 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 ) ;
4221
+ const _C2: v128 = u8x16 ( 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 ) ;
4222
+ const _C3: v128 = i16x8 ( 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ) ;
4223
+ const _C4: v128 = u16x8 ( 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ) ;
4224
+ const _C5: v128 = i32x4 ( 0 , 1 , 2 , 3 ) ;
4225
+ const _C6: v128 = u32x4 ( 0 , 1 , 2 , 3 ) ;
4226
+ const _C7: v128 = i64x2 ( 0 , 1 ) ;
4227
+ const _C8: v128 = u64x2 ( 0 , 1 ) ;
4228
+ const _C9: v128 = f32x4 ( 0.0 , 1.0 , 2.0 , 3.0 ) ;
4229
+ const _C10: v128 = f64x2 ( 0.0 , 1.0 ) ;
4230
+
4210
4231
fn compare_bytes ( a : v128 , b : v128 ) {
4211
4232
let a: [ u8 ; 16 ] = unsafe { transmute ( a) } ;
4212
4233
let b: [ u8 ; 16 ] = unsafe { transmute ( b) } ;
0 commit comments