File tree Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -882,7 +882,7 @@ pub fn _mm_cvtss_f32(a: __m128) -> f32 {
882882#[ cfg_attr( test, assert_instr( cvtsi2ss) ) ]
883883#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
884884pub fn _mm_cvtsi32_ss ( a : __m128 , b : i32 ) -> __m128 {
885- unsafe { cvtsi2ss ( a, b ) }
885+ unsafe { simd_insert ! ( a, 0 , b as f32 ) }
886886}
887887
888888/// Alias for [`_mm_cvtsi32_ss`](fn._mm_cvtsi32_ss.html).
@@ -1989,8 +1989,6 @@ unsafe extern "C" {
19891989 fn cvtss2si ( a : __m128 ) -> i32 ;
19901990 #[ link_name = "llvm.x86.sse.cvttss2si" ]
19911991 fn cvttss2si ( a : __m128 ) -> i32 ;
1992- #[ link_name = "llvm.x86.sse.cvtsi2ss" ]
1993- fn cvtsi2ss ( a : __m128 , b : i32 ) -> __m128 ;
19941992 #[ link_name = "llvm.x86.sse.sfence" ]
19951993 fn sfence ( ) ;
19961994 #[ link_name = "llvm.x86.sse.stmxcsr" ]
Original file line number Diff line number Diff line change @@ -2422,7 +2422,10 @@ pub fn _mm_cvtsd_f64(a: __m128d) -> f64 {
24222422#[ cfg_attr( test, assert_instr( cvtss2sd) ) ]
24232423#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
24242424pub fn _mm_cvtss_sd ( a : __m128d , b : __m128 ) -> __m128d {
2425- unsafe { cvtss2sd ( a, b) }
2425+ unsafe {
2426+ let elt: f32 = simd_extract ! ( b, 0 ) ;
2427+ simd_insert ! ( a, 0 , elt as f64 )
2428+ }
24262429}
24272430
24282431/// Converts packed double-precision (64-bit) floating-point elements in `a` to
@@ -3118,8 +3121,6 @@ unsafe extern "C" {
31183121 fn cvtsd2si ( a : __m128d ) -> i32 ;
31193122 #[ link_name = "llvm.x86.sse2.cvtsd2ss" ]
31203123 fn cvtsd2ss ( a : __m128 , b : __m128d ) -> __m128 ;
3121- #[ link_name = "llvm.x86.sse2.cvtss2sd" ]
3122- fn cvtss2sd ( a : __m128d , b : __m128 ) -> __m128d ;
31233124 #[ link_name = "llvm.x86.sse2.cvttpd2dq" ]
31243125 fn cvttpd2dq ( a : __m128d ) -> i32x4 ;
31253126 #[ link_name = "llvm.x86.sse2.cvttsd2si" ]
Original file line number Diff line number Diff line change @@ -11,8 +11,6 @@ unsafe extern "C" {
1111 fn cvtss2si64 ( a : __m128 ) -> i64 ;
1212 #[ link_name = "llvm.x86.sse.cvttss2si64" ]
1313 fn cvttss2si64 ( a : __m128 ) -> i64 ;
14- #[ link_name = "llvm.x86.sse.cvtsi642ss" ]
15- fn cvtsi642ss ( a : __m128 , b : i64 ) -> __m128 ;
1614}
1715
1816/// Converts the lowest 32 bit float in the input vector to a 64 bit integer.
@@ -65,7 +63,7 @@ pub fn _mm_cvttss_si64(a: __m128) -> i64 {
6563#[ cfg_attr( test, assert_instr( cvtsi2ss) ) ]
6664#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
6765pub fn _mm_cvtsi64_ss ( a : __m128 , b : i64 ) -> __m128 {
68- unsafe { cvtsi642ss ( a, b ) }
66+ unsafe { simd_insert ! ( a, 0 , b as f32 ) }
6967}
7068
7169#[ cfg( test) ]
You can’t perform that action at this time.
0 commit comments