@@ -1815,21 +1815,21 @@ pub unsafe fn vld1q_dup_f32(addr: *const f32) -> float32x4_t {
1815
1815
1816
1816
/// Floating-point Convert to Signed fixed-point, rounding toward Zero (vector)
1817
1817
#[ inline]
1818
+ #[ cfg( target_arch = "arm" ) ]
1818
1819
#[ target_feature( enable = "neon" ) ]
1819
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v7" ) ) ]
1820
- #[ cfg_attr( all( test, target_arch = "arm" ) , assert_instr( "vcvt.s32.f32" ) ) ]
1821
- #[ cfg_attr( all( test, target_arch = "aarch64" ) , assert_instr( fcvtzs) ) ]
1820
+ #[ target_feature( enable = "v7" ) ]
1821
+ #[ cfg_attr( test, assert_instr( "vcvt.s32.f32" ) ) ]
1822
1822
pub unsafe fn vcvtq_s32_f32 ( a : float32x4_t ) -> int32x4_t {
1823
1823
use crate :: core_arch:: simd:: { f32x4, i32x4} ;
1824
1824
transmute ( simd_cast :: < _ , i32x4 > ( transmute :: < _ , f32x4 > ( a) ) )
1825
1825
}
1826
1826
1827
1827
/// Floating-point Convert to Unsigned fixed-point, rounding toward Zero (vector)
1828
1828
#[ inline]
1829
+ #[ cfg( target_arch = "arm" ) ]
1829
1830
#[ target_feature( enable = "neon" ) ]
1830
- #[ cfg_attr( target_arch = "arm" , target_feature( enable = "v7" ) ) ]
1831
- #[ cfg_attr( all( test, target_arch = "arm" ) , assert_instr( "vcvt.u32.f32" ) ) ]
1832
- #[ cfg_attr( all( test, target_arch = "aarch64" ) , assert_instr( fcvtzu) ) ]
1831
+ #[ target_feature( enable = "v7" ) ]
1832
+ #[ cfg_attr( test, assert_instr( "vcvt.u32.f32" ) ) ]
1833
1833
pub unsafe fn vcvtq_u32_f32 ( a : float32x4_t ) -> uint32x4_t {
1834
1834
use crate :: core_arch:: simd:: { f32x4, u32x4} ;
1835
1835
transmute ( simd_cast :: < _ , u32x4 > ( transmute :: < _ , f32x4 > ( a) ) )
@@ -1906,16 +1906,6 @@ mod tests {
1906
1906
let e = i32x4:: new ( -1 , 2 , 3 , 4 ) ;
1907
1907
let r: i32x4 = transmute ( vcvtq_s32_f32 ( transmute ( f) ) ) ;
1908
1908
assert_eq ! ( r, e) ;
1909
-
1910
- let f = f32x4:: new ( 10e37 , 2. , 3. , 4. ) ;
1911
- let e = i32x4:: new ( 0x7fffffff , 2 , 3 , 4 ) ;
1912
- let r: i32x4 = transmute ( vcvtq_u32_f32 ( transmute ( f) ) ) ;
1913
- assert_eq ! ( r, e) ;
1914
-
1915
- let f = f32x4:: new ( -10e37 , 2. , 3. , 4. ) ;
1916
- let e = i32x4:: new ( -0x80000000 , 2 , 3 , 4 ) ;
1917
- let r: i32x4 = transmute ( vcvtq_u32_f32 ( transmute ( f) ) ) ;
1918
- assert_eq ! ( r, e) ;
1919
1909
}
1920
1910
1921
1911
#[ simd_test( enable = "neon" ) ]
@@ -1924,16 +1914,6 @@ mod tests {
1924
1914
let e = u32x4:: new ( 1 , 2 , 3 , 4 ) ;
1925
1915
let r: u32x4 = transmute ( vcvtq_u32_f32 ( transmute ( f) ) ) ;
1926
1916
assert_eq ! ( r, e) ;
1927
-
1928
- let f = f32x4:: new ( -1. , 2. , 3. , 4. ) ;
1929
- let e = u32x4:: new ( 0 , 2 , 3 , 4 ) ;
1930
- let r: u32x4 = transmute ( vcvtq_u32_f32 ( transmute ( f) ) ) ;
1931
- assert_eq ! ( r, e) ;
1932
-
1933
- let f = f32x4:: new ( 10e37 , 2. , 3. , 4. ) ;
1934
- let e = u32x4:: new ( 0xffffffff , 2 , 3 , 4 ) ;
1935
- let r: u32x4 = transmute ( vcvtq_u32_f32 ( transmute ( f) ) ) ;
1936
- assert_eq ! ( r, e) ;
1937
1917
}
1938
1918
1939
1919
#[ simd_test( enable = "neon" ) ]
0 commit comments