ARM assembly pack: make it work with older assembler.
authorAndy Polyakov <appro@openssl.org>
Sun, 22 Apr 2018 14:09:56 +0000 (16:09 +0200)
committerAndy Polyakov <appro@openssl.org>
Mon, 23 Apr 2018 15:29:59 +0000 (17:29 +0200)
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/6043)

crypto/armv4cpuid.pl
crypto/ec/asm/ecp_nistz256-armv4.pl
crypto/modes/asm/ghashv8-armx.pl

index f7d31a698ae7f06197dd0dba462d39523e3604ef..9e461495661389370b514120a82d62c7bbb20205 100644 (file)
@@ -125,7 +125,7 @@ CRYPTO_memcmp:
 
        ldmia   sp!,{r4,r5}
 .Lno_data:
-       neg     r0,ip
+       rsb     r0,ip,#0
        mov     r0,r0,lsr#31
 #if __ARM_ARCH__>=5
        bx      lr
index c414334d1e787008de3e21d76458459a8f072761..7bb268d28d667c026c74f08dfa96956ed886c929 100755 (executable)
@@ -1633,7 +1633,7 @@ ___
 $code.=<<___;
 .Ladd_done:
        add     sp,sp,#32*18+16+16      @ +16 means "skip even over saved r0-r3"
-#if __ARM_ARCH__>=5 || defined(__thumb__)
+#if __ARM_ARCH__>=5 || !defined(__thumb__)
        ldmia   sp!,{r4-r12,pc}
 #else
        ldmia   sp!,{r4-r12,lr}
index 7e57238706b10ee16c5abed4beb1f326de7c291c..ac9d5a21a35567d603c7d38392e7369d2d5afe10 100644 (file)
@@ -70,6 +70,7 @@ my ($t0,$t1,$t2,$xC2,$H,$Hhl,$H2)=map("q$_",(8..14));
 $code=<<___;
 #include "arm_arch.h"
 
+#if __ARM_MAX_ARCH__>=7
 .text
 ___
 $code.=".arch  armv8-a+crypto\n"       if ($flavour =~ /64/);
@@ -699,6 +700,7 @@ ___
 $code.=<<___;
 .asciz  "GHASH for ARMv8, CRYPTOGAMS by <appro\@openssl.org>"
 .align  2
+#endif
 ___
 
 if ($flavour =~ /64/) {                        ######## 64-bit code