1use std::arch::x86_64;
2
3use crate::limb::Limb;
4
5type SimdLimb = x86_64::__m256;
6
7#[target_feature(enable = "avx")]
8fn load(limb: *const Limb) -> SimdLimb {
9 unsafe { x86_64::_mm256_loadu_ps(limb as *const f32) }
10}
11
12#[target_feature(enable = "avx")]
13fn store(limb: *mut Limb, val: SimdLimb) {
14 unsafe { x86_64::_mm256_storeu_ps(limb as *mut f32, val) }
15}
16
17#[target_feature(enable = "avx")]
18fn xor(left: SimdLimb, right: SimdLimb) -> SimdLimb {
19 x86_64::_mm256_xor_ps(left, right)
20}
21
22super::add_simd_arch!("avx");