diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2014-04-17 21:07:07 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2014-04-17 21:07:07 +0000 |
commit | 16561eaef6da76472f585e724b370425585705c4 (patch) | |
tree | 8c29c1ea776a04894cb1214d3e4933d2c2a0be3f /lib/libcrypto/whrlpool | |
parent | e9944120ce7facca567c5eba38239a4945b12662 (diff) |
Remove support for big-endian i386 and amd64.
Before someone suggests the OpenSSL people are junkies, here is what they
mention about this:
/* Most will argue that x86_64 is always little-endian. Well,
* yes, but then we have stratus.com who has modified gcc to
* "emulate" big-endian on x86. Is there evidence that they
* [or somebody else] won't do same for x86_64? Naturally no.
* And this line is waiting ready for that brave soul:-) */
So, yes, they are on drugs. But they are not alone, the stratus.com people are,
too.
Diffstat (limited to 'lib/libcrypto/whrlpool')
-rw-r--r-- | lib/libcrypto/whrlpool/wp_block.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/libcrypto/whrlpool/wp_block.c b/lib/libcrypto/whrlpool/wp_block.c index 221f6cc59f2..ce977083add 100644 --- a/lib/libcrypto/whrlpool/wp_block.c +++ b/lib/libcrypto/whrlpool/wp_block.c @@ -68,9 +68,9 @@ typedef unsigned long long u64; CPUs this is actually faster! */ # endif # define GO_FOR_MMX(ctx,inp,num) do { \ - extern unsigned long OPENSSL_ia32cap_P; \ + extern unsigned int OPENSSL_ia32cap_P[]; \ void whirlpool_block_mmx(void *,const void *,size_t); \ - if (!(OPENSSL_ia32cap_P & (1<<23))) break; \ + if (!(OPENSSL_ia32cap_P[0] & (1<<23))) break; \ whirlpool_block_mmx(ctx->H.c,inp,num); return; \ } while (0) # endif @@ -84,18 +84,8 @@ typedef unsigned long long u64; # endif #elif defined(__GNUC__) && __GNUC__>=2 # if defined(__x86_64) || defined(__x86_64__) -# if defined(L_ENDIAN) # define ROTATE(a,n) ({ u64 ret; asm ("rolq %1,%0" \ : "=r"(ret) : "J"(n),"0"(a) : "cc"); ret; }) -# elif defined(B_ENDIAN) - /* Most will argue that x86_64 is always little-endian. Well, - * yes, but then we have stratus.com who has modified gcc to - * "emulate" big-endian on x86. Is there evidence that they - * [or somebody else] won't do same for x86_64? Naturally no. - * And this line is waiting ready for that brave soul:-) */ -# define ROTATE(a,n) ({ u64 ret; asm ("rorq %1,%0" \ - : "=r"(ret) : "J"(n),"0"(a) : "cc"); ret; }) -# endif # elif defined(__ia64) || defined(__ia64__) # if defined(L_ENDIAN) # define ROTATE(a,n) ({ u64 ret; asm ("shrp %0=%1,%1,%2" \ |