@@ -25,7 +25,7 @@ use stdarch_test::assert_instr;
2525#[ cfg_attr( all( test, target_arch = "x86" ) , assert_instr( mul) ) ]
2626#[ target_feature( enable = "bmi2" ) ]
2727#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
28- pub unsafe fn _mulx_u32 ( a : u32 , b : u32 , hi : & mut u32 ) -> u32 {
28+ pub fn _mulx_u32 ( a : u32 , b : u32 , hi : & mut u32 ) -> u32 {
2929 let result: u64 = ( a as u64 ) * ( b as u64 ) ;
3030 * hi = ( result >> 32 ) as u32 ;
3131 result as u32
@@ -38,8 +38,8 @@ pub unsafe fn _mulx_u32(a: u32, b: u32, hi: &mut u32) -> u32 {
3838#[ target_feature( enable = "bmi2" ) ]
3939#[ cfg_attr( test, assert_instr( bzhi) ) ]
4040#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
41- pub unsafe fn _bzhi_u32 ( a : u32 , index : u32 ) -> u32 {
42- x86_bmi2_bzhi_32 ( a, index)
41+ pub fn _bzhi_u32 ( a : u32 , index : u32 ) -> u32 {
42+ unsafe { x86_bmi2_bzhi_32 ( a, index) }
4343}
4444
4545/// Scatter contiguous low order bits of `a` to the result at the positions
@@ -50,8 +50,8 @@ pub unsafe fn _bzhi_u32(a: u32, index: u32) -> u32 {
5050#[ target_feature( enable = "bmi2" ) ]
5151#[ cfg_attr( test, assert_instr( pdep) ) ]
5252#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
53- pub unsafe fn _pdep_u32 ( a : u32 , mask : u32 ) -> u32 {
54- x86_bmi2_pdep_32 ( a, mask)
53+ pub fn _pdep_u32 ( a : u32 , mask : u32 ) -> u32 {
54+ unsafe { x86_bmi2_pdep_32 ( a, mask) }
5555}
5656
5757/// Gathers the bits of `x` specified by the `mask` into the contiguous low
@@ -62,8 +62,8 @@ pub unsafe fn _pdep_u32(a: u32, mask: u32) -> u32 {
6262#[ target_feature( enable = "bmi2" ) ]
6363#[ cfg_attr( test, assert_instr( pext) ) ]
6464#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
65- pub unsafe fn _pext_u32 ( a : u32 , mask : u32 ) -> u32 {
66- x86_bmi2_pext_32 ( a, mask)
65+ pub fn _pext_u32 ( a : u32 , mask : u32 ) -> u32 {
66+ unsafe { x86_bmi2_pext_32 ( a, mask) }
6767}
6868
6969unsafe extern "C" {
0 commit comments