aesni-sha[1|256]-x86_64.pl: fix logical error and MacOS X build.
This commit is contained in:
parent
764fe518da
commit
9024b84b7c
@ -726,7 +726,7 @@ ___
|
|||||||
if ($stitched_decrypt) {{{
|
if ($stitched_decrypt) {{{
|
||||||
# reset
|
# reset
|
||||||
($in0,$out,$len,$key,$ivp,$ctx,$inp)=("%rdi","%rsi","%rdx","%rcx","%r8","%r9","%r10");
|
($in0,$out,$len,$key,$ivp,$ctx,$inp)=("%rdi","%rsi","%rdx","%rcx","%r8","%r9","%r10");
|
||||||
$j=$jj=$r=$sn=$rx=0;
|
$j=$jj=$r=$rx=0;
|
||||||
$Xi=4;
|
$Xi=4;
|
||||||
|
|
||||||
# reassign for Atom Silvermont (see above)
|
# reassign for Atom Silvermont (see above)
|
||||||
@ -994,7 +994,7 @@ $code.=<<___;
|
|||||||
.size aesni256_cbc_sha1_dec_ssse3,.-aesni256_cbc_sha1_dec_ssse3
|
.size aesni256_cbc_sha1_dec_ssse3,.-aesni256_cbc_sha1_dec_ssse3
|
||||||
___
|
___
|
||||||
}}}
|
}}}
|
||||||
$j=$jj=$r=$sn=$rx=0;
|
$j=$jj=$r=$rx=0;
|
||||||
|
|
||||||
if ($avx) {
|
if ($avx) {
|
||||||
my ($in0,$out,$len,$key,$ivp,$ctx,$inp)=("%rdi","%rsi","%rdx","%rcx","%r8","%r9","%r10");
|
my ($in0,$out,$len,$key,$ivp,$ctx,$inp)=("%rdi","%rsi","%rdx","%rcx","%r8","%r9","%r10");
|
||||||
@ -1440,7 +1440,7 @@ ___
|
|||||||
# reset
|
# reset
|
||||||
($in0,$out,$len,$key,$ivp,$ctx,$inp)=("%rdi","%rsi","%rdx","%rcx","%r8","%r9","%r10");
|
($in0,$out,$len,$key,$ivp,$ctx,$inp)=("%rdi","%rsi","%rdx","%rcx","%r8","%r9","%r10");
|
||||||
|
|
||||||
$j=$jj=$r=$sn=$rx=0;
|
$j=$jj=$r=$rx=0;
|
||||||
$Xi=4;
|
$Xi=4;
|
||||||
|
|
||||||
@aes256_dec = (
|
@aes256_dec = (
|
||||||
|
@ -59,7 +59,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
|
|||||||
$avx = ($1>=10) + ($1>=11);
|
$avx = ($1>=10) + ($1>=11);
|
||||||
}
|
}
|
||||||
|
|
||||||
$shaext=1; ### set to zero if compiling for 1.0.1
|
$shaext=$avx; ### set to zero if compiling for 1.0.1
|
||||||
$avx=1 if (!$shaext && $avx);
|
$avx=1 if (!$shaext && $avx);
|
||||||
|
|
||||||
open OUT,"| \"$^X\" $xlate $flavour $output";
|
open OUT,"| \"$^X\" $xlate $flavour $output";
|
||||||
@ -109,7 +109,8 @@ $code=<<___;
|
|||||||
.align 16
|
.align 16
|
||||||
$func:
|
$func:
|
||||||
___
|
___
|
||||||
$code.=<<___ if ($avx);
|
if ($avx) {
|
||||||
|
$code.=<<___;
|
||||||
lea OPENSSL_ia32cap_P(%rip),%r11
|
lea OPENSSL_ia32cap_P(%rip),%r11
|
||||||
mov \$1,%eax
|
mov \$1,%eax
|
||||||
cmp \$0,`$win64?"%rcx":"%rdi"`
|
cmp \$0,`$win64?"%rcx":"%rdi"`
|
||||||
@ -133,7 +134,7 @@ $code.=<<___ if ($avx>1);
|
|||||||
cmp \$`1<<8|1<<5|1<<3`,%r11d
|
cmp \$`1<<8|1<<5|1<<3`,%r11d
|
||||||
je ${func}_avx2
|
je ${func}_avx2
|
||||||
___
|
___
|
||||||
$code.=<<___ if ($avx);
|
$code.=<<___;
|
||||||
and \$`1<<30`,%eax # mask "Intel CPU" bit
|
and \$`1<<30`,%eax # mask "Intel CPU" bit
|
||||||
and \$`1<<28|1<<9`,%r10d # mask AVX+SSSE3 bits
|
and \$`1<<28|1<<9`,%r10d # mask AVX+SSSE3 bits
|
||||||
or %eax,%r10d
|
or %eax,%r10d
|
||||||
@ -141,6 +142,7 @@ $code.=<<___ if ($avx);
|
|||||||
je ${func}_avx
|
je ${func}_avx
|
||||||
ud2
|
ud2
|
||||||
___
|
___
|
||||||
|
}
|
||||||
$code.=<<___;
|
$code.=<<___;
|
||||||
xor %eax,%eax
|
xor %eax,%eax
|
||||||
cmp \$0,`$win64?"%rcx":"%rdi"`
|
cmp \$0,`$win64?"%rcx":"%rdi"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user