Skip to content

Commit

Permalink
aes_gcm/x86_64: Tweak CPU feature parameter for clmulavxmovbe.
Browse files Browse the repository at this point in the history
Switch to the preferred style of indicating CPU features for a function when we
don't need a named type for some specific reason.
  • Loading branch information
briansmith committed Mar 4, 2025
1 parent 5473ab1 commit 6711e7b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/aead/gcm/clmulavxmovbe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,19 @@
#![cfg(target_arch = "x86_64")]

use super::{HTable, KeyValue, UpdateBlock, UpdateBlocks, Xi, BLOCK_LEN};
use crate::{cpu, polyfill::slice::AsChunks};

pub(in super::super) type RequiredCpuFeatures =
(cpu::intel::ClMul, cpu::intel::Avx, cpu::intel::Movbe);
use crate::{cpu::intel, polyfill::slice::AsChunks};

#[derive(Clone)]
pub struct Key {
h_table: HTable,
}

impl Key {
pub(in super::super) fn new(value: KeyValue, _cpu: RequiredCpuFeatures) -> Self {
#[inline(never)]
pub(in super::super) fn new(
value: KeyValue,
_required_cpu_features: (intel::ClMul, intel::Avx, intel::Movbe),
) -> Self {
Self {
h_table: unsafe { htable_new!(gcm_init_avx, value) },
}
Expand Down

0 comments on commit 6711e7b

Please sign in to comment.