@@ -147,15 +147,6 @@ unsafe extern "C" {
147147 fn llvm_f64x2_min ( x : simd:: f64x2 , y : simd:: f64x2 ) -> simd:: f64x2 ;
148148 #[ link_name = "llvm.maximum.v2f64" ]
149149 fn llvm_f64x2_max ( x : simd:: f64x2 , y : simd:: f64x2 ) -> simd:: f64x2 ;
150-
151- #[ link_name = "llvm.fptosi.sat.v4i32.v4f32" ]
152- fn llvm_i32x4_trunc_sat_f32x4_s ( x : simd:: f32x4 ) -> simd:: i32x4 ;
153- #[ link_name = "llvm.fptoui.sat.v4i32.v4f32" ]
154- fn llvm_i32x4_trunc_sat_f32x4_u ( x : simd:: f32x4 ) -> simd:: i32x4 ;
155- #[ link_name = "llvm.fptosi.sat.v2i32.v2f64" ]
156- fn llvm_i32x2_trunc_sat_f64x2_s ( x : simd:: f64x2 ) -> simd:: i32x2 ;
157- #[ link_name = "llvm.fptoui.sat.v2i32.v2f64" ]
158- fn llvm_i32x2_trunc_sat_f64x2_u ( x : simd:: f64x2 ) -> simd:: i32x2 ;
159150}
160151
161152#[ repr( packed) ]
@@ -4059,7 +4050,7 @@ pub fn f64x2_pmax(a: v128, b: v128) -> v128 {
40594050#[ doc( alias( "i32x4.trunc_sat_f32x4_s" ) ) ]
40604051#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
40614052pub fn i32x4_trunc_sat_f32x4 ( a : v128 ) -> v128 {
4062- unsafe { llvm_i32x4_trunc_sat_f32x4_s ( a. as_f32x4 ( ) ) . v128 ( ) }
4053+ unsafe { simd_as :: < simd :: f32x4 , simd :: i32x4 > ( a. as_f32x4 ( ) ) . v128 ( ) }
40634054}
40644055
40654056/// Converts a 128-bit vector interpreted as four 32-bit floating point numbers
@@ -4073,7 +4064,7 @@ pub fn i32x4_trunc_sat_f32x4(a: v128) -> v128 {
40734064#[ doc( alias( "i32x4.trunc_sat_f32x4_u" ) ) ]
40744065#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
40754066pub fn u32x4_trunc_sat_f32x4 ( a : v128 ) -> v128 {
4076- unsafe { llvm_i32x4_trunc_sat_f32x4_u ( a. as_f32x4 ( ) ) . v128 ( ) }
4067+ unsafe { simd_as :: < simd :: f32x4 , simd :: u32x4 > ( a. as_f32x4 ( ) ) . v128 ( ) }
40774068}
40784069
40794070/// Converts a 128-bit vector interpreted as four 32-bit signed integers into a
@@ -4114,7 +4105,7 @@ pub fn f32x4_convert_u32x4(a: v128) -> v128 {
41144105pub fn i32x4_trunc_sat_f64x2_zero ( a : v128 ) -> v128 {
41154106 let ret: simd:: i32x4 = unsafe {
41164107 simd_shuffle ! (
4117- llvm_i32x2_trunc_sat_f64x2_s ( a. as_f64x2( ) ) ,
4108+ simd_as :: <simd :: f64x2 , simd :: i32x2> ( a. as_f64x2( ) ) ,
41184109 simd:: i32x2:: ZERO ,
41194110 [ 0 , 1 , 2 , 3 ] ,
41204111 )
@@ -4136,10 +4127,10 @@ pub fn i32x4_trunc_sat_f64x2_zero(a: v128) -> v128 {
41364127#[ doc( alias( "i32x4.trunc_sat_f64x2_u_zero" ) ) ]
41374128#[ stable( feature = "wasm_simd" , since = "1.54.0" ) ]
41384129pub fn u32x4_trunc_sat_f64x2_zero ( a : v128 ) -> v128 {
4139- let ret: simd:: i32x4 = unsafe {
4130+ let ret: simd:: u32x4 = unsafe {
41404131 simd_shuffle ! (
4141- llvm_i32x2_trunc_sat_f64x2_u ( a. as_f64x2( ) ) ,
4142- simd:: i32x2 :: ZERO ,
4132+ simd_as :: <simd :: f64x2 , simd :: u32x2> ( a. as_f64x2( ) ) ,
4133+ simd:: u32x2 :: ZERO ,
41434134 [ 0 , 1 , 2 , 3 ] ,
41444135 )
41454136 } ;
0 commit comments