[git] GCRYPT - branch, master, updated. libgcrypt-1.7.3-104-g32b4ab2

by Jussi Kivilinna cvs at cvs.gnupg.org
Sun Jun 18 10:21:25 CEST 2017


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  32b4ab209067f6f08b87b27bc78ec27dc497b708 (commit)
      from  82bc052eda5b3897724c7ad11e54f8203e8e88e9 (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 32b4ab209067f6f08b87b27bc78ec27dc497b708
Author: Jussi Kivilinna <jussi.kivilinna at iki.fi>
Date:   Sun Jun 18 10:35:50 2017 +0300

    rijndael-padlock: change asm operands from read-only to read/write
    
    * cipher/rijndael-padlock.c (do_padlock): Change ESI/EDI/ECX to use
    read/write operands as XCRYPT instruction modifies these registers.
    --
    
    Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>

diff --git a/cipher/rijndael-padlock.c b/cipher/rijndael-padlock.c
index 476772a..234751b 100644
--- a/cipher/rijndael-padlock.c
+++ b/cipher/rijndael-padlock.c
@@ -43,6 +43,8 @@ do_padlock (const RIJNDAEL_context *ctx, unsigned char *bx,
   unsigned char a[16] __attribute__ ((aligned (16)));
   unsigned char b[16] __attribute__ ((aligned (16)));
   unsigned int cword[4] __attribute__ ((aligned (16)));
+  unsigned char *pa = a;
+  unsigned char *pb = b;
   int blocks;
 
   /* The control word fields are:
@@ -63,19 +65,19 @@ do_padlock (const RIJNDAEL_context *ctx, unsigned char *bx,
     ("pushfq\n\t"          /* Force key reload.  */
      "popfq\n\t"
      ".byte 0xf3, 0x0f, 0xa7, 0xc8\n\t" /* REP XCRYPT ECB. */
-     : /* No output */
-     : "S" (a), "D" (b), "d" (cword), "b" (ctx->padlockkey), "c" (blocks)
+     : "+S" (pa), "+D" (pb), "+c" (blocks)
+     : "d" (cword), "b" (ctx->padlockkey)
      : "cc", "memory"
      );
 #else
   asm volatile
     ("pushfl\n\t"          /* Force key reload.  */
      "popfl\n\t"
-     "xchg %3, %%ebx\n\t"  /* Load key.  */
+     "xchg %4, %%ebx\n\t"  /* Load key.  */
      ".byte 0xf3, 0x0f, 0xa7, 0xc8\n\t" /* REP XCRYPT ECB. */
-     "xchg %3, %%ebx\n"    /* Restore GOT register.  */
-     : /* No output */
-     : "S" (a), "D" (b), "d" (cword), "r" (ctx->padlockkey), "c" (blocks)
+     "xchg %4, %%ebx\n"    /* Restore GOT register.  */
+     : "+S" (pa), "+D" (pb), "+c" (blocks)
+     : "d" (cword), "r" (ctx->padlockkey)
      : "cc", "memory"
      );
 #endif

-----------------------------------------------------------------------

Summary of changes:
 cipher/rijndael-padlock.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
The GNU crypto library
http://git.gnupg.org


_______________________________________________
Gnupg-commits mailing list
Gnupg-commits at gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-commits




More information about the Gcrypt-devel mailing list