ARMv4 assembler: fix compilation failure. Fix is actually unconfirmed, but
[openssl.git] / crypto / bn / asm / armv4-mont.pl
index 3561ea2d615007c9ef61b532c049bdea3d98bcd1..14e0d2d1dd5bcc07d00ae9912e212afced972315 100644 (file)
@@ -163,9 +163,6 @@ bn_mul_mont:
        mov     $ap,$tp                 @ "borrow" $ap
        sub     $np,$np,$aj             @ "rewind" $np to &np[0]
 
-       movs    $tj,$nj,lsr#30          @ boundary condition...
-       beq     .Lcopy                  @ ... is met
-
        subs    $tj,$tj,$tj             @ "clear" carry flag
 .Lsub: ldr     $tj,[$tp],#4
        ldr     $nj,[$np],#4
@@ -196,7 +193,9 @@ bn_mul_mont:
        bx      lr                      @ interoperable with Thumb ISA:-)
 .size  bn_mul_mont,.-bn_mul_mont
 .asciz "Montgomery multiplication for ARMv4, CRYPTOGAMS by <appro\@openssl.org>"
+.align 2
 ___
 
+$code =~ s/\bbx\s+lr\b/.word\t0xe12fff1e/gm;   # make it possible to compile with -march=armv4
 print $code;
 close STDOUT;