Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm Regen for...
details: https://anonhg.NetBSD.org/src/rev/d52a202e226c
branches: trunk
changeset: 320843:d52a202e226c
user: christos <christos%NetBSD.org@localhost>
date: Sat Mar 03 00:20:57 2018 +0000
description:
Regen for OpenSSL-1.1
XXX: we could add the new assembly files to speed-up things but now we
are only using the assembly stubs that 1.0 used.
diffstat:
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/Makefile | 17 +
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes-armv4.S | 130 +-
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aesv8-armx.S | 740 +-
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/arm64cpuid.S | 101 +
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/armv4-gf2m.S | 128 +-
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/armv4-mont.S | 857 +-
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/armv4cpuid.S | 131 +-
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/armv8-mont.S | 1404 +++
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/bsaes-armv7.S | 2244 ++--
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/chacha-armv4.S | 1468 +++
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/chacha-armv8.S | 1968 ++++
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc | 14 +-
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/ecp_nistz256-armv4.S | 4440 ++++++++++
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/ecp_nistz256-armv8.S | 3824 ++++++++
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/ghash-armv4.S | 375 +-
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/ghashv8-armx.S | 289 +-
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/modes.inc | 5 +-
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/poly1305-armv4.S | 1167 ++
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/poly1305-armv8.S | 864 +
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/rc4.inc | 1 -
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/sha1-armv4-large.S | 293 +-
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/sha1-armv8.S | 1221 ++
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/sha256-armv4.S | 423 +-
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/sha512-armv4.S | 1465 +-
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/sha512-armv8.S | 1151 ++
crypto/external/bsd/openssl/lib/libcrypto/arch/arm/vpaes-armv8.S | 1178 ++
26 files changed, 22804 insertions(+), 3094 deletions(-)
diffs (truncated from 29271 to 300 lines):
diff -r cda1a3840903 -r d52a202e226c crypto/external/bsd/openssl/lib/libcrypto/arch/arm/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/Makefile Sat Mar 03 00:20:57 2018 +0000
@@ -0,0 +1,17 @@
+# $NetBSD: Makefile,v 1.1 2018/03/03 00:20:57 christos Exp $
+
+.include "bsd.own.mk"
+
+CRYPTODIST=${NETBSDSRCDIR}/crypto
+.include "${NETBSDSRCDIR}/crypto/Makefile.openssl"
+
+regen:
+ for i in $$(find ${OPENSSLSRC} -name \*arm\*.pl | grep -v charmap.pl); \
+ do \
+ case $$i in \
+ (*/charmap.pl|*/arm-xlate.pl);; \
+ (*) perl -I${OPENSSLSRC}/crypto/perlasm \
+ -I${OPENSSLSRC}/crypto/bn/asm $$i linux /dev/stdout \
+ > $$(basename $$i .pl).S;; \
+ esac; \
+ done
diff -r cda1a3840903 -r d52a202e226c crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes-armv4.S
--- a/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes-armv4.S Fri Mar 02 23:15:25 2018 +0000
+++ b/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes-armv4.S Sat Mar 03 00:20:57 2018 +0000
@@ -1,3 +1,10 @@
+@ Copyright 2007-2016 The OpenSSL Project Authors. All Rights Reserved.
+@
+@ Licensed under the OpenSSL license (the "License"). You may not use
+@ this file except in compliance with the License. You can obtain a copy
+@ in the file LICENSE in the source distribution or at
+@ https://www.openssl.org/source/license.html
+
@ ====================================================================
@ Written by Andy Polyakov <appro%openssl.org@localhost> for the OpenSSL
@@ -33,21 +40,17 @@
#ifndef __KERNEL__
# include "arm_arch.h"
-# include "arm_asm.h"
#else
# define __ARM_ARCH__ __LINUX_ARM_ARCH__
#endif
.text
-#if __ARM_ARCH__<7
-.code 32
-#else
+#if defined(__thumb2__) && !defined(__APPLE__)
.syntax unified
-# ifdef __thumb2__
.thumb
-# else
+#else
.code 32
-# endif
+#undef __thumb2__
#endif
.type AES_Te,%object
@@ -158,25 +161,23 @@
@ void AES_encrypt(const unsigned char *in, unsigned char *out,
@ const AES_KEY *key) {
-.global AES_encrypt
-.type AES_encrypt,%function
+.globl AES_encrypt
+.type AES_encrypt,%function
.align 5
AES_encrypt:
-#if __ARM_ARCH__<7
+#ifndef __thumb2__
sub r3,pc,#8 @ AES_encrypt
#else
adr r3,AES_encrypt
#endif
- stmdb sp!,{r1,r4-r12,lr}
- mov r12,r0 @ inp
- mov r11,r2
-#ifdef __clang__
- @ workaround for clang integrated assembler bug
- ldr r0,=(AES_encrypt-AES_Te)
- sub r10,r3,r0
+ stmdb sp!,{r1,r4-r12,lr}
+#ifdef __APPLE__
+ adr r10,AES_Te
#else
sub r10,r3,#AES_encrypt-AES_Te @ Te
#endif
+ mov r12,r0 @ inp
+ mov r11,r2
#if __ARM_ARCH__<7
ldrb r0,[r12,#3] @ load input data in endian-neutral
ldrb r4,[r12,#2] @ manner...
@@ -263,20 +264,20 @@
strb r3,[r12,#15]
#endif
#if __ARM_ARCH__>=5
- ldmia sp!,{r4-r12,pc}
+ ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,pc}
#else
- ldmia sp!,{r4-r12,lr}
+ ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
tst lr,#1
moveq pc,lr @ be binary compatible with V4, yet
- .word 0xe12fff1e @ interoperable with Thumb ISA:-)
+.word 0xe12fff1e @ interoperable with Thumb ISA:-)
#endif
.size AES_encrypt,.-AES_encrypt
-.type _armv4_AES_encrypt,%function
+.type _armv4_AES_encrypt,%function
.align 2
_armv4_AES_encrypt:
str lr,[sp,#-4]! @ push lr
- ldmia r11!,{r4-r7}
+ ldmia r11!,{r4,r5,r6,r7}
eor r0,r0,r4
ldr r12,[r11,#240-16]
eor r1,r1,r5
@@ -409,24 +410,24 @@
ldr pc,[sp],#4 @ pop and return
.size _armv4_AES_encrypt,.-_armv4_AES_encrypt
-.global private_AES_set_encrypt_key
-.type private_AES_set_encrypt_key,%function
+.globl AES_set_encrypt_key
+.type AES_set_encrypt_key,%function
.align 5
-private_AES_set_encrypt_key:
+AES_set_encrypt_key:
_armv4_AES_set_encrypt_key:
-#if __ARM_ARCH__<7
+#ifndef __thumb2__
sub r3,pc,#8 @ AES_set_encrypt_key
#else
- adr r3,private_AES_set_encrypt_key
+ adr r3,AES_set_encrypt_key
#endif
teq r0,#0
-#if __ARM_ARCH__>=7
+#ifdef __thumb2__
itt eq @ Thumb2 thing, sanity check in ARM
#endif
moveq r0,#-1
beq .Labrt
teq r2,#0
-#if __ARM_ARCH__>=7
+#ifdef __thumb2__
itt eq @ Thumb2 thing, sanity check in ARM
#endif
moveq r0,#-1
@@ -437,19 +438,23 @@
teq r1,#192
beq .Lok
teq r1,#256
-#if __ARM_ARCH__>=7
+#ifdef __thumb2__
itt ne @ Thumb2 thing, sanity check in ARM
#endif
movne r0,#-1
bne .Labrt
-.Lok: stmdb sp!,{r4-r12,lr}
- sub r10,r3,#_armv4_AES_set_encrypt_key-AES_Te-1024 @ Te4
-
+.Lok: stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
mov r12,r0 @ inp
mov lr,r1 @ bits
mov r11,r2 @ key
+#ifdef __APPLE__
+ adr r10,AES_Te+1024 @ Te4
+#else
+ sub r10,r3,#_armv4_AES_set_encrypt_key-AES_Te-1024 @ Te4
+#endif
+
#if __ARM_ARCH__<7
ldrb r0,[r12,#3] @ load input data in endian-neutral
ldrb r4,[r12,#2] @ manner...
@@ -594,7 +599,7 @@
str r2,[r11,#-16]
subs r12,r12,#1
str r3,[r11,#-12]
-#if __ARM_ARCH__>=7
+#ifdef __thumb2__
itt eq @ Thumb2 thing, sanity check in ARM
#endif
subeq r2,r11,#216
@@ -666,7 +671,7 @@
str r2,[r11,#-24]
subs r12,r12,#1
str r3,[r11,#-20]
-#if __ARM_ARCH__>=7
+#ifdef __thumb2__
itt eq @ Thumb2 thing, sanity check in ARM
#endif
subeq r2,r11,#256
@@ -700,21 +705,21 @@
.align 2
.Ldone: mov r0,#0
- ldmia sp!,{r4-r12,lr}
+ ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
.Labrt:
#if __ARM_ARCH__>=5
- RET @ .word 0xe12fff1e
+ bx lr @ .word 0xe12fff1e
#else
tst lr,#1
moveq pc,lr @ be binary compatible with V4, yet
- .word 0xe12fff1e @ interoperable with Thumb ISA:-)
+.word 0xe12fff1e @ interoperable with Thumb ISA:-)
#endif
-.size private_AES_set_encrypt_key,.-private_AES_set_encrypt_key
+.size AES_set_encrypt_key,.-AES_set_encrypt_key
-.global private_AES_set_decrypt_key
-.type private_AES_set_decrypt_key,%function
+.globl AES_set_decrypt_key
+.type AES_set_decrypt_key,%function
.align 5
-private_AES_set_decrypt_key:
+AES_set_decrypt_key:
str lr,[sp,#-4]! @ push lr
bl _armv4_AES_set_encrypt_key
teq r0,#0
@@ -724,20 +729,20 @@
mov r0,r2 @ AES_set_encrypt_key preserves r2,
mov r1,r2 @ which is AES_KEY *key
b _armv4_AES_set_enc2dec_key
-.size private_AES_set_decrypt_key,.-private_AES_set_decrypt_key
+.size AES_set_decrypt_key,.-AES_set_decrypt_key
@ void AES_set_enc2dec_key(const AES_KEY *inp,AES_KEY *out)
-.global AES_set_enc2dec_key
+.globl AES_set_enc2dec_key
.type AES_set_enc2dec_key,%function
.align 5
AES_set_enc2dec_key:
_armv4_AES_set_enc2dec_key:
- stmdb sp!,{r4-r12,lr}
+ stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
ldr r12,[r0,#240]
mov r7,r0 @ input
add r8,r0,r12,lsl#4
- mov r11,r1 @ ouput
+ mov r11,r1 @ output
add r10,r1,r12,lsl#4
str r12,[r1,#240]
@@ -814,12 +819,12 @@
mov r0,#0
#if __ARM_ARCH__>=5
- ldmia sp!,{r4-r12,pc}
+ ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,pc}
#else
- ldmia sp!,{r4-r12,lr}
+ ldmia sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
tst lr,#1
moveq pc,lr @ be binary compatible with V4, yet
- .word 0xe12fff1e @ interoperable with Thumb ISA:-)
+.word 0xe12fff1e @ interoperable with Thumb ISA:-)
#endif
.size AES_set_enc2dec_key,.-AES_set_enc2dec_key
@@ -927,19 +932,23 @@
@ void AES_decrypt(const unsigned char *in, unsigned char *out,
@ const AES_KEY *key) {
-.global AES_decrypt
-.type AES_decrypt,%function
+.globl AES_decrypt
+.type AES_decrypt,%function
.align 5
AES_decrypt:
-#if __ARM_ARCH__<7
+#ifndef __thumb2__
sub r3,pc,#8 @ AES_decrypt
#else
adr r3,AES_decrypt
#endif
- stmdb sp!,{r1,r4-r12,lr}
+ stmdb sp!,{r1,r4-r12,lr}
+#ifdef __APPLE__
+ adr r10,AES_Td
+#else
+ sub r10,r3,#AES_decrypt-AES_Td @ Td
+#endif
mov r12,r0 @ inp
mov r11,r2
- sub r10,r3,#AES_decrypt-AES_Td @ Td
#if __ARM_ARCH__<7
ldrb r0,[r12,#3] @ load input data in endian-neutral
ldrb r4,[r12,#2] @ manner...
@@ -1026,20 +1035,20 @@
strb r3,[r12,#15]
#endif
Home |
Main Index |
Thread Index |
Old Index