sha1-mb-x86_64.pl: fix typo.
[openssl.git] / crypto / sha / asm / sha1-mb-x86_64.pl
index 88707a7e5d64d6c6b460fbb18da73350cfa29a93..e9bc8e5c47213520b8bf23089625c61e13a1b787 100644 (file)
@@ -58,8 +58,8 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
        $avx = ($1>=10) + ($1>=11);
 }
 
-if (!$avx && `$ENV{CC} -v` =~ /LLVM ([3-9]\.[0-9]+)/) {
-       $avx = ($1>=3.0) + ($1>=3.1);
+if (!$avx && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([3-9]\.[0-9]+)/) {
+       $avx = ($2>=3.0) + ($2>3.0);
 }
 
 open OUT,"| \"$^X\" $xlate $flavour $output";
@@ -153,7 +153,7 @@ $code.=<<___ if ($i<14);                    # just load input
        psrld   \$2,$b
        paddd   $t2,$e                          # e+=rol(a,5)
         pshufb $tx,@Xi[1]
-        movd           `4*$j-16*4`(@ptr[2]),$t2
+        movd           `4*$k-16*4`(@ptr[2]),$t2
        por     $t1,$b                          # b=rol(b,30)
 ___
 $code.=<<___ if ($i==14);                      # just load input