diff options
author | Andy Polyakov <appro@openssl.org> | 2019-02-15 22:16:41 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-02-16 17:01:15 +0100 |
commit | db42bb440e76399b89fc8ae04644441a2a5f6821 (patch) | |
tree | 0ddc0a16632b60834e44805d2e329b774381f323 /crypto/sha/asm/sha512-armv8.pl | |
parent | ARM assembly pack: make it Windows-friendly. (diff) | |
download | openssl-db42bb440e76399b89fc8ae04644441a2a5f6821.tar.xz openssl-db42bb440e76399b89fc8ae04644441a2a5f6821.zip |
ARM64 assembly pack: make it Windows-friendly.
"Windows friendliness" means a) unified PIC-ification, unified across
all platforms; b) unified commantary delimiter; c) explicit ldur/stur,
as Visual Studio assembler can't automatically encode ldr/str as
ldur/stur when needed.
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8256)
Diffstat (limited to '')
-rw-r--r-- | crypto/sha/asm/sha512-armv8.pl | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/crypto/sha/asm/sha512-armv8.pl b/crypto/sha/asm/sha512-armv8.pl index 6540a9f3a6..f7c67219ed 100644 --- a/crypto/sha/asm/sha512-armv8.pl +++ b/crypto/sha/asm/sha512-armv8.pl @@ -188,24 +188,18 @@ ___ $code.=<<___; #ifndef __KERNEL__ # include "arm_arch.h" +.extern OPENSSL_armcap_P #endif .text -.extern OPENSSL_armcap_P .globl $func .type $func,%function .align 6 $func: #ifndef __KERNEL__ -# ifdef __ILP32__ - ldrsw x16,.LOPENSSL_armcap_P -# else - ldr x16,.LOPENSSL_armcap_P -# endif - adr x17,.LOPENSSL_armcap_P - add x16,x16,x17 - ldr w16,[x16] + adrp x16,OPENSSL_armcap_P + ldr w16,[x16,#:lo12:OPENSSL_armcap_P] ___ $code.=<<___ if ($SZ==4); tst w16,#ARMV8_SHA256 @@ -353,15 +347,6 @@ $code.=<<___ if ($SZ==4); ___ $code.=<<___; .size .LK$BITS,.-.LK$BITS -#ifndef __KERNEL__ -.align 3 -.LOPENSSL_armcap_P: -# ifdef __ILP32__ - .long OPENSSL_armcap_P-. -# else - .quad OPENSSL_armcap_P-. -# endif -#endif .asciz "SHA$BITS block transform for ARMv8, CRYPTOGAMS by <appro\@openssl.org>" .align 2 ___ @@ -841,7 +826,7 @@ ___ } $code.=<<___; -#ifndef __KERNEL__ +#if !defined(__KERNEL__) && !defined(_WIN64) .comm OPENSSL_armcap_P,4,4 #endif ___ |