diff options
author | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2013-09-01 16:46:32 +0300 |
---|---|---|
committer | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2013-09-01 16:46:32 +0300 |
commit | fd6721c235a5bdcb332c8eb708fbd4f96e52e824 (patch) | |
tree | ce8d1d2ebb61cbc6ad962ebcda40793777298477 /mpi/amd64 | |
parent | 99d15543b8d94a8f1ef66c6ccb862b0ce82c514d (diff) | |
download | libgcrypt-fd6721c235a5bdcb332c8eb708fbd4f96e52e824.tar.gz |
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@iki.fi>
Diffstat (limited to 'mpi/amd64')
-rw-r--r-- | mpi/amd64/mpi-asm-defs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mpi/amd64/mpi-asm-defs.h b/mpi/amd64/mpi-asm-defs.h new file mode 100644 index 00000000..65190653 --- /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) |