summaryrefslogtreecommitdiffstats
path: root/crypto/modes/asm
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2014-06-06 21:27:18 +0200
committerAndy Polyakov <appro@openssl.org>2014-06-06 21:27:18 +0200
commit5dcf70a1c57c2019bfad640fe14fd4a73212860a (patch)
tree0033ec72c6c8080843ceda81aa0a3b37be5f8342 /crypto/modes/asm
parentcd91fd7c32428c0deb503f19b8061e0980476876 (diff)
ARM assembly pack: get ARMv7 instruction endianness right.
Pointer out and suggested by: Ard Biesheuvel.
Diffstat (limited to 'crypto/modes/asm')
-rw-r--r--crypto/modes/asm/ghash-armv4.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/modes/asm/ghash-armv4.pl b/crypto/modes/asm/ghash-armv4.pl
index 0b0dcc8a68..0023bf994b 100644
--- a/crypto/modes/asm/ghash-armv4.pl
+++ b/crypto/modes/asm/ghash-armv4.pl
@@ -386,7 +386,7 @@ gcm_init_neon:
veor $IN,$IN,$t0 @ twisted H
vstmia r0,{$IN}
- bx lr
+ ret @ bx lr
.size gcm_init_neon,.-gcm_init_neon
.global gcm_gmult_neon
@@ -470,7 +470,7 @@ $code.=<<___;
vst1.64 $Xl#hi,[$Xi,:64]! @ write out Xi
vst1.64 $Xl#lo,[$Xi,:64]
- bx lr
+ ret @ bx lr
.size gcm_ghash_neon,.-gcm_ghash_neon
#endif
___
@@ -484,6 +484,7 @@ foreach (split("\n",$code)) {
s/\`([^\`]*)\`/eval $1/geo;
s/\bq([0-9]+)#(lo|hi)/sprintf "d%d",2*$1+($2 eq "hi")/geo or
+ s/\bret\b/bx lr/go or
s/\bbx\s+lr\b/.word\t0xe12fff1e/go; # make it possible to compile with -march=armv4
print $_,"\n";