From 110fcc960757d7aeb7760359800b8f5646dc70ca Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Wed, 16 Mar 2016 15:43:15 -0400 Subject: [PATCH] poly1305/asm/poly1305-x86_64.pl: make it work with linux-x32. (Imported from upstream's 2460c7f13389d766dd65fa4e14b69b6fbe3e4e3b.) This is a no-op for us, but avoid a diff with upstream. Change-Id: I6e875704a38dcd9339371393a4dd523647aeef44 Reviewed-on: https://boringssl-review.googlesource.com/7491 Reviewed-by: Steven Valdez Reviewed-by: David Benjamin --- crypto/poly1305/asm/poly1305-x86_64.pl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/crypto/poly1305/asm/poly1305-x86_64.pl b/crypto/poly1305/asm/poly1305-x86_64.pl index 6c332e9b..3c810c5a 100755 --- a/crypto/poly1305/asm/poly1305-x86_64.pl +++ b/crypto/poly1305/asm/poly1305-x86_64.pl @@ -148,10 +148,16 @@ $code.=<<___; and 8($inp),%rcx mov %rax,24($ctx) mov %rcx,32($ctx) - +___ +$code.=<<___ if ($flavour !~ /elf32/); mov %r10,0(%rdx) mov %r11,8(%rdx) - +___ +$code.=<<___ if ($flavour =~ /elf32/); + mov %r10d,0(%rdx) + mov %r11d,4(%rdx) +___ +$code.=<<___; mov \$1,%eax .Lno_key: ret