diff options
author | Andy Polyakov <appro@openssl.org> | 2014-06-06 21:27:18 +0200 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2014-06-06 21:27:18 +0200 |
commit | 5dcf70a1c57c2019bfad640fe14fd4a73212860a (patch) | |
tree | 0033ec72c6c8080843ceda81aa0a3b37be5f8342 /crypto/aes | |
parent | cd91fd7c32428c0deb503f19b8061e0980476876 (diff) |
ARM assembly pack: get ARMv7 instruction endianness right.
Pointer out and suggested by: Ard Biesheuvel.
Diffstat (limited to 'crypto/aes')
-rw-r--r-- | crypto/aes/asm/aes-armv4.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/aes/asm/aes-armv4.pl b/crypto/aes/asm/aes-armv4.pl index 57996f68b7..a620a7cddb 100644 --- a/crypto/aes/asm/aes-armv4.pl +++ b/crypto/aes/asm/aes-armv4.pl @@ -715,8 +715,8 @@ _armv4_AES_set_encrypt_key: .Ldone: mov r0,#0 ldmia sp!,{r4-r12,lr} .Labrt: -#if defined(__thumb2__) && __ARM_ARCH__>=7 - .short 0x4770 @ bx lr in Thumb2 encoding +#if __ARM_ARCH__>=5 + ret @ bx lr #else tst lr,#1 moveq pc,lr @ be binary compatible with V4, yet @@ -1203,6 +1203,7 @@ _armv4_AES_decrypt: ___ $code =~ s/\bbx\s+lr\b/.word\t0xe12fff1e/gm; # make it possible to compile with -march=armv4 +$code =~ s/\bret\b/bx\tlr/gm; open SELF,$0; while(<SELF>) { |