Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2015-04-21 04:27:38 +0300
committerAdam Langley <agl@google.com>2015-05-05 01:43:51 +0300
commit96ac819197874cdcf149d1227c50526c737967e6 (patch)
tree6d076f840da7b6c5cf9a10064d9e57c692ae9c32 /crypto/aes
parent4ae52cddad01807ee420f39029f734e81c3c5d8c (diff)
Remove inconsistency in ARM support.
This facilitates "universal" builds, ones that target multiple architectures, e.g. ARMv5 through ARMv7. (Imported from upstream's c1669e1c205dc8e695fb0c10a655f434e758b9f7) This is a change from a while ago which was a source of divergence between our perlasm and upstream's. This change in upstream came with the following comment in Configure: Note that -march is not among compiler options in below linux-armv4 target line. Not specifying one is intentional to give you choice to: a) rely on your compiler default by not specifying one; b) specify your target platform explicitly for optimal performance, e.g. -march=armv6 or -march=armv7-a; c) build "universal" binary that targets *range* of platforms by specifying minimum and maximum supported architecture; As for c) option. It actually makes no sense to specify maximum to be less than ARMv7, because it's the least requirement for run-time switch between platform-specific code paths. And without run-time switch performance would be equivalent to one for minimum. Secondly, there are some natural limitations that you'd have to accept and respect. Most notably you can *not* build "universal" binary for big-endian platform. This is because ARMv7 processor always picks instructions in little-endian order. Another similar limitation is that -mthumb can't "cross" -march=armv6t2 boundary, because that's where it became Thumb-2. Well, this limitation is a bit artificial, because it's not really impossible, but it's deemed too tricky to support. And of course you have to be sure that your binutils are actually up to the task of handling maximum target platform. Change-Id: Ie5f674d603393f0a1354a0d0973987484a4a650c Reviewed-on: https://boringssl-review.googlesource.com/4488 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/aes')
-rw-r--r--crypto/aes/asm/bsaes-armv7.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/crypto/aes/asm/bsaes-armv7.pl b/crypto/aes/asm/bsaes-armv7.pl
index d70f3ea3..82d29ef0 100644
--- a/crypto/aes/asm/bsaes-armv7.pl
+++ b/crypto/aes/asm/bsaes-armv7.pl
@@ -703,13 +703,17 @@ $code.=<<___;
# define BSAES_ASM_EXTENDED_KEY
# define XTS_CHAIN_TWEAK
# define __ARM_ARCH__ __LINUX_ARM_ARCH__
+# define __ARM_MAX_ARCH__ __LINUX_ARM_ARCH__
#endif
#ifdef __thumb__
# define adrl adr
#endif
-#if __ARM_ARCH__>=7
+#if __ARM_MAX_ARCH__>=7
+.arch armv7-a
+.fpu neon
+
.text
.syntax unified @ ARMv7-capable assembler is expected to handle this
#ifdef __thumb2__
@@ -718,8 +722,6 @@ $code.=<<___;
.code 32
#endif
-.fpu neon
-
.type _bsaes_decrypt8,%function
.align 4
_bsaes_decrypt8: