diff options
author | Werner Koch <wk@gnupg.org> | 1998-02-11 03:25:43 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 1998-02-11 03:25:43 +0000 |
commit | 05690451b89ca1df9e81b50f306f0f87ae3b80a6 (patch) | |
tree | 69ffa304be307409ece88034418ae3e8d4408a0b /cipher/rmd160.c | |
parent | a7f3283cc053fff72bb81c230504bbd9d675de1d (diff) | |
download | libgcrypt-05690451b89ca1df9e81b50f306f0f87ae3b80a6.tar.gz |
a couple of changes; but some parts are now broken
Diffstat (limited to 'cipher/rmd160.c')
-rw-r--r-- | cipher/rmd160.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/cipher/rmd160.c b/cipher/rmd160.c index 0b501d77..39f1c740 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; |