aboutsummaryrefslogtreecommitdiffstats
path: root/cipher/rmd160.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1998-02-11 03:25:44 +0000
committerWerner Koch <[email protected]>1998-02-11 03:25:44 +0000
commit4c0c155922b70b62793905490e210e9af4e3b18d (patch)
treea0d8d84a89cfd4579817a993715e750917961c3e /cipher/rmd160.c
parentrelease 0.2.3 (diff)
downloadgnupg-4c0c155922b70b62793905490e210e9af4e3b18d.tar.gz
gnupg-4c0c155922b70b62793905490e210e9af4e3b18d.zip
a couple of changes; but some parts are now broken
Diffstat (limited to 'cipher/rmd160.c')
-rw-r--r--cipher/rmd160.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/cipher/rmd160.c b/cipher/rmd160.c
index 0b501d77b..39f1c740c 100644
--- a/cipher/rmd160.c
+++ b/cipher/rmd160.c
@@ -151,6 +151,20 @@ rmd160_init( RMD160_CONTEXT *hd )
}
+#if defined(__GNUC__) && defined(__i386__)
+static inline u32
+rol(int n, u32 x)
+{
+ __asm__("roll %%cl,%0"
+ :"=r" (x)
+ :"0" (x),"c" (n));
+ return x;
+}
+#else
+ #define rol(n,x) ( ((x) << (n)) | ((x) >> (32-(n))) )
+#endif
+
+
/****************
* Transform the message X which consists of 16 32-bit-words
*/
@@ -209,9 +223,6 @@ transform( RMD160_CONTEXT *hd, byte *data )
(a) < 64 ? F3((x),(y),(z)) : \
F4((x),(y),(z)) )
-#define rol(n,x) ( ((x) << (n)) | ((x) >> (32-(n))) )
-
-
#ifdef BIG_ENDIAN_HOST
{ int i;
byte *p2, *p1;