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-27 22:55:07 +0200
commit912f08dd5ed4f68fb275f3b2db828349fcffba14 (patch)
treede456b2669094d7018a5e28fa4112bef0b7f61d9 /crypto/aes
parent1067663d852435b1adff32ec01e9b8e54d2b5896 (diff)
x86_64 assembly pack: allow clang to compile AVX code.
(cherry picked from commit ac171925ab527a55fbb27872ff69af94f7ec995b)
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);