From d18b6331a1802438e5d37fb2a397ae766dbdeb53 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Sat, 18 Apr 2015 14:27:55 -0700 Subject: Use a different arch feature indicator for clang Clang doesn't currently understand the ".arch armv8-a+crypto" syntax and instead requires the specification of ".arch_extension" to enable the crypto functionality. Change-Id: Ib7bab562055e7c7925a47030044479ec172d0a34 --- src/crypto/aes/asm/aesv8-armx.pl | 10 +++++++++- src/crypto/modes/asm/ghashv8-armx.pl | 9 ++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/crypto/aes/asm/aesv8-armx.pl b/src/crypto/aes/asm/aesv8-armx.pl index 1e93f86..2f0aaae 100644 --- a/src/crypto/aes/asm/aesv8-armx.pl +++ b/src/crypto/aes/asm/aesv8-armx.pl @@ -38,7 +38,15 @@ $code=<<___; #if __ARM_MAX_ARCH__>=7 .text ___ -$code.=".arch armv8-a+crypto\n" if ($flavour =~ /64/); + +$code.=<<___ if ($flavour =~ /64/); +#ifdef __clang__ +.arch armv8-a +.arch_extension crypto +#else +.arch armv8-a+crypto +#endif +___ $code.=".arch armv7-a\n.fpu neon\n.code 32\n" if ($flavour !~ /64/); #^^^^^^ this is done to simplify adoption by not depending # on latest binutils. diff --git a/src/crypto/modes/asm/ghashv8-armx.pl b/src/crypto/modes/asm/ghashv8-armx.pl index 54a1ac4..40dca96 100644 --- a/src/crypto/modes/asm/ghashv8-armx.pl +++ b/src/crypto/modes/asm/ghashv8-armx.pl @@ -44,7 +44,14 @@ $code=<<___; .text ___ -$code.=".arch armv8-a+crypto\n" if ($flavour =~ /64/); +$code.=<<___ if ($flavour =~ /64/); +#ifdef __clang__ +.arch armv8-a +.arch_extension crypto +#else +.arch armv8-a+crypto +#endif +___ $code.=".fpu neon\n.code 32\n" if ($flavour !~ /64/); $code.=<<___; -- cgit v1.1