diff options
author | Andy Polyakov <appro@openssl.org> | 2011-06-28 13:31:58 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2011-06-28 13:31:58 +0000 |
commit | 0ec55604c0aa0574fbb04bef9e9617d9ea980568 (patch) | |
tree | 8c604563c2d8dc89bb2c50a76ed4d222af805179 /crypto/whrlpool | |
parent | 500007c9ed9bdd12db519476fc5aa072fc2f474c (diff) |
Expand OPENSSL_ia32cap_P to 64 bits. It might appear controversial, because
such operation can be considered as breaking binary compatibility. However!
OPNESSL_ia32cap_P is accessed by application through pointer returned by
OPENSSL_ia32cap_loc() and such change of *internal* OPENSSL_ia32cap_P
declaration is possible specifically on little-endian platforms, such as
x86[_64] ones in question. In addition, if 32-bit application calls
OPENSSL_ia32cap_loc(), it clears upper half of capability vector maintaining
the illusion that it's still 32 bits wide.
Diffstat (limited to 'crypto/whrlpool')
-rw-r--r-- | crypto/whrlpool/wp_block.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/whrlpool/wp_block.c b/crypto/whrlpool/wp_block.c index 221f6cc59f..824ed1827c 100644 --- a/crypto/whrlpool/wp_block.c +++ b/crypto/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 |