@@ -84,18 +84,12 @@ extern "C" {
84
84
85
85
#[ link_name = "llvm.wasm.alltrue.v16i8" ]
86
86
fn llvm_i8x16_all_true ( x : simd:: i8x16 ) -> i32 ;
87
- #[ link_name = "llvm.ctpop.v16i8" ]
88
- fn llvm_popcnt ( a : simd:: i8x16 ) -> simd:: i8x16 ;
89
87
#[ link_name = "llvm.wasm.bitmask.v16i8" ]
90
88
fn llvm_bitmask_i8x16 ( a : simd:: i8x16 ) -> i32 ;
91
89
#[ link_name = "llvm.wasm.narrow.signed.v16i8.v8i16" ]
92
90
fn llvm_narrow_i8x16_s ( a : simd:: i16x8 , b : simd:: i16x8 ) -> simd:: i8x16 ;
93
91
#[ link_name = "llvm.wasm.narrow.unsigned.v16i8.v8i16" ]
94
92
fn llvm_narrow_i8x16_u ( a : simd:: i16x8 , b : simd:: i16x8 ) -> simd:: i8x16 ;
95
- #[ link_name = "llvm.sadd.sat.v16i8" ]
96
- fn llvm_i8x16_add_sat_s ( a : simd:: i8x16 , b : simd:: i8x16 ) -> simd:: i8x16 ;
97
- #[ link_name = "llvm.uadd.sat.v16i8" ]
98
- fn llvm_i8x16_add_sat_u ( a : simd:: i8x16 , b : simd:: i8x16 ) -> simd:: i8x16 ;
99
93
#[ link_name = "llvm.wasm.sub.sat.signed.v16i8" ]
100
94
fn llvm_i8x16_sub_sat_s ( a : simd:: i8x16 , b : simd:: i8x16 ) -> simd:: i8x16 ;
101
95
#[ link_name = "llvm.wasm.sub.sat.unsigned.v16i8" ]
@@ -117,10 +111,6 @@ extern "C" {
117
111
fn llvm_narrow_i16x8_s ( a : simd:: i32x4 , b : simd:: i32x4 ) -> simd:: i16x8 ;
118
112
#[ link_name = "llvm.wasm.narrow.unsigned.v8i16.v4i32" ]
119
113
fn llvm_narrow_i16x8_u ( a : simd:: i32x4 , b : simd:: i32x4 ) -> simd:: i16x8 ;
120
- #[ link_name = "llvm.sadd.sat.v8i16" ]
121
- fn llvm_i16x8_add_sat_s ( a : simd:: i16x8 , b : simd:: i16x8 ) -> simd:: i16x8 ;
122
- #[ link_name = "llvm.uadd.sat.v8i16" ]
123
- fn llvm_i16x8_add_sat_u ( a : simd:: i16x8 , b : simd:: i16x8 ) -> simd:: i16x8 ;
124
114
#[ link_name = "llvm.wasm.sub.sat.signed.v8i16" ]
125
115
fn llvm_i16x8_sub_sat_s ( a : simd:: i16x8 , b : simd:: i16x8 ) -> simd:: i16x8 ;
126
116
#[ link_name = "llvm.wasm.sub.sat.unsigned.v8i16" ]
@@ -144,35 +134,15 @@ extern "C" {
144
134
#[ link_name = "llvm.wasm.bitmask.v2i64" ]
145
135
fn llvm_bitmask_i64x2 ( a : simd:: i64x2 ) -> i32 ;
146
136
147
- #[ link_name = "llvm.ceil.v4f32" ]
148
- fn llvm_f32x4_ceil ( x : simd:: f32x4 ) -> simd:: f32x4 ;
149
- #[ link_name = "llvm.floor.v4f32" ]
150
- fn llvm_f32x4_floor ( x : simd:: f32x4 ) -> simd:: f32x4 ;
151
- #[ link_name = "llvm.trunc.v4f32" ]
152
- fn llvm_f32x4_trunc ( x : simd:: f32x4 ) -> simd:: f32x4 ;
153
137
#[ link_name = "llvm.nearbyint.v4f32" ]
154
138
fn llvm_f32x4_nearest ( x : simd:: f32x4 ) -> simd:: f32x4 ;
155
- #[ link_name = "llvm.fabs.v4f32" ]
156
- fn llvm_f32x4_abs ( x : simd:: f32x4 ) -> simd:: f32x4 ;
157
- #[ link_name = "llvm.sqrt.v4f32" ]
158
- fn llvm_f32x4_sqrt ( x : simd:: f32x4 ) -> simd:: f32x4 ;
159
139
#[ link_name = "llvm.minimum.v4f32" ]
160
140
fn llvm_f32x4_min ( x : simd:: f32x4 , y : simd:: f32x4 ) -> simd:: f32x4 ;
161
141
#[ link_name = "llvm.maximum.v4f32" ]
162
142
fn llvm_f32x4_max ( x : simd:: f32x4 , y : simd:: f32x4 ) -> simd:: f32x4 ;
163
143
164
- #[ link_name = "llvm.ceil.v2f64" ]
165
- fn llvm_f64x2_ceil ( x : simd:: f64x2 ) -> simd:: f64x2 ;
166
- #[ link_name = "llvm.floor.v2f64" ]
167
- fn llvm_f64x2_floor ( x : simd:: f64x2 ) -> simd:: f64x2 ;
168
- #[ link_name = "llvm.trunc.v2f64" ]
169
- fn llvm_f64x2_trunc ( x : simd:: f64x2 ) -> simd:: f64x2 ;
170
144
#[ link_name = "llvm.nearbyint.v2f64" ]
171
145
fn llvm_f64x2_nearest ( x : simd:: f64x2 ) -> simd:: f64x2 ;
172
- #[ link_name = "llvm.fabs.v2f64" ]
173
- fn llvm_f64x2_abs ( x : simd:: f64x2 ) -> simd:: f64x2 ;
174
- #[ link_name = "llvm.sqrt.v2f64" ]
175
- fn llvm_f64x2_sqrt ( x : simd:: f64x2 ) -> simd:: f64x2 ;
176
146
#[ link_name = "llvm.minimum.v2f64" ]
177
147
fn llvm_f64x2_min ( x : simd:: f64x2 , y : simd:: f64x2 ) -> simd:: f64x2 ;
178
148
#[ link_name = "llvm.maximum.v2f64" ]
@@ -2284,7 +2254,7 @@ pub fn i8x16_neg(a: v128) -> v128 {
2284
2254
#[ doc( alias( "i8x16.popcnt" ) ) ]
2285
2255
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
2286
2256
pub fn i8x16_popcnt ( v : v128 ) -> v128 {
2287
- unsafe { llvm_popcnt ( v. as_i8x16 ( ) ) . v128 ( ) }
2257
+ unsafe { simd_ctpop ( v. as_i8x16 ( ) ) . v128 ( ) }
2288
2258
}
2289
2259
2290
2260
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
@@ -2410,7 +2380,7 @@ pub use i8x16_add as u8x16_add;
2410
2380
#[ doc( alias( "i8x16.add_sat_s" ) ) ]
2411
2381
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
2412
2382
pub fn i8x16_add_sat ( a : v128 , b : v128 ) -> v128 {
2413
- unsafe { llvm_i8x16_add_sat_s ( a. as_i8x16 ( ) , b. as_i8x16 ( ) ) . v128 ( ) }
2383
+ unsafe { simd_saturating_add ( a. as_i8x16 ( ) , b. as_i8x16 ( ) ) . v128 ( ) }
2414
2384
}
2415
2385
2416
2386
/// Adds two 128-bit vectors as if they were two packed sixteen 8-bit unsigned
@@ -2421,7 +2391,7 @@ pub fn i8x16_add_sat(a: v128, b: v128) -> v128 {
2421
2391
#[ doc( alias( "i8x16.add_sat_u" ) ) ]
2422
2392
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
2423
2393
pub fn u8x16_add_sat ( a : v128 , b : v128 ) -> v128 {
2424
- unsafe { llvm_i8x16_add_sat_u ( a. as_i8x16 ( ) , b. as_i8x16 ( ) ) . v128 ( ) }
2394
+ unsafe { simd_saturating_add ( a. as_u8x16 ( ) , b. as_u8x16 ( ) ) . v128 ( ) }
2425
2395
}
2426
2396
2427
2397
/// Subtracts two 128-bit vectors as if they were two packed sixteen 8-bit integers.
@@ -2778,7 +2748,7 @@ pub use i16x8_add as u16x8_add;
2778
2748
#[ doc( alias( "i16x8.add_sat_s" ) ) ]
2779
2749
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
2780
2750
pub fn i16x8_add_sat ( a : v128 , b : v128 ) -> v128 {
2781
- unsafe { llvm_i16x8_add_sat_s ( a. as_i16x8 ( ) , b. as_i16x8 ( ) ) . v128 ( ) }
2751
+ unsafe { simd_saturating_add ( a. as_i16x8 ( ) , b. as_i16x8 ( ) ) . v128 ( ) }
2782
2752
}
2783
2753
2784
2754
/// Adds two 128-bit vectors as if they were two packed eight 16-bit unsigned
@@ -2789,7 +2759,7 @@ pub fn i16x8_add_sat(a: v128, b: v128) -> v128 {
2789
2759
#[ doc( alias( "i16x8.add_sat_u" ) ) ]
2790
2760
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
2791
2761
pub fn u16x8_add_sat ( a : v128 , b : v128 ) -> v128 {
2792
- unsafe { llvm_i16x8_add_sat_u ( a. as_i16x8 ( ) , b. as_i16x8 ( ) ) . v128 ( ) }
2762
+ unsafe { simd_saturating_add ( a. as_u16x8 ( ) , b. as_u16x8 ( ) ) . v128 ( ) }
2793
2763
}
2794
2764
2795
2765
/// Subtracts two 128-bit vectors as if they were two packed eight 16-bit integers.
@@ -3725,7 +3695,7 @@ pub use i64x2_extmul_high_u32x4 as u64x2_extmul_high_u32x4;
3725
3695
#[ doc( alias( "f32x4.ceil" ) ) ]
3726
3696
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
3727
3697
pub fn f32x4_ceil ( a : v128 ) -> v128 {
3728
- unsafe { llvm_f32x4_ceil ( a. as_f32x4 ( ) ) . v128 ( ) }
3698
+ unsafe { simd_ceil ( a. as_f32x4 ( ) ) . v128 ( ) }
3729
3699
}
3730
3700
3731
3701
/// Lane-wise rounding to the nearest integral value not greater than the input.
@@ -3735,7 +3705,7 @@ pub fn f32x4_ceil(a: v128) -> v128 {
3735
3705
#[ doc( alias( "f32x4.floor" ) ) ]
3736
3706
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
3737
3707
pub fn f32x4_floor ( a : v128 ) -> v128 {
3738
- unsafe { llvm_f32x4_floor ( a. as_f32x4 ( ) ) . v128 ( ) }
3708
+ unsafe { simd_floor ( a. as_f32x4 ( ) ) . v128 ( ) }
3739
3709
}
3740
3710
3741
3711
/// Lane-wise rounding to the nearest integral value with the magnitude not
@@ -3746,7 +3716,7 @@ pub fn f32x4_floor(a: v128) -> v128 {
3746
3716
#[ doc( alias( "f32x4.trunc" ) ) ]
3747
3717
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
3748
3718
pub fn f32x4_trunc ( a : v128 ) -> v128 {
3749
- unsafe { llvm_f32x4_trunc ( a. as_f32x4 ( ) ) . v128 ( ) }
3719
+ unsafe { simd_trunc ( a. as_f32x4 ( ) ) . v128 ( ) }
3750
3720
}
3751
3721
3752
3722
/// Lane-wise rounding to the nearest integral value; if two values are equally
@@ -3768,7 +3738,7 @@ pub fn f32x4_nearest(a: v128) -> v128 {
3768
3738
#[ doc( alias( "f32x4.abs" ) ) ]
3769
3739
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
3770
3740
pub fn f32x4_abs ( a : v128 ) -> v128 {
3771
- unsafe { llvm_f32x4_abs ( a. as_f32x4 ( ) ) . v128 ( ) }
3741
+ unsafe { simd_fabs ( a. as_f32x4 ( ) ) . v128 ( ) }
3772
3742
}
3773
3743
3774
3744
/// Negates each lane of a 128-bit vector interpreted as four 32-bit floating
@@ -3779,7 +3749,7 @@ pub fn f32x4_abs(a: v128) -> v128 {
3779
3749
#[ doc( alias( "f32x4.neg" ) ) ]
3780
3750
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
3781
3751
pub fn f32x4_neg ( a : v128 ) -> v128 {
3782
- f32x4_mul ( a , f32x4_splat ( - 1. ) )
3752
+ unsafe { simd_neg ( a . as_f32x4 ( ) ) . v128 ( ) }
3783
3753
}
3784
3754
3785
3755
/// Calculates the square root of each lane of a 128-bit vector interpreted as
@@ -3790,7 +3760,7 @@ pub fn f32x4_neg(a: v128) -> v128 {
3790
3760
#[ doc( alias( "f32x4.sqrt" ) ) ]
3791
3761
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
3792
3762
pub fn f32x4_sqrt ( a : v128 ) -> v128 {
3793
- unsafe { llvm_f32x4_sqrt ( a. as_f32x4 ( ) ) . v128 ( ) }
3763
+ unsafe { simd_fsqrt ( a. as_f32x4 ( ) ) . v128 ( ) }
3794
3764
}
3795
3765
3796
3766
/// Lane-wise addition of two 128-bit vectors interpreted as four 32-bit
@@ -3900,7 +3870,7 @@ pub fn f32x4_pmax(a: v128, b: v128) -> v128 {
3900
3870
#[ doc( alias( "f64x2.ceil" ) ) ]
3901
3871
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
3902
3872
pub fn f64x2_ceil ( a : v128 ) -> v128 {
3903
- unsafe { llvm_f64x2_ceil ( a. as_f64x2 ( ) ) . v128 ( ) }
3873
+ unsafe { simd_ceil ( a. as_f64x2 ( ) ) . v128 ( ) }
3904
3874
}
3905
3875
3906
3876
/// Lane-wise rounding to the nearest integral value not greater than the input.
@@ -3910,7 +3880,7 @@ pub fn f64x2_ceil(a: v128) -> v128 {
3910
3880
#[ doc( alias( "f64x2.floor" ) ) ]
3911
3881
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
3912
3882
pub fn f64x2_floor ( a : v128 ) -> v128 {
3913
- unsafe { llvm_f64x2_floor ( a. as_f64x2 ( ) ) . v128 ( ) }
3883
+ unsafe { simd_floor ( a. as_f64x2 ( ) ) . v128 ( ) }
3914
3884
}
3915
3885
3916
3886
/// Lane-wise rounding to the nearest integral value with the magnitude not
@@ -3921,7 +3891,7 @@ pub fn f64x2_floor(a: v128) -> v128 {
3921
3891
#[ doc( alias( "f64x2.trunc" ) ) ]
3922
3892
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
3923
3893
pub fn f64x2_trunc ( a : v128 ) -> v128 {
3924
- unsafe { llvm_f64x2_trunc ( a. as_f64x2 ( ) ) . v128 ( ) }
3894
+ unsafe { simd_trunc ( a. as_f64x2 ( ) ) . v128 ( ) }
3925
3895
}
3926
3896
3927
3897
/// Lane-wise rounding to the nearest integral value; if two values are equally
@@ -3943,7 +3913,7 @@ pub fn f64x2_nearest(a: v128) -> v128 {
3943
3913
#[ doc( alias( "f64x2.abs" ) ) ]
3944
3914
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
3945
3915
pub fn f64x2_abs ( a : v128 ) -> v128 {
3946
- unsafe { llvm_f64x2_abs ( a. as_f64x2 ( ) ) . v128 ( ) }
3916
+ unsafe { simd_fabs ( a. as_f64x2 ( ) ) . v128 ( ) }
3947
3917
}
3948
3918
3949
3919
/// Negates each lane of a 128-bit vector interpreted as two 64-bit floating
@@ -3954,7 +3924,7 @@ pub fn f64x2_abs(a: v128) -> v128 {
3954
3924
#[ doc( alias( "f64x2.neg" ) ) ]
3955
3925
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
3956
3926
pub fn f64x2_neg ( a : v128 ) -> v128 {
3957
- f64x2_mul ( a , f64x2_splat ( - 1.0 ) )
3927
+ unsafe { simd_neg ( a . as_f64x2 ( ) ) . v128 ( ) }
3958
3928
}
3959
3929
3960
3930
/// Calculates the square root of each lane of a 128-bit vector interpreted as
@@ -3965,7 +3935,7 @@ pub fn f64x2_neg(a: v128) -> v128 {
3965
3935
#[ doc( alias( "f64x2.sqrt" ) ) ]
3966
3936
#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
3967
3937
pub fn f64x2_sqrt ( a : v128 ) -> v128 {
3968
- unsafe { llvm_f64x2_sqrt ( a. as_f64x2 ( ) ) . v128 ( ) }
3938
+ unsafe { simd_fsqrt ( a. as_f64x2 ( ) ) . v128 ( ) }
3969
3939
}
3970
3940
3971
3941
/// Lane-wise add of two 128-bit vectors interpreted as two 64-bit
0 commit comments