From 5e5ece561d1f7e557c8e0ea202a8c1f3008361ce Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Mon, 21 Sep 2015 16:44:37 +0200 Subject: [PATCH] Allow ILP32 compilation in AArch64 assembly pack. Reviewed-by: Tim Hudson --- crypto/sha/asm/sha1-armv8.pl | 8 ++++++++ crypto/sha/asm/sha512-armv8.pl | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/crypto/sha/asm/sha1-armv8.pl b/crypto/sha/asm/sha1-armv8.pl index a8c08c276c..5ef9dc2551 100644 --- a/crypto/sha/asm/sha1-armv8.pl +++ b/crypto/sha/asm/sha1-armv8.pl @@ -171,7 +171,11 @@ $code.=<<___; .type sha1_block_data_order,%function .align 6 sha1_block_data_order: +#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] @@ -309,7 +313,11 @@ $code.=<<___; .long 0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc //K_40_59 .long 0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6 //K_60_79 .LOPENSSL_armcap_P: +#ifdef __ILP32__ +.long OPENSSL_armcap_P-. +#else .quad OPENSSL_armcap_P-. +#endif .asciz "SHA1 block transform for ARMv8, CRYPTOGAMS by " .align 2 .comm OPENSSL_armcap_P,4,4 diff --git a/crypto/sha/asm/sha512-armv8.pl b/crypto/sha/asm/sha512-armv8.pl index d009f3f1bc..7d69f0f495 100644 --- a/crypto/sha/asm/sha512-armv8.pl +++ b/crypto/sha/asm/sha512-armv8.pl @@ -169,7 +169,11 @@ $code.=<<___; $func: ___ $code.=<<___ if ($SZ==4); +#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] @@ -311,7 +315,11 @@ $code.=<<___; .size .LK$BITS,.-.LK$BITS .align 3 .LOPENSSL_armcap_P: +#ifdef __ILP32__ + .long OPENSSL_armcap_P-. +#else .quad OPENSSL_armcap_P-. +#endif .asciz "SHA$BITS block transform for ARMv8, CRYPTOGAMS by " .align 2 ___ -- 2.25.1