summaryrefslogtreecommitdiffstats
path: root/crypto/sha/asm
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2007-09-26 12:17:33 +0000
committerAndy Polyakov <appro@openssl.org>2007-09-26 12:17:33 +0000
commit74eb3e091412be483d419c6ae3cdb6be2c1fb273 (patch)
treebce9b4cc83f1e53d4810d9c47a791ae5965e2bd3 /crypto/sha/asm
parent79fe664f19489870ae24b4d0e11830a7624ca9d6 (diff)
Make sha512-armv4.pl byte-order neutral.
Diffstat (limited to 'crypto/sha/asm')
-rw-r--r--crypto/sha/asm/sha512-armv4.pl15
1 files changed, 9 insertions, 6 deletions
diff --git a/crypto/sha/asm/sha512-armv4.pl b/crypto/sha/asm/sha512-armv4.pl
index 7e7a726b17..da720bd5d3 100644
--- a/crypto/sha/asm/sha512-armv4.pl
+++ b/crypto/sha/asm/sha512-armv4.pl
@@ -12,12 +12,15 @@
# This code is ~4.5 (four and a half) times faster than code generated
# by gcc 3.4 and it spends ~72 clock cycles per byte.
-# This module currently has dependency on byte order, namely *dword*
-# order in ctx->h[0-9]. I have to think of a way to reliably detect
-# "endianness" [and flip below two constants] or arrange given dword
-# order in C.
-$lo=0; # this denotes little-endian platform.
-$hi=4;
+# Byte order [in]dependence. =========================================
+#
+# Caller is expected to maintain specific *dword* order in h[0-7],
+# namely with most significant dword at *lower* address, which is
+# reflected in below two parameters. *Byte* order within these dwords
+# in turn is whatever *native* byte order on current platform.
+$hi=0;
+$lo=4;
+# ====================================================================
$ctx="r0";
$inp="r1";