if ($stitched_decrypt) {{{
# reset
($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;
# reassign for Atom Silvermont (see above)
.size aesni256_cbc_sha1_dec_ssse3,.-aesni256_cbc_sha1_dec_ssse3
___
}}}
-$j=$jj=$r=$sn=$rx=0;
+$j=$jj=$r=$rx=0;
if ($avx) {
my ($in0,$out,$len,$key,$ivp,$ctx,$inp)=("%rdi","%rsi","%rdx","%rcx","%r8","%r9","%r10");
# reset
($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;
@aes256_dec = (
$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);
open OUT,"| \"$^X\" $xlate $flavour $output";
.align 16
$func:
___
-$code.=<<___ if ($avx);
+ if ($avx) {
+$code.=<<___;
lea OPENSSL_ia32cap_P(%rip),%r11
mov \$1,%eax
cmp \$0,`$win64?"%rcx":"%rdi"`
cmp \$`1<<8|1<<5|1<<3`,%r11d
je ${func}_avx2
___
-$code.=<<___ if ($avx);
+$code.=<<___;
and \$`1<<30`,%eax # mask "Intel CPU" bit
and \$`1<<28|1<<9`,%r10d # mask AVX+SSSE3 bits
or %eax,%r10d
je ${func}_avx
ud2
___
+ }
$code.=<<___;
xor %eax,%eax
cmp \$0,`$win64?"%rcx":"%rdi"`