[git] GCRYPT - branch, master, updated. libgcrypt-1.5.0-196-g040aa76
by Jussi Kivilinna
cvs at cvs.gnupg.org
Thu Aug 22 14:55:30 CEST 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU crypto library".
The branch, master has been updated
via 040aa7688296e93659cb32ca31e9a001a6ab1edd (commit)
via 82db04a6a0058cf870485459abe7c1659b138ec5 (commit)
from da327aef3fe24fdf98fffbc8aea69de42ed12456 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 040aa7688296e93659cb32ca31e9a001a6ab1edd
Author: Jussi Kivilinna <jussi.kivilinna at iki.fi>
Date: Thu Aug 22 15:26:52 2013 +0300
serpent-sse2-amd64: Move register clearing to assembly functions
cipher/serpent-sse2-amd64.S (_gcry_serpent_sse2_ctr_enc)
(_gcry_serpent_sse2_cbc_dec, _gcry_serpent_sse2_cfb_dec): Clear used
XMM registers.
cipher/serpent.c (_gcry_serpent_ctr_enc, _gcry_serpent_cbc_dec)
( _gcry_serpent_cfb_dec) [USE_SSE2]: Remove XMM register clearing from
bulk functions.
--
Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>
diff --git a/cipher/serpent-sse2-amd64.S b/cipher/serpent-sse2-amd64.S
index fe9feee..a5cf353 100644
--- a/cipher/serpent-sse2-amd64.S
+++ b/cipher/serpent-sse2-amd64.S
@@ -756,6 +756,20 @@ _gcry_serpent_sse2_ctr_enc:
movdqu RB2, (6 * 16)(%rsi);
movdqu RB3, (7 * 16)(%rsi);
+ /* clear the used registers */
+ pxor RA0, RA0;
+ pxor RA1, RA1;
+ pxor RA2, RA2;
+ pxor RA3, RA3;
+ pxor RB0, RB0;
+ pxor RB1, RB1;
+ pxor RB2, RB2;
+ pxor RB3, RB3;
+ pxor RTMP0, RTMP0;
+ pxor RTMP1, RTMP1;
+ pxor RTMP2, RTMP2;
+ pxor RNOT, RNOT;
+
ret
.size _gcry_serpent_sse2_ctr_enc,.-_gcry_serpent_sse2_ctr_enc;
@@ -819,6 +833,20 @@ _gcry_serpent_sse2_cbc_dec:
movdqu RB2, (6 * 16)(%rsi);
movdqu RB3, (7 * 16)(%rsi);
+ /* clear the used registers */
+ pxor RA0, RA0;
+ pxor RA1, RA1;
+ pxor RA2, RA2;
+ pxor RA3, RA3;
+ pxor RB0, RB0;
+ pxor RB1, RB1;
+ pxor RB2, RB2;
+ pxor RB3, RB3;
+ pxor RTMP0, RTMP0;
+ pxor RTMP1, RTMP1;
+ pxor RTMP2, RTMP2;
+ pxor RNOT, RNOT;
+
ret
.size _gcry_serpent_sse2_cbc_dec,.-_gcry_serpent_sse2_cbc_dec;
@@ -885,6 +913,20 @@ _gcry_serpent_sse2_cfb_dec:
movdqu RB2, (6 * 16)(%rsi);
movdqu RB3, (7 * 16)(%rsi);
+ /* clear the used registers */
+ pxor RA0, RA0;
+ pxor RA1, RA1;
+ pxor RA2, RA2;
+ pxor RA3, RA3;
+ pxor RB0, RB0;
+ pxor RB1, RB1;
+ pxor RB2, RB2;
+ pxor RB3, RB3;
+ pxor RTMP0, RTMP0;
+ pxor RTMP1, RTMP1;
+ pxor RTMP2, RTMP2;
+ pxor RNOT, RNOT;
+
ret
.size _gcry_serpent_sse2_cfb_dec,.-_gcry_serpent_sse2_cfb_dec;
diff --git a/cipher/serpent.c b/cipher/serpent.c
index 8aded34..bf03fe7 100644
--- a/cipher/serpent.c
+++ b/cipher/serpent.c
@@ -875,22 +875,6 @@ _gcry_serpent_ctr_enc(void *context, unsigned char *ctr,
if (did_use_sse2)
{
- /* clear SSE2 registers used by serpent-sse2 */
- asm volatile (
- "pxor %%xmm0, %%xmm0;\n"
- "pxor %%xmm1, %%xmm1;\n"
- "pxor %%xmm2, %%xmm2;\n"
- "pxor %%xmm3, %%xmm3;\n"
- "pxor %%xmm4, %%xmm4;\n"
- "pxor %%xmm5, %%xmm5;\n"
- "pxor %%xmm6, %%xmm6;\n"
- "pxor %%xmm7, %%xmm7;\n"
- "pxor %%xmm10, %%xmm10;\n"
- "pxor %%xmm11, %%xmm11;\n"
- "pxor %%xmm12, %%xmm12;\n"
- "pxor %%xmm13, %%xmm13;\n"
- :::);
-
/* serpent-sse2 assembly code does not use stack */
if (nblocks == 0)
burn_stack_depth = 0;
@@ -982,22 +966,6 @@ _gcry_serpent_cbc_dec(void *context, unsigned char *iv,
if (did_use_sse2)
{
- /* clear SSE2 registers used by serpent-sse2 */
- asm volatile (
- "pxor %%xmm0, %%xmm0;\n"
- "pxor %%xmm1, %%xmm1;\n"
- "pxor %%xmm2, %%xmm2;\n"
- "pxor %%xmm3, %%xmm3;\n"
- "pxor %%xmm4, %%xmm4;\n"
- "pxor %%xmm5, %%xmm5;\n"
- "pxor %%xmm6, %%xmm6;\n"
- "pxor %%xmm7, %%xmm7;\n"
- "pxor %%xmm10, %%xmm10;\n"
- "pxor %%xmm11, %%xmm11;\n"
- "pxor %%xmm12, %%xmm12;\n"
- "pxor %%xmm13, %%xmm13;\n"
- :::);
-
/* serpent-sse2 assembly code does not use stack */
if (nblocks == 0)
burn_stack_depth = 0;
@@ -1084,22 +1052,6 @@ _gcry_serpent_cfb_dec(void *context, unsigned char *iv,
if (did_use_sse2)
{
- /* clear SSE2 registers used by serpent-sse2 */
- asm volatile (
- "pxor %%xmm0, %%xmm0;\n"
- "pxor %%xmm1, %%xmm1;\n"
- "pxor %%xmm2, %%xmm2;\n"
- "pxor %%xmm3, %%xmm3;\n"
- "pxor %%xmm4, %%xmm4;\n"
- "pxor %%xmm5, %%xmm5;\n"
- "pxor %%xmm6, %%xmm6;\n"
- "pxor %%xmm7, %%xmm7;\n"
- "pxor %%xmm10, %%xmm10;\n"
- "pxor %%xmm11, %%xmm11;\n"
- "pxor %%xmm12, %%xmm12;\n"
- "pxor %%xmm13, %%xmm13;\n"
- :::);
-
/* serpent-sse2 assembly code does not use stack */
if (nblocks == 0)
burn_stack_depth = 0;
commit 82db04a6a0058cf870485459abe7c1659b138ec5
Author: Jussi Kivilinna <jussi.kivilinna at iki.fi>
Date: Thu Aug 22 15:26:52 2013 +0300
twofish-amd64: do not make __twofish_dec_blk3 global
* cipher/twofish-amd64.S (__twofish_dec_blk3): Do not export symbol as
global.
(__twofish_dec_blk3): Mark symbol as function.
--
Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>
diff --git a/cipher/twofish-amd64.S b/cipher/twofish-amd64.S
index d466834..45548d2 100644
--- a/cipher/twofish-amd64.S
+++ b/cipher/twofish-amd64.S
@@ -488,7 +488,7 @@ __twofish_enc_blk3:
.size __twofish_enc_blk3,.-__twofish_enc_blk3;
.align 8
-.global __twofish_dec_blk3
+.type __twofish_dec_blk3, at function;
__twofish_dec_blk3:
/* input:
-----------------------------------------------------------------------
Summary of changes:
cipher/serpent-sse2-amd64.S | 42 +++++++++++++++++++++++++++++++++++++
cipher/serpent.c | 48 -------------------------------------------
cipher/twofish-amd64.S | 2 +-
3 files changed, 43 insertions(+), 49 deletions(-)
hooks/post-receive
--
The GNU crypto library
http://git.gnupg.org
More information about the Gnupg-commits
mailing list