armv4cpuid.S, armv4-gf2m.pl: make newest code compilable by older assembler [from HEAD].

This commit is contained in:
Andy Polyakov 2011-11-05 13:57:02 +00:00
parent 6fcc2bbce8
commit 04c8062636
2 changed files with 23 additions and 23 deletions

View file

@ -44,7 +44,7 @@ OPENSSL_atomic_add:
bne .Lspin
ldr r2,[r4]
add r2,r5
add r2,r2,r5
str r2,[r4]
str r0,[r6] @ release spinlock
ldmia sp!,{r4-r6,lr}
@ -59,26 +59,26 @@ OPENSSL_atomic_add:
OPENSSL_cleanse:
eor ip,ip,ip
cmp r1,#7
subhs r1,#4
subhs r1,r1,#4
bhs .Lot
cmp r1,#0
beq .Lcleanse_done
.Little:
strb ip,[r0],#1
subs r1,#1
subs r1,r1,#1
bhi .Little
b .Lcleanse_done
.Lot: tst r0,#3
beq .Laligned
strb ip,[r0],#1
sub r1,#1
sub r1,r1,#1
b .Lot
.Laligned:
str ip,[r0],#4
subs r1,#4
subs r1,r1,#4
bhs .Laligned
adds r1,#4
adds r1,r1,#4
bne .Little
.Lcleanse_done:
tst lr,#1

View file

@ -218,38 +218,38 @@ $code.=<<___;
mov $b,r3 @ $b=b1
ldr r3,[sp,#32] @ load b0
mov $mask,#7<<2
sub sp,#32 @ allocate tab[8]
sub sp,sp,#32 @ allocate tab[8]
bl mul_1x1_ialu @ a1·b1
str $lo,[$ret,#8]
str $hi,[$ret,#12]
eor $b,r3 @ flip b0 and b1
eor $a,r2 @ flip a0 and a1
eor r3,$b
eor r2,$a
eor $b,r3
eor $a,r2
eor $b,$b,r3 @ flip b0 and b1
eor $a,$a,r2 @ flip a0 and a1
eor r3,r3,$b
eor r2,r2,$a
eor $b,$b,r3
eor $a,$a,r2
bl mul_1x1_ialu @ a0·b0
str $lo,[$ret]
str $hi,[$ret,#4]
eor $a,r2
eor $b,r3
eor $a,$a,r2
eor $b,$b,r3
bl mul_1x1_ialu @ (a1+a0)·(b1+b0)
___
@r=map("r$_",(6..9));
$code.=<<___;
ldmia $ret,{@r[0]-@r[3]}
eor $lo,$hi
eor $hi,@r[1]
eor $lo,@r[0]
eor $hi,@r[2]
eor $lo,@r[3]
eor $hi,@r[3]
eor $lo,$lo,$hi
eor $hi,$hi,@r[1]
eor $lo,$lo,@r[0]
eor $hi,$hi,@r[2]
eor $lo,$lo,@r[3]
eor $hi,$hi,@r[3]
str $hi,[$ret,#8]
eor $lo,$hi
add sp,#32 @ destroy tab[8]
eor $lo,$lo,$hi
add sp,sp,#32 @ destroy tab[8]
str $lo,[$ret,#4]
#if __ARM_ARCH__>=5