Sync aes/asm with stable branch.

This commit is contained in:
Andy Polyakov 2008-12-27 13:37:45 +00:00
parent 8887e81bd7
commit 45b364ddab
2 changed files with 6 additions and 1 deletions

View File

@ -955,8 +955,9 @@ my $mark=&DWP(60+240,"esp"); #copy of aes_key->rounds
&align (4);
&set_label("enc_tail");
&push ($key eq "edi" ? $key : ""); # push ivp
&mov ($s0,$key eq "edi" ? $key : "");
&mov ($key,$_out); # load out
&push ($s0); # push ivp
&mov ($s1,16);
&sub ($s1,$s2);
&cmp ($key,$acc); # compare with inp

View File

@ -1198,6 +1198,8 @@ AES_cbc_encrypt:
ret
.align 4
.Lcbc_enc_tail:
mov %rax,%r11
mov %rcx,%r12
mov %r10,%rcx
mov $inp,%rsi
mov $out,%rdi
@ -1208,6 +1210,8 @@ AES_cbc_encrypt:
.long 0xF689AAF3 # rep stosb
mov $out,$inp # this is not a mistake!
movq \$16,$_len # len=16
mov %r11,%rax
mov %r12,%rcx
jmp .Lcbc_enc_loop # one more spin...
#----------------------------- DECRYPT -----------------------------#
.align 16