Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 May 2016 19:10:35 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r299964 - in stable/10/crypto/openssl/crypto: aes/asm sha/asm
Message-ID:  <201605161910.u4GJAZtX000704@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Mon May 16 19:10:35 2016
New Revision: 299964
URL: https://svnweb.freebsd.org/changeset/base/299964

Log:
  Detect Clang to support AVX instructions on x86 platforms.
  Note head (OpenSSL 1.0.2 branch) has similar changes.

Modified:
  stable/10/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl
  stable/10/crypto/openssl/crypto/sha/asm/sha1-586.pl
  stable/10/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl

Modified: stable/10/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl
==============================================================================
--- stable/10/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl	Mon May 16 19:07:58 2016	(r299963)
+++ stable/10/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl	Mon May 16 19:10:35 2016	(r299964)
@@ -68,6 +68,7 @@ $avx=1 if (!$avx && $win64 && ($flavour 
 $avx=1 if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
 	   `ml64 2>&1` =~ /Version ([0-9]+)\./ &&
 	   $1>=10);
+$avx=1 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([3-9]\.[0-9]+)/ && $2>=3.0);
 
 open OUT,"| \"$^X\" $xlate $flavour $output";
 *STDOUT=*OUT;

Modified: stable/10/crypto/openssl/crypto/sha/asm/sha1-586.pl
==============================================================================
--- stable/10/crypto/openssl/crypto/sha/asm/sha1-586.pl	Mon May 16 19:07:58 2016	(r299963)
+++ stable/10/crypto/openssl/crypto/sha/asm/sha1-586.pl	Mon May 16 19:10:35 2016	(r299964)
@@ -116,6 +116,9 @@ $ymm=1 if ($xmm && !$ymm && $ARGV[0] eq 
 		`nasm -v 2>&1` =~ /NASM version ([2-9]\.[0-9]+)/ &&
 		$1>=2.03);	# first version supporting AVX
 
+$ymm=1 if ($xmm && !$ymm && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([3-9]\.[0-9]+)/ &&
+		$2>=3.0);	# first version supporting AVX
+
 &external_label("OPENSSL_ia32cap_P") if ($xmm);
 
 

Modified: stable/10/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl
==============================================================================
--- stable/10/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl	Mon May 16 19:07:58 2016	(r299963)
+++ stable/10/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl	Mon May 16 19:10:35 2016	(r299964)
@@ -81,6 +81,8 @@ $avx=1 if (!$avx && $win64 && ($flavour 
 $avx=1 if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
 	   `ml64 2>&1` =~ /Version ([0-9]+)\./ &&
 	   $1>=10);
+$avx=1 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([3-9]\.[0-9]+)/ &&
+	   $2>=3.0);
 
 open OUT,"| \"$^X\" $xlate $flavour $output";
 *STDOUT=*OUT;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605161910.u4GJAZtX000704>