ARM assembly pack: make it work with older toolchain.
authorAndy Polyakov <appro@openssl.org>
Sat, 28 Dec 2013 11:17:08 +0000 (12:17 +0100)
committerAndy Polyakov <appro@openssl.org>
Sat, 28 Dec 2013 11:18:11 +0000 (12:18 +0100)
(cherry picked from commit 2218c296b4981af6f2639bbd7eabfb89437fe776)

crypto/bn/Makefile
crypto/sha/asm/sha256-armv4.pl

index d3e408cbce963c9645894dcff7981f22f2882642..af23cef92ae361fd8c026decf4cec1ffda9aee5c 100644 (file)
@@ -140,9 +140,10 @@ alpha-mont.s:      asm/alpha-mont.pl
        $(CC) -E $$preproc > $@ && rm $$preproc)
 
 # GNU make "catch all"
-%-mont.s:      asm/%-mont.pl;  $(PERL) $< $(PERLASM_SCHEME) $@
+%-mont.S:      asm/%-mont.pl;  $(PERL) $< $(PERLASM_SCHEME) $@
 %-gf2m.S:      asm/%-gf2m.pl;  $(PERL) $< $(PERLASM_SCHEME) $@
 
+armv4-mont.o:  armv4-mont.S
 armv4-gf2m.o:  armv4-gf2m.S
 
 files:
index 2a0a98947e09455208867e3aa4bcd2e0935d66b4..672e571ed5e2e00f593b680c72d93bda0d83e80e 100644 (file)
@@ -104,10 +104,10 @@ $code.=<<___;
        eor     $t2,$a,$b                       @ a^b, b^c in next round
        ldr     $t4,[sp,#`($i+15)%16`*4]        @ from future BODY_16_xx
 #endif
-       eor     $t0,$a,ror#$Sigma0[1]
+       eor     $t0,$t0,$a,ror#$Sigma0[1]
        and     $t3,$t3,$t2                     @ (b^c)&=(a^b)
        add     $d,$d,$h                        @ d+=h
-       eor     $t0,$a,ror#$Sigma0[2]           @ Sigma0(a)
+       eor     $t0,$t0,$a,ror#$Sigma0[2]       @ Sigma0(a)
        eor     $t3,$t3,$b                      @ Maj(a,b,c)
        add     $h,$h,$t0                       @ h+=Sigma0(a)
        @ add   $h,$h,$t3                       @ h+=Maj(a,b,c)