Skip to content

Commit de491ee

Browse files
committed
cleanup rebase disaster for VPCLMUL
1 parent 4bbb61a commit de491ee

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

crates/core_arch/src/x86/avx512vpclmulqdq.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,26 @@ pub unsafe fn _mm512_clmulepi64_epi128(a: __m512i, b: __m512i, imm8: i32) -> __m
5757
#[target_feature(enable = "avx512vpclmulqdq,avx512vl")]
5858
#[cfg_attr(test, assert_instr(vpclmul, imm8 = 0))]
5959
#[rustc_args_required_const(2)]
60+
pub unsafe fn _mm256_clmulepi64_epi128(a: __m256i, b: __m256i, imm8: i32) -> __m256i {
61+
macro_rules! call {
62+
($imm8:expr) => {
63+
pclmulqdq_256(a, b, $imm8)
64+
};
65+
}
66+
constify_imm8!(imm8, call)
67+
}
68+
69+
#[cfg(test)]
70+
mod tests {
71+
// The constants in the tests below are just bit patterns. They should not
72+
// be interpreted as integers; signedness does not make sense for them, but
73+
// __mXXXi happens to be defined in terms of signed integers.
74+
#![allow(overflowing_literals)]
75+
76+
use stdarch_test::simd_test;
77+
78+
use crate::core_arch::x86::*;
79+
6080
macro_rules! verify_kat_pclmul {
6181
($broadcast:ident, $clmul:ident, $assert:ident) => {
6282
// Constants taken from https://software.intel.com/sites/default/files/managed/72/cc/clmul-wp-rev-2.02-2014-04-20.pdf

0 commit comments

Comments
 (0)