diff options
author | Andy Polyakov <appro@openssl.org> | 2008-12-22 14:15:11 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2008-12-22 14:15:11 +0000 |
commit | ea4d5005d957e5908e2d860cf18416f3f626f9a3 (patch) | |
tree | 2c0ffe89da990d078a087305c84780150135550d /crypto/camellia | |
parent | 9f03d0fc04805d22922be8a89a11a32054aa7e1d (diff) |
cmll-x86_64.pl: Win64 SEH section to handle pushf/popf in CBC routine.
Diffstat (limited to 'crypto/camellia')
-rw-r--r-- | crypto/camellia/asm/cmll-x86_64.pl | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/crypto/camellia/asm/cmll-x86_64.pl b/crypto/camellia/asm/cmll-x86_64.pl index 199165f95f..4fe87e99f2 100644 --- a/crypto/camellia/asm/cmll-x86_64.pl +++ b/crypto/camellia/asm/cmll-x86_64.pl @@ -742,12 +742,14 @@ Camellia_cbc_encrypt: mov %rax,8+$ivec mov %rax,$_res +.Lcbc_enc_pushf: pushfq cld mov $inp,%rsi lea $ivec,%rdi .long 0x9066A4F3 # rep movsb popfq +.Lcbc_enc_popf: lea $ivec,$inp lea 16+$ivec,%rax @@ -830,12 +832,14 @@ Camellia_cbc_encrypt: mov @S[2],8+$ivec mov @S[3],12+$ivec +.Lcbc_dec_pushf: pushfq cld lea $ivec,%rsi lea ($out),%rdi .long 0x9066A4F3 # rep movsb popfq +.Lcbc_dec_popf: mov %rax,(%rdx) # write out IV residue mov %rbx,8(%rdx) @@ -954,6 +958,25 @@ cbc_se_handler: cmp %r10,%rbx # context->Rip>=.Lcbc_abort jae .Lin_cbc_prologue + # handle pushf/popf in Camellia_cbc_encrypt + lea .Lcbc_enc_pushf(%rip),%r10 + cmp %r10,%rbx # context->Rip<=.Lcbc_enc_pushf + jbe .Lin_cbc_no_flag + lea 8(%rax),%rax + lea .Lcbc_enc_popf(%rip),%r10 + cmp %r10,%rbx # context->Rip<.Lcbc_enc_popf + jb .Lin_cbc_no_flag + lea -8(%rax),%rax + lea .Lcbc_dec_pushf(%rip),%r10 + cmp %r10,%rbx # context->Rip<=.Lcbc_dec_pushf + jbe .Lin_cbc_no_flag + lea 8(%rax),%rax + lea .Lcbc_dec_popf(%rip),%r10 + cmp %r10,%rbx # context->Rip<.Lcbc_dec_popf + jb .Lin_cbc_no_flag + lea -8(%rax),%rax + +.Lin_cbc_no_flag: mov 48(%rax),%rax # $_rsp lea 48(%rax),%rax |