summaryrefslogtreecommitdiffhomepage
path: root/src/crypto/zinc
diff options
context:
space:
mode:
authorSamuel Neves <sneves@dei.uc.pt>2018-11-12 08:30:49 +0000
committerJason A. Donenfeld <Jason@zx2c4.com>2018-11-14 23:59:05 -0800
commit91043a9641469eb3316b18f62b408a19aa5c66f7 (patch)
tree939ade3c3a0caf49d534d554af53a08667eb9402 /src/crypto/zinc
parent56b6981182b2201c8486eabcfabd814bb834e844 (diff)
chacha20: simplify stack unwinding on ChaCha20_ctr32
objtool did not quite understand the stack arithmetic employed here. Signed-off-by: Samuel Neves <sneves@dei.uc.pt> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/crypto/zinc')
-rw-r--r--src/crypto/zinc/chacha20/chacha20-x86_64.pl18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/crypto/zinc/chacha20/chacha20-x86_64.pl b/src/crypto/zinc/chacha20/chacha20-x86_64.pl
index 49e698c..99bc461 100644
--- a/src/crypto/zinc/chacha20/chacha20-x86_64.pl
+++ b/src/crypto/zinc/chacha20/chacha20-x86_64.pl
@@ -448,22 +448,20 @@ $code.=<<___;
jnz .Loop_tail
.Ldone:
- lea 64+24+48(%rsp),%rsi
-.cfi_def_cfa %rsi,8
- mov -48(%rsi),%r15
+ add \$64+24,%rsp
+.cfi_adjust_cfa_offset -64-24
+ pop %r15
.cfi_restore %r15
- mov -40(%rsi),%r14
+ pop %r14
.cfi_restore %r14
- mov -32(%rsi),%r13
+ pop %r13
.cfi_restore %r13
- mov -24(%rsi),%r12
+ pop %r12
.cfi_restore %r12
- mov -16(%rsi),%rbp
+ pop %rbp
.cfi_restore %rbp
- mov -8(%rsi),%rbx
+ pop %rbx
.cfi_restore %rbx
- lea (%rsi),%rsp
-.cfi_def_cfa_register %rsp
.Lno_data:
ret
.cfi_endproc