@@ -1795,6 +1795,12 @@ pub unsafe fn _mm_cvtsd_si64(a: f64x2) -> i64 {
1795
1795
cvtsd2si64 ( a)
1796
1796
}
1797
1797
1798
+ /// Alias for [`_mm_cvtsd_si64`](fn._mm_cvtsd_si64_ss.html).
1799
+ #[ inline( always) ]
1800
+ #[ target_feature = "+sse2" ]
1801
+ #[ cfg_attr( test, assert_instr( cvtsd2si) ) ]
1802
+ pub unsafe fn _mm_cvtsd_si64x ( a : f64x2 ) -> i64 { _mm_cvtsd_si64 ( a) }
1803
+
1798
1804
/// Convert the lower double-precision (64-bit) floating-point element in `b`
1799
1805
/// to a single-precision (32-bit) floating-point element, store the result in
1800
1806
/// the lower element of the return value, and copy the upper element from `a`
@@ -1806,6 +1812,14 @@ pub unsafe fn _mm_cvtsd_ss(a: f32x4, b: f64x2) -> f32x4 {
1806
1812
cvtsd2ss ( a, b)
1807
1813
}
1808
1814
1815
+ /// Return the lower double-precision (64-bit) floating-point element of "a".
1816
+ #[ inline( always) ]
1817
+ #[ target_feature = "+sse2" ]
1818
+ // no particular instruction to test
1819
+ pub unsafe fn _mm_cvtsd_f64 ( a : f64x2 ) -> f64 {
1820
+ a. extract ( 0 )
1821
+ }
1822
+
1809
1823
/// Convert the lower single-precision (32-bit) floating-point element in `b`
1810
1824
/// to a double-precision (64-bit) floating-point element, store the result in
1811
1825
/// the lower element of the return value, and copy the upper element from `a`
@@ -1845,6 +1859,12 @@ pub unsafe fn _mm_cvttsd_si64(a: f64x2) -> i64 {
1845
1859
cvttsd2si64 ( a)
1846
1860
}
1847
1861
1862
+ /// Alias for [`_mm_cvttsd_si64`](fn._mm_cvttsd_si64_ss.html).
1863
+ #[ inline( always) ]
1864
+ #[ target_feature = "+sse2" ]
1865
+ #[ cfg_attr( test, assert_instr( cvttsd2si) ) ]
1866
+ pub unsafe fn _mm_cvttsd_si64x ( a : f64x2 ) -> i64 { _mm_cvttsd_si64 ( a) }
1867
+
1848
1868
/// Convert packed single-precision (32-bit) floating-point elements in `a` to
1849
1869
/// packed 32-bit integers with truncation.
1850
1870
#[ inline( always) ]
@@ -4022,6 +4042,12 @@ mod tests {
4022
4042
) ;
4023
4043
}
4024
4044
4045
+ #[ simd_test = "sse2" ]
4046
+ unsafe fn _mm_cvtsd_f64 ( ) {
4047
+ let r = sse2:: _mm_cvtsd_f64 ( f64x2:: new ( -1.1 , 2.2 ) ) ;
4048
+ assert_eq ! ( r, -1.1 ) ;
4049
+ }
4050
+
4025
4051
#[ simd_test = "sse2" ]
4026
4052
unsafe fn _mm_cvtss_sd ( ) {
4027
4053
use std:: { f32, f64} ;
0 commit comments