Skip to content
Snippets Groups Projects
Commit 5ba1d4e1 authored by Niels Möller's avatar Niels Möller
Browse files

Exclude asm files which fail when building on w64 using mini-gmp.

parent 9c95a3d3
Branches
Tags nettle_3.1rc3
No related merge requests found
2015-03-31 Niels Möller <nisse@diamant.hack.org>
* x86_64/ecc-224-modp.asm: Require that GMP_NUMB_BITS == 64.
* x86_64/ecc-521-modp.asm: Likewise. Note that the other
ecc-*-modp.asm files happen to work fine on x86_64, with either 32
or 64 bits.
* asm.m4 (GMP_NUMB_BITS): New macro, expanding to nothing.
* configure.ac: Move tests for compiler characteristics,
libraries, and GMP_NUMB_BITS, before assembler-related tests.
For files in $asm_hogweed_optional_list, check if they declare
a GMP_NUMB_BITS requirement, and skip files which are incompatible
with the configuration. Needed for --enable-mini-gmp om w64.
* Makefile.in (clean-here): Unconditionally delete *.a (including
stub libraries like *.dll.a).
......
......@@ -27,6 +27,8 @@ COFF_STYLE, yes,
.endef>,
<>)>)
define(<GMP_NUMB_BITS>,<>)dnl
define(<PROLOGUE>,
<.globl C_NAME($1)
DECLARE_FUNC(C_NAME($1))
......
......@@ -464,6 +464,13 @@ EOF
tmp_b=`echo "$tmp_h" | sed 's/\.[[^.]]*$//'`
for asm_dir in $asm_path ; do
if test -f "$srcdir/$asm_dir/$tmp_h"; then
dnl Note double square brackets, for extra m4 quoting.
tmp_bits=`grep GMP_NUMB_BITS "$srcdir/$asm_dir/$tmp_h" \
| sed 's/^.*GMP_NUMB_BITS(\([[0-9]]*\)).*$/\1/'`
if test "$tmp_bits" && test "$tmp_bits" != '${GMP_NUMB_BITS}' ; then
AC_MSG_WARN([skipping $tmp_h, because GMP_NUMB_BITS != $tmp_bits])
continue
fi
asm_file_list="$asm_file_list $tmp_h"
AC_CONFIG_LINKS($tmp_h:$asm_dir/$tmp_h)
while read tmp_func ; do
......
......@@ -32,6 +32,8 @@ ifelse(<
.file "ecc-224-modp.asm"
GMP_NUMB_BITS(64)
define(<RP>, <%rsi>)
define(<T0>, <%rdi>) C Overlaps unused modulo input
define(<T1>, <%rcx>)
......
......@@ -32,6 +32,8 @@ ifelse(<
.file "ecc-521-modp.asm"
GMP_NUMB_BITS(64)
define(<RP>, <%rsi>)
define(<U0>, <%rax>)
define(<U1>, <%rbx>)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment