Allow ILP32 compilation in AArch64 assembly pack.
authorAndy Polyakov <appro@openssl.org>
Mon, 21 Sep 2015 14:44:37 +0000 (16:44 +0200)
committerAndy Polyakov <appro@openssl.org>
Fri, 25 Sep 2015 11:38:48 +0000 (13:38 +0200)
Reviewed-by: Tim Hudson <tjh@openssl.org>
crypto/sha/asm/sha1-armv8.pl
crypto/sha/asm/sha512-armv8.pl

index a8c08c2..5ef9dc2 100644 (file)
@@ -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 <appro\@openssl.org>"
 .align 2
 .comm  OPENSSL_armcap_P,4,4
index d009f3f..7d69f0f 100644 (file)
@@ -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 <appro\@openssl.org>"
 .align 2
 ___