@@ -25,7 +25,7 @@ use stdarch_test::assert_instr;
25
25
#[ cfg_attr( all( test, target_arch = "x86" ) , assert_instr( mul) ) ]
26
26
#[ target_feature( enable = "bmi2" ) ]
27
27
#[ 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 {
29
29
let result: u64 = ( a as u64 ) * ( b as u64 ) ;
30
30
* hi = ( result >> 32 ) as u32 ;
31
31
result as u32
@@ -38,8 +38,8 @@ pub unsafe fn _mulx_u32(a: u32, b: u32, hi: &mut u32) -> u32 {
38
38
#[ target_feature( enable = "bmi2" ) ]
39
39
#[ cfg_attr( test, assert_instr( bzhi) ) ]
40
40
#[ 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) }
43
43
}
44
44
45
45
/// 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 {
50
50
#[ target_feature( enable = "bmi2" ) ]
51
51
#[ cfg_attr( test, assert_instr( pdep) ) ]
52
52
#[ 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) }
55
55
}
56
56
57
57
/// 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 {
62
62
#[ target_feature( enable = "bmi2" ) ]
63
63
#[ cfg_attr( test, assert_instr( pext) ) ]
64
64
#[ 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) }
67
67
}
68
68
69
69
unsafe extern "C" {
0 commit comments