sha512-x86_64.pl: fix typo.
[openssl.git] / crypto / sha / asm / sha512-x86_64.pl
index 43a6a83fe3a3f3b8a16b4576afcf827bd0e86cdb..eef5f3f30cde2e27ec0e07f6d81e25bbe3b37edd 100755 (executable)
@@ -123,8 +123,8 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
        $avx = ($1>=10) + ($1>=11);
 }
 
-if (!$avx && `$ENV{CC} -v 2>&1` =~ /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);
 }
 
 $shaext=1;     ### set to zero if compiling for 1.0.1
@@ -2262,7 +2262,9 @@ $code.=<<___;
        pop     %rsi
        ret
 .size  se_handler,.-se_handler
+___
 
+$code.=<<___ if ($SZ==4 && $shaext);
 .type  shaext_handler,\@abi-omnipotent
 .align 16
 shaext_handler:
@@ -2295,14 +2297,16 @@ shaext_handler:
 
        jmp     .Lin_prologue
 .size  shaext_handler,.-shaext_handler
+___
 
+$code.=<<___;
 .section       .pdata
 .align 4
        .rva    .LSEH_begin_$func
        .rva    .LSEH_end_$func
        .rva    .LSEH_info_$func
 ___
-$code.=<<___ if ($SZ==4 && $shext);
+$code.=<<___ if ($SZ==4 && $shaext);
        .rva    .LSEH_begin_${func}_shaext
        .rva    .LSEH_end_${func}_shaext
        .rva    .LSEH_info_${func}_shaext