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 a8c08c276c1b9b3722da13ef4b6246ab7d3a2b64..5ef9dc2551af1b7202c690cfb6baf7fe8ea551fd 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 d009f3f1bc977b1538385751432031974275af80..7d69f0f4958dad08329eb4bc603986fcd24acf10 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
 ___