mark POPCNT intrinsics as safe
Mark all POPCNT intrinsics as safe. `_mm_popcnt_u32` and `_mm_popcnt_u64` are missing.
This commit is contained in:
parent
0db395e703
commit
1271b7e281
2 changed files with 2 additions and 2 deletions
|
|
@ -40,7 +40,7 @@ pub unsafe fn _lzcnt_u32(x: u32) -> u32 {
|
|||
#[target_feature(enable = "popcnt")]
|
||||
#[cfg_attr(test, assert_instr(popcnt))]
|
||||
#[stable(feature = "simd_x86", since = "1.27.0")]
|
||||
pub unsafe fn _popcnt32(x: i32) -> i32 {
|
||||
pub fn _popcnt32(x: i32) -> i32 {
|
||||
x.count_ones() as i32
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ pub unsafe fn _lzcnt_u64(x: u64) -> u64 {
|
|||
#[target_feature(enable = "popcnt")]
|
||||
#[cfg_attr(test, assert_instr(popcnt))]
|
||||
#[stable(feature = "simd_x86", since = "1.27.0")]
|
||||
pub unsafe fn _popcnt64(x: i64) -> i32 {
|
||||
pub fn _popcnt64(x: i64) -> i32 {
|
||||
x.count_ones() as i32
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue