[git] GCRYPT - branch, master, updated. libgcrypt-1.5.0-203-gfd6721c

by Jussi Kivilinna cvs at cvs.gnupg.org
Sun Sep 1 16:17:39 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  fd6721c235a5bdcb332c8eb708fbd4f96e52e824 (commit)
      from  99d15543b8d94a8f1ef66c6ccb862b0ce82c514d (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 fd6721c235a5bdcb332c8eb708fbd4f96e52e824
Author: Jussi Kivilinna <jussi.kivilinna at iki.fi>
Date:   Sun Sep 1 16:46:32 2013 +0300

    Fix building for x32 target
    
    * mpi/amd64/mpi-asm-defs.h: New file.
    * random/rndhw.c (poll_padlock) [__x86_64__]: Also check if __LP64__ is
    defined.
    [USE_DRNG, __x86_64__]: Also check if __LP64__ is defined.
    --
    
    In short, x32 is new x86-64 ABI with 32-bit pointers. Adding support is
    straightforward, small fix for mpi and fixes for random/rndhw.c. AMD64 assembly
    functions appear to work fine with x32 and 'make check' passes.
    
    Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>

diff --git a/mpi/amd64/mpi-asm-defs.h b/mpi/amd64/mpi-asm-defs.h
new file mode 100644
index 0000000..6519065
--- /dev/null
+++ b/mpi/amd64/mpi-asm-defs.h
@@ -0,0 +1,4 @@
+/* This file defines some basic constants for the MPI machinery.  We
+ * need to define the types on a per-CPU basis, so it is done with
+ * this file here.  */
+#define BYTES_PER_MPI_LIMB  (SIZEOF_UNSIGNED_LONG_LONG)
diff --git a/random/rndhw.c b/random/rndhw.c
index ca99c5f..e625512 100644
--- a/random/rndhw.c
+++ b/random/rndhw.c
@@ -69,7 +69,7 @@ poll_padlock (void (*add)(const void*, size_t, enum random_origins),
   nbytes = 0;
   while (nbytes < 64)
     {
-#ifdef __x86_64__
+#if defined(__x86_64__) && defined(__LP64__)
       asm volatile
         ("movq %1, %%rdi\n\t"         /* Set buffer.  */
          "xorq %%rdx, %%rdx\n\t"      /* Request up to 8 bytes.  */
@@ -123,7 +123,7 @@ poll_padlock (void (*add)(const void*, size_t, enum random_origins),
 #ifdef USE_DRNG
 # define RDRAND_RETRY_LOOPS	10
 # define RDRAND_INT	".byte 0x0f,0xc7,0xf0"
-# ifdef __x86_64__
+# if defined(__x86_64__) && defined(__LP64__)
 #  define RDRAND_LONG	".byte 0x48,0x0f,0xc7,0xf0"
 # else
 #  define RDRAND_LONG	RDRAND_INT

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

Summary of changes:
 mpi/{armv6 => amd64}/mpi-asm-defs.h |    2 +-
 random/rndhw.c                      |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
 copy mpi/{armv6 => amd64}/mpi-asm-defs.h (73%)


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




More information about the Gnupg-commits mailing list