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/chacha | |
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 'crypto/chacha')
-rwxr-xr-x | crypto/chacha/asm/chacha-armv8.pl | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/crypto/chacha/asm/chacha-armv8.pl b/crypto/chacha/asm/chacha-armv8.pl index cee787d4d6..56ba1c36ba 100755 --- a/crypto/chacha/asm/chacha-armv8.pl +++ b/crypto/chacha/asm/chacha-armv8.pl @@ -131,12 +131,6 @@ $code.=<<___; .quad 0x3320646e61707865,0x6b20657479622d32 // endian-neutral .Lone: .long 1,0,0,0 -.LOPENSSL_armcap_P: -#ifdef __ILP32__ -.long OPENSSL_armcap_P-. -#else -.quad OPENSSL_armcap_P-. -#endif .asciz "ChaCha20 for ARMv8, CRYPTOGAMS by <appro\@openssl.org>" .globl ChaCha20_ctr32 @@ -144,17 +138,13 @@ $code.=<<___; .align 5 ChaCha20_ctr32: cbz $len,.Labort - adr @x[0],.LOPENSSL_armcap_P cmp $len,#192 b.lo .Lshort -#ifdef __ILP32__ - ldrsw @x[1],[@x[0]] -#else - ldr @x[1],[@x[0]] -#endif - ldr w17,[@x[1],@x[0]] + + adrp x17,OPENSSL_armcap_P + ldr w17,[x17,#:lo12:OPENSSL_armcap_P] tst w17,#ARMV7_NEON - b.ne ChaCha20_neon + b.ne .LChaCha20_neon .Lshort: .inst 0xd503233f // paciasp @@ -380,6 +370,7 @@ $code.=<<___; .type ChaCha20_neon,%function .align 5 ChaCha20_neon: +.LChaCha20_neon: .inst 0xd503233f // paciasp stp x29,x30,[sp,#-96]! add x29,sp,#0 |