Skip to content

Commit

Permalink
aes_gcm aarch64/x86_64: Don't look at target_feature for #[cold].
Browse files Browse the repository at this point in the history
  • Loading branch information
briansmith committed Jun 23, 2024
1 parent fde2c7f commit fd06b00
Showing 1 changed file with 6 additions and 22 deletions.
28 changes: 6 additions & 22 deletions src/aead/aes_gcm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,24 +220,14 @@ pub(super) fn seal(

#[cfg_attr(
any(
all(
any(target_arch = "aarch64", target_arch = "arm"),
target_feature = "neon"
),
all(
any(target_arch = "x86", target_arch = "x86_64"),
target_feature = "sse"
)
target_arch = "aarch64",
target_arch = "arm",
target_arch = "x86",
target_arch = "x86_64"
),
inline(never)
)]
#[cfg_attr(
any(
all(target_arch = "aarch64", target_feature = "neon"),
all(target_arch = "x86_64", target_feature = "sse")
),
cold
)]
#[cfg_attr(any(target_arch = "aarch64", target_arch = "x86_64"), cold)]
fn seal_strided<A: aes::EncryptBlock + aes::EncryptCtr32, G: gcm::UpdateBlocks + gcm::Gmult>(
Combo { aes_key, gcm_key }: &Combo<A, G>,
aad: Aad<&[u8]>,
Expand Down Expand Up @@ -425,13 +415,7 @@ pub(super) fn open(
),
inline(never)
)]
#[cfg_attr(
any(
all(target_arch = "aarch64", target_feature = "neon"),
all(target_arch = "x86_64", target_feature = "sse")
),
cold
)]
#[cfg_attr(any(target_arch = "aarch64", target_arch = "x86_64"), cold)]
fn open_strided<A: aes::EncryptBlock + aes::EncryptCtr32, G: gcm::UpdateBlocks + gcm::Gmult>(
Combo { aes_key, gcm_key }: &Combo<A, G>,
aad: Aad<&[u8]>,
Expand Down

0 comments on commit fd06b00

Please sign in to comment.