From 2a76c68842594b4ab4b5b7cf439515b5015ad9bf Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Wed, 17 Dec 2008 14:14:51 +0000 Subject: [PATCH] Backport aes-x86_64.pl update from HEAD and revisit same code in aes-586.pl. PR: 1801 --- crypto/aes/asm/aes-586.pl | 3 ++- crypto/aes/asm/aes-x86_64.pl | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) 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 44e0bf8cae..6711b63f7f 100755 --- a/crypto/aes/asm/aes-x86_64.pl +++ b/crypto/aes/asm/aes-x86_64.pl @@ -1198,13 +1198,10 @@ AES_cbc_encrypt: ret .align 4 .Lcbc_enc_tail: - cmp $inp,$out - je .Lcbc_enc_in_place mov %r10,%rcx mov $inp,%rsi mov $out,%rdi .long 0xF689A4F3 # rep movsb -.Lcbc_enc_in_place: mov \$16,%rcx # zero tail sub %r10,%rcx xor %rax,%rax -- 2.40.0