summaryrefslogtreecommitdiffstats
path: root/crypto/aes
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2014-06-24 08:24:25 +0200
committerAndy Polyakov <appro@openssl.org>2014-06-24 08:24:25 +0200
commitac171925ab527a55fbb27872ff69af94f7ec995b (patch)
treec845715c38335465dd8fa801e362a69c0e391788 /crypto/aes
parent015364baf3328b93dbed2613e59170715a2a11a6 (diff)
x86_64 assembly pack: allow clang to compile AVX code.
Diffstat (limited to 'crypto/aes')
-rw-r--r--crypto/aes/asm/aesni-mb-x86_64.pl4
-rw-r--r--crypto/aes/asm/aesni-sha1-x86_64.pl1
-rw-r--r--crypto/aes/asm/aesni-sha256-x86_64.pl4
3 files changed, 9 insertions, 0 deletions
diff --git a/crypto/aes/asm/aesni-mb-x86_64.pl b/crypto/aes/asm/aesni-mb-x86_64.pl
index ddfe084cc7..d6ee866087 100644
--- a/crypto/aes/asm/aesni-mb-x86_64.pl
+++ b/crypto/aes/asm/aesni-mb-x86_64.pl
@@ -63,6 +63,10 @@ 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);
+}
+
open OUT,"| \"$^X\" $xlate $flavour $output";
*STDOUT=*OUT;
diff --git a/crypto/aes/asm/aesni-sha1-x86_64.pl b/crypto/aes/asm/aesni-sha1-x86_64.pl
index 7f253750f3..92f34618d4 100644
--- a/crypto/aes/asm/aesni-sha1-x86_64.pl
+++ b/crypto/aes/asm/aesni-sha1-x86_64.pl
@@ -94,6 +94,7 @@ $avx=1 if (!$avx && $win64 && ($flavour =~ /nasm/ || $ENV{ASM} =~ /nasm/) &&
$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` =~ /LLVM ([3-9]\.[0-9]+)/ && $1>=3.0);
$shaext=1; ### set to zero if compiling for 1.0.1
diff --git a/crypto/aes/asm/aesni-sha256-x86_64.pl b/crypto/aes/asm/aesni-sha256-x86_64.pl
index 6225561a8f..96b44f340e 100644
--- a/crypto/aes/asm/aesni-sha256-x86_64.pl
+++ b/crypto/aes/asm/aesni-sha256-x86_64.pl
@@ -59,6 +59,10 @@ 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);
+}
+
$shaext=$avx; ### set to zero if compiling for 1.0.1
$avx=1 if (!$shaext && $avx);