summaryrefslogtreecommitdiff
path: root/x86_64
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2013-04-23 17:55:00 +0300
committerNiels Möller <nisse@lysator.liu.se>2013-04-23 18:54:58 +0200
commit7ba1434cf35f494d5c09f83876521f71ef67119e (patch)
tree1c06ba81fd5d24419742b0185d9219fc067e1115 /x86_64
parent2c508beb65e73e3308bd2448398322be9a55ca39 (diff)
downloadnettle-7ba1434cf35f494d5c09f83876521f71ef67119e.tar.gz
win64: Correctly read the fifth parameter from the stack if we've pushed xmm registers
This fixes the umac test on win64.
Diffstat (limited to 'x86_64')
-rw-r--r--x86_64/machine.m48
1 files changed, 6 insertions, 2 deletions
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(<XREG>,<ifelse(
dnl W64_ENTRY(nargs, xmm_used)
define(<W64_ENTRY>, <
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(<W64_ENTRY>, <
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