Fix some compact unwind errors.
The Mac ld gets unhappy about "weird" unwind directives: In chacha20_poly1305_x86_64.pl, $keyp is being pushed on the stack (according to the comment) because it gets clobbered in the computation somewhere. $keyp is %r9 which is not callee-saved (it's an argument register), so we don't need to tag it with .cfi_offset. In x25519-asm-x86_64.S, x25519_x86_64_mul saves %rdi on the stack. However it too is not callee-saved (it's an argument register) and should not have a .cfi_offset. %rdi also does not appear to be written to anywhere in the function, so there's no need to save it at all. (This does not resolve the "r15 is saved too far from return address" errors. Just the non-standard register ones.) BUG=176 Change-Id: I53f3f7db3d1745384fb47cb52cd6536aabb5065e Reviewed-on: https://boringssl-review.googlesource.com/13560 Commit-Queue: David Benjamin <davidben@google.com> Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
committed by
Adam Langley
parent
17b3083373
commit
5c9d411e14
@@ -453,7 +453,6 @@ chacha20_poly1305_open:
|
||||
.cfi_offset r13, -40
|
||||
.cfi_offset r14, -48
|
||||
.cfi_offset r15, -56
|
||||
.cfi_offset $keyp, -64
|
||||
lea 32(%rsp), %rbp
|
||||
and \$-32, %rbp
|
||||
mov %rdx, 8+$len_store
|
||||
@@ -852,7 +851,6 @@ chacha20_poly1305_seal:
|
||||
.cfi_offset r13, -40
|
||||
.cfi_offset r14, -48
|
||||
.cfi_offset r15, -56
|
||||
.cfi_offset $keyp, -64
|
||||
lea 32(%rsp), %rbp
|
||||
and \$-32, %rbp
|
||||
mov %rdx, 8+$len_store
|
||||
|
||||
@@ -143,8 +143,6 @@ movq %rbx,-40(%rsp)
|
||||
.cfi_rel_offset rbx, -40
|
||||
movq %rbp,-48(%rsp)
|
||||
.cfi_rel_offset rbp, -48
|
||||
movq %rdi,-56(%rsp)
|
||||
.cfi_rel_offset rdi, -56
|
||||
mov %rdx,%rcx
|
||||
movq 24(%rsi),%rdx
|
||||
imulq $19,%rdx,%rax
|
||||
|
||||
Reference in New Issue
Block a user