summaryrefslogtreecommitdiffstats
path: root/crypto/aes/asm/aesv8-armx.pl
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2014-06-01 22:20:37 +0200
committerAndy Polyakov <appro@openssl.org>2014-06-01 22:20:37 +0200
commitddacb8f27ba4c8a8d51c306c150e1a8703b008f2 (patch)
tree915d4e2270657a6743c6302d14c9c4f37f28aebd /crypto/aes/asm/aesv8-armx.pl
parentRecognise padding extension. (diff)
downloadopenssl-ddacb8f27ba4c8a8d51c306c150e1a8703b008f2.tar.xz
openssl-ddacb8f27ba4c8a8d51c306c150e1a8703b008f2.zip
Engage ARMv8 AES support.
Diffstat (limited to 'crypto/aes/asm/aesv8-armx.pl')
-rwxr-xr-xcrypto/aes/asm/aesv8-armx.pl16
1 files changed, 13 insertions, 3 deletions
diff --git a/crypto/aes/asm/aesv8-armx.pl b/crypto/aes/asm/aesv8-armx.pl
index 763377f2cc..55a8ff77c5 100755
--- a/crypto/aes/asm/aesv8-armx.pl
+++ b/crypto/aes/asm/aesv8-armx.pl
@@ -23,9 +23,16 @@
# Cortex-A5x n/a n/a
$flavour = shift;
-$prefix="AES";
+open STDOUT,">".shift;
-$code=".text\n";
+$prefix="aes_v8";
+
+$code=<<___;
+#include "arm_arch.h"
+
+#if __ARM_ARCH__>=7
+.text
+___
$code.=".arch armv8-a+crypto\n" if ($flavour =~ /64/);
$code.=".fpu neon\n.code 32\n" if ($flavour !~ /64/);
@@ -669,7 +676,7 @@ $code.=<<___;
subs $len,$len,#2
b.lo .Lctr32_tail
-#ifndef BIG_ENDIAN
+#ifndef __ARMEB__
rev $ctr, $ctr
#endif
vorr $dat1,$dat0,$dat0
@@ -862,6 +869,9 @@ $code.=<<___;
.size ${prefix}_ctr32_encrypt_blocks,.-${prefix}_ctr32_encrypt_blocks
___
}}}
+$code.=<<___;
+#endif
+___
########################################
if ($flavour =~ /64/) { ######## 64-bit code
my %opcode = (