Browse Source

Don't use .arch in aarch64 asm with Clang.

Clang (3.6, at least) doesn't like .arch when its internal as is used.
Instead, one has to pass -march=armv8-a+crypto on the command line.

Change-Id: Ifc5b57fbebd0eb53658481b0a0c111e808c81d93
Reviewed-on: https://boringssl-review.googlesource.com/4411
Reviewed-by: Adam Langley <agl@google.com>
kris/onging/CECPQ3_patch15
Adam Langley 9 years ago
parent
commit
a91fd063cf
2 changed files with 10 additions and 2 deletions
  1. +5
    -1
      crypto/aes/asm/aesv8-armx.pl
  2. +5
    -1
      crypto/modes/asm/ghashv8-armx.pl

+ 5
- 1
crypto/aes/asm/aesv8-armx.pl View File

@@ -50,7 +50,11 @@ $code=<<___;
#if __ARM_MAX_ARCH__>=7
.text
___
$code.=".arch armv8-a+crypto\n" if ($flavour =~ /64/);
$code.=<<___ if ($flavour =~ /64/);
#if !defined(__clang__)
.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.


+ 5
- 1
crypto/modes/asm/ghashv8-armx.pl View File

@@ -58,7 +58,11 @@ $code=<<___;

.text
___
$code.=".arch armv8-a+crypto\n" if ($flavour =~ /64/);
$code.=<<___ if ($flavour =~ /64/);
#if !defined(__clang__)
.arch armv8-a+crypto
#endif
___
$code.=".fpu neon\n.code 32\n" if ($flavour !~ /64/);

################################################################################


Loading…
Cancel
Save