summaryrefslogtreecommitdiff
path: root/cipher/camellia-glue.c
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@iki.fi>2013-09-01 16:50:55 +0300
committerJussi Kivilinna <jussi.kivilinna@iki.fi>2013-09-01 16:50:55 +0300
commitf3515240de9513ead975985c9f8ab714022cac8e (patch)
tree7bae3811a618055de5ab9ab89e6f69145a75aade /cipher/camellia-glue.c
parent8b735cb563dff7aafbf8a970972522b5621e665c (diff)
downloadlibgcrypt-f3515240de9513ead975985c9f8ab714022cac8e.tar.gz
camellia-aesni-avx2-amd64: Move register clearing to assembly functions
* cipher/camellia-aesni-avx2-amd64.S (_gcry_camellia_aesni_avx2_ctr_enc): Add 'vzeroall'. (_gcry_camellia_aesni_avx2_cbc_dec) (_gcry_camellia_aesni_avx2_cfb_dec): Add 'vzeroupper' at head and 'vzeroall' at tail. * cipher/camellia-glue.c (_gcry_serpent_ctr_enc, _gcry_serpent_cbc_dec) (_gcry_serpent_avx2_cfb_dec) [USE_AESNI_AVX2]: Remove register clearing. -- Patch moves register clearing with 'vzeroall' to assembly functions and adds missing 'vzeroupper' instructions at head of assembly functions. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Diffstat (limited to 'cipher/camellia-glue.c')
-rw-r--r--cipher/camellia-glue.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/cipher/camellia-glue.c b/cipher/camellia-glue.c
index 7d8a4cdc..d6d60051 100644
--- a/cipher/camellia-glue.c
+++ b/cipher/camellia-glue.c
@@ -314,9 +314,6 @@ _gcry_camellia_ctr_enc(void *context, unsigned char *ctr,
int avx2_burn_stack_depth = 32 * CAMELLIA_BLOCK_SIZE + 16 +
2 * sizeof(void *);
- /* clear AVX registers */
- asm volatile ("vzeroall;\n":::);
-
if (burn_stack_depth < avx2_burn_stack_depth)
burn_stack_depth = avx2_burn_stack_depth;
}
@@ -408,9 +405,6 @@ _gcry_camellia_cbc_dec(void *context, unsigned char *iv,
int avx2_burn_stack_depth = 32 * CAMELLIA_BLOCK_SIZE + 16 +
2 * sizeof(void *);
- /* clear AVX registers */
- asm volatile ("vzeroall;\n":::);
-
if (burn_stack_depth < avx2_burn_stack_depth)
burn_stack_depth = avx2_burn_stack_depth;
}
@@ -496,9 +490,6 @@ _gcry_camellia_cfb_dec(void *context, unsigned char *iv,
int avx2_burn_stack_depth = 32 * CAMELLIA_BLOCK_SIZE + 16 +
2 * sizeof(void *);
- /* clear AVX registers */
- asm volatile ("vzeroall;\n":::);
-
if (burn_stack_depth < avx2_burn_stack_depth)
burn_stack_depth = avx2_burn_stack_depth;
}