From 45b364ddabb7c571d2e948156fc070ad37430113 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Sat, 27 Dec 2008 13:37:45 +0000 Subject: [PATCH] Sync aes/asm with stable branch. --- crypto/aes/asm/aes-586.pl | 3 ++- crypto/aes/asm/aes-x86_64.pl | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/crypto/aes/asm/aes-586.pl b/crypto/aes/asm/aes-586.pl index 89fa261794..3bc46a968e 100755 --- a/crypto/aes/asm/aes-586.pl +++ b/crypto/aes/asm/aes-586.pl @@ -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 diff --git a/crypto/aes/asm/aes-x86_64.pl b/crypto/aes/asm/aes-x86_64.pl index 6711b63f7f..f616f1751f 100755 --- a/crypto/aes/asm/aes-x86_64.pl +++ b/crypto/aes/asm/aes-x86_64.pl @@ -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 -- 2.25.1