From: Martin Storsjö Date: Tue, 23 Apr 2013 14:55:00 +0000 (+0300) Subject: win64: Correctly read the fifth parameter from the stack if we've pushed xmm registers X-Git-Tag: nettle_2.7_release_20130424~1 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=7ba1434cf35f494d5c09f83876521f71ef67119e;p=thirdparty%2Fnettle.git win64: Correctly read the fifth parameter from the stack if we've pushed xmm registers This fixes the umac test on win64. --- diff --git a/ChangeLog b/ChangeLog index 4a1b169d..096ae21f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,7 +7,9 @@ within this subfunction. * x86_64/machine.m4 (W64_ENTRY): Use movdqu instead of movdqa for saving xmm registers, since the stack is not guaranteed to be - 16-byte aligned on win64. + 16-byte aligned on win64. Take pushed xmm registers into account + when reading the fifth parameter from the stack. + * Makefile.in: Consistently use EXEEXT_FOR_BUILD. 2013-04-21 Niels Möller diff --git a/x86_64/machine.m4 b/x86_64/machine.m4 index d5d5b37c..b9556a27 100644 --- a/x86_64/machine.m4 +++ b/x86_64/machine.m4 @@ -67,7 +67,7 @@ define(,, < changequote([,])dnl - ifelse(<<<<<<<<<<<<<<< ignored; only for balancing) + ifelse(<<<<<<<<<<<<<<<< ignored; only for balancing) ifelse(W64_ABI,yes,[ ifelse(eval($2 > 6), 1, [ sub [$]eval(8 + 16*($2 - 6)), %rsp @@ -115,7 +115,11 @@ define(, < mov %r9, %rcx ]) ifelse(eval($1 >= 5), 1, [ - mov 56(%rsp), %r8 + ifelse(eval($2 > 6), 1, [ + mov eval(8 + 16*($2 - 6) + 56)(%rsp), %r8 + ], [ + mov 56(%rsp), %r8 + ]) ]) ]) changequote(<,>)dnl