Skip to content

Commit

Permalink
mark PCLMULQDQ intrinsics as safe
Browse files Browse the repository at this point in the history
Mark all PCLMULQDQ intrinsics as safe.
  • Loading branch information
usamoi authored and Amanieu committed Feb 24, 2025
1 parent 930915c commit fb03902
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/core_arch/src/x86/pclmulqdq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ unsafe extern "C" {
#[cfg_attr(test, assert_instr(pclmul, IMM8 = 0))]
#[rustc_legacy_const_generics(2)]
#[stable(feature = "simd_x86", since = "1.27.0")]
pub unsafe fn _mm_clmulepi64_si128<const IMM8: i32>(a: __m128i, b: __m128i) -> __m128i {
pub fn _mm_clmulepi64_si128<const IMM8: i32>(a: __m128i, b: __m128i) -> __m128i {
static_assert_uimm_bits!(IMM8, 8);
pclmulqdq(a, b, IMM8 as u8)
unsafe { pclmulqdq(a, b, IMM8 as u8) }
}

#[cfg(test)]
Expand Down

0 comments on commit fb03902

Please sign in to comment.