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 {
882
882
#[ cfg_attr( test, assert_instr( cvtsi2ss) ) ]
883
883
#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
884
884
pub fn _mm_cvtsi32_ss ( a : __m128 , b : i32 ) -> __m128 {
885
- unsafe { cvtsi2ss ( a, b ) }
885
+ unsafe { simd_insert ! ( a, 0 , b as f32 ) }
886
886
}
887
887
888
888
/// Alias for [`_mm_cvtsi32_ss`](fn._mm_cvtsi32_ss.html).
@@ -1989,8 +1989,6 @@ unsafe extern "C" {
1989
1989
fn cvtss2si ( a : __m128 ) -> i32 ;
1990
1990
#[ link_name = "llvm.x86.sse.cvttss2si" ]
1991
1991
fn cvttss2si ( a : __m128 ) -> i32 ;
1992
- #[ link_name = "llvm.x86.sse.cvtsi2ss" ]
1993
- fn cvtsi2ss ( a : __m128 , b : i32 ) -> __m128 ;
1994
1992
#[ link_name = "llvm.x86.sse.sfence" ]
1995
1993
fn sfence ( ) ;
1996
1994
#[ 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 {
2422
2422
#[ cfg_attr( test, assert_instr( cvtss2sd) ) ]
2423
2423
#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
2424
2424
pub 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
+ }
2426
2429
}
2427
2430
2428
2431
/// Converts packed double-precision (64-bit) floating-point elements in `a` to
@@ -3118,8 +3121,6 @@ unsafe extern "C" {
3118
3121
fn cvtsd2si ( a : __m128d ) -> i32 ;
3119
3122
#[ link_name = "llvm.x86.sse2.cvtsd2ss" ]
3120
3123
fn cvtsd2ss ( a : __m128 , b : __m128d ) -> __m128 ;
3121
- #[ link_name = "llvm.x86.sse2.cvtss2sd" ]
3122
- fn cvtss2sd ( a : __m128d , b : __m128 ) -> __m128d ;
3123
3124
#[ link_name = "llvm.x86.sse2.cvttpd2dq" ]
3124
3125
fn cvttpd2dq ( a : __m128d ) -> i32x4 ;
3125
3126
#[ link_name = "llvm.x86.sse2.cvttsd2si" ]
Original file line number Diff line number Diff line change @@ -11,8 +11,6 @@ unsafe extern "C" {
11
11
fn cvtss2si64 ( a : __m128 ) -> i64 ;
12
12
#[ link_name = "llvm.x86.sse.cvttss2si64" ]
13
13
fn cvttss2si64 ( a : __m128 ) -> i64 ;
14
- #[ link_name = "llvm.x86.sse.cvtsi642ss" ]
15
- fn cvtsi642ss ( a : __m128 , b : i64 ) -> __m128 ;
16
14
}
17
15
18
16
/// 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 {
65
63
#[ cfg_attr( test, assert_instr( cvtsi2ss) ) ]
66
64
#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
67
65
pub fn _mm_cvtsi64_ss ( a : __m128 , b : i64 ) -> __m128 {
68
- unsafe { cvtsi642ss ( a, b ) }
66
+ unsafe { simd_insert ! ( a, 0 , b as f32 ) }
69
67
}
70
68
71
69
#[ cfg( test) ]
You can’t perform that action at this time.
0 commit comments