aes-armv4.pl: make it more foolproof [inspired by aes-s390x.pl in 1.0.1].
This commit is contained in:
parent
bc9583efa2
commit
45cd45bbbc
@ -408,6 +408,7 @@ _armv4_AES_encrypt:
|
|||||||
.type AES_set_encrypt_key,%function
|
.type AES_set_encrypt_key,%function
|
||||||
.align 5
|
.align 5
|
||||||
AES_set_encrypt_key:
|
AES_set_encrypt_key:
|
||||||
|
_armv4_AES_set_encrypt_key:
|
||||||
sub r3,pc,#8 @ AES_set_encrypt_key
|
sub r3,pc,#8 @ AES_set_encrypt_key
|
||||||
teq r0,#0
|
teq r0,#0
|
||||||
moveq r0,#-1
|
moveq r0,#-1
|
||||||
@ -425,7 +426,7 @@ AES_set_encrypt_key:
|
|||||||
bne .Labrt
|
bne .Labrt
|
||||||
|
|
||||||
.Lok: stmdb sp!,{r4-r12,lr}
|
.Lok: stmdb sp!,{r4-r12,lr}
|
||||||
sub $tbl,r3,#AES_set_encrypt_key-AES_Te-1024 @ Te4
|
sub $tbl,r3,#_armv4_AES_set_encrypt_key-AES_Te-1024 @ Te4
|
||||||
|
|
||||||
mov $rounds,r0 @ inp
|
mov $rounds,r0 @ inp
|
||||||
mov lr,r1 @ bits
|
mov lr,r1 @ bits
|
||||||
@ -685,7 +686,7 @@ AES_set_encrypt_key:
|
|||||||
.align 5
|
.align 5
|
||||||
AES_set_decrypt_key:
|
AES_set_decrypt_key:
|
||||||
str lr,[sp,#-4]! @ push lr
|
str lr,[sp,#-4]! @ push lr
|
||||||
bl AES_set_encrypt_key
|
bl _armv4_AES_set_encrypt_key
|
||||||
teq r0,#0
|
teq r0,#0
|
||||||
ldrne lr,[sp],#4 @ pop lr
|
ldrne lr,[sp],#4 @ pop lr
|
||||||
bne .Labrt
|
bne .Labrt
|
||||||
|
Loading…
x
Reference in New Issue
Block a user