diff options
author | Andy Polyakov <appro@openssl.org> | 2009-04-26 17:58:01 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2009-04-26 17:58:01 +0000 |
commit | 75d448dde4bbde588bd242df53e48d22cb530f6b (patch) | |
tree | 7912da16fa2c8368fff6f022bf57ac0f70167412 | |
parent | e303f55fc7dcfce113d71e0ab9652c69fb1ec36d (diff) |
Handle push/pop %rbx in epi/prologue (this is Win64 SEH thing).
-rwxr-xr-x | crypto/rc4/asm/rc4-x86_64.pl | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/crypto/rc4/asm/rc4-x86_64.pl b/crypto/rc4/asm/rc4-x86_64.pl index af2093643f..677be5fe25 100755 --- a/crypto/rc4/asm/rc4-x86_64.pl +++ b/crypto/rc4/asm/rc4-x86_64.pl @@ -91,9 +91,9 @@ RC4: or $len,$len jne .Lentry ret .Lentry: + push %rbx push %r12 push %r13 - sub \$8,%rsp .Lprologue: add \$8,$dat @@ -167,7 +167,6 @@ $code.=<<___; jz .Lcloop1 cmpl \$0,260($dat) jnz .Lcloop1 - push %rbx jmp .Lcloop8 .align 16 .Lcloop8: @@ -222,7 +221,6 @@ $code.=<<___; test \$-8,$len jnz .Lcloop8 - pop %rbx cmp \$0,$len jne .Lcloop1 jmp .Lexit @@ -254,8 +252,9 @@ $code.=<<___; movl $XX[0]#d,-8($dat) movl $YY#d,-4($dat) - mov 8(%rsp),%r13 - mov 16(%rsp),%r12 + mov (%rsp),%r13 + mov 8(%rsp),%r12 + mov 16(%rsp),%rbx add \$24,%rsp .Lepilogue: ret @@ -400,13 +399,15 @@ stream_se_handler: mov 152($context),%rax # pull context->Rsp lea .Lepilogue(%rip),%r10 - cmp %r10,%rbx # context->Rip<prologue label + cmp %r10,%rbx # context->Rip>=epilogue label jae .Lin_prologue lea 24(%rax),%rax - mov -8(%rax),%r12 - mov -16(%rax),%r13 + mov -8(%rax),%rbx + mov -16(%rax),%r12 + mov -24(%rax),%r13 + mov %rbx,144($context) # restore context->Rbx mov %r12,216($context) # restore context->R12 mov %r13,224($context) # restore context->R13 |