From 63e6b12834233dc9b98f2b7b63611f958aa88cc6 Mon Sep 17 00:00:00 2001 From: Yves Orton Date: Sun, 23 Apr 2017 11:59:34 +0200 Subject: [PATCH] Revert "use a specific define for 64 bit hashing" This reverts commit a4283faf7092ec370914ee3e4e7afeddd0115689. Accidental push. Sorry. --- hv_func.h | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/hv_func.h b/hv_func.h index f0afe27..d10b5e1 100644 --- a/hv_func.h +++ b/hv_func.h @@ -12,17 +12,13 @@ #ifndef PERL_SEEN_HV_FUNC_H /* compile once */ #define PERL_SEEN_HV_FUNC_H -#if IVSZIE == 8 -#define CAN64BITHASH -#endif - #if !( 0 \ || defined(PERL_HASH_FUNC_SIPHASH) \ || defined(PERL_HASH_FUNC_SIPHASH13) \ || defined(PERL_HASH_FUNC_HYBRID_OAATHU_SIPHASH13) \ || defined(PERL_HASH_FUNC_ONE_AT_A_TIME_HARD) \ ) -#ifdef CAN64BITHASH +#if IVSIZE == 8 #define PERL_HASH_FUNC_HYBRID_OAATHU_SIPHASH13 #else #define PERL_HASH_FUNC_ONE_AT_A_TIME_HARD @@ -118,7 +114,7 @@ #define UNALIGNED_SAFE #endif -#ifdef CAN64BITHASH +#ifdef HAS_QUAD #ifndef U64TYPE /* This probably isn't going to work, but failing with a compiler error due to lack of uint64_t is no worse than failing right now with an #error. */ @@ -130,13 +126,13 @@ #if defined(_MSC_VER) #include /* Microsoft put _rotl declaration in here */ #define ROTL32(x,r) _rotl(x,r) - #ifdef CAN64BITHASH + #ifdef HAS_QUAD #define ROTL64(x,r) _rotl64(x,r) #endif #else /* gcc recognises this code and generates a rotate instruction for CPUs with one */ #define ROTL32(x,r) (((U32)x << r) | ((U32)x >> (32 - r))) - #ifdef CAN64BITHASH + #ifdef HAS_QUAD #define ROTL64(x,r) (((U64)x << r) | ((U64)x >> (64 - r))) #endif #endif @@ -162,7 +158,7 @@ * It is 64 bit only. */ -#ifdef CAN64BITHASH +#ifdef HAS_QUAD #define U8TO64_LE(p) \ (((U64)((p)[0]) ) | \ @@ -255,7 +251,7 @@ PERL_SIPHASH_FNC( ,SIPROUND;SIPROUND;SIPROUND;SIPROUND; ) -#endif /* defined(CAN64BITHASH) */ +#endif /* defined(HAS_QUAD) */ /* - ONE_AT_A_TIME_HARD is the 5.17+ recommend ONE_AT_A_TIME variant */ @@ -299,7 +295,7 @@ S_perl_hash_one_at_a_time_hard(const unsigned char * const seed, const unsigned return (hash + (hash << 15)); } -#ifdef CAN64BITHASH +#ifdef HAS_QUAD /* Hybrid hash function * @@ -399,7 +395,7 @@ S_perl_hash_oaathu_siphash_1_3(const unsigned char * const seed, const unsigned } return S_perl_hash_siphash_1_3(seed+8, str, len); } -#endif /* defined(CAN64BITHASH) */ +#endif /* defined(HAS_QUAD) */ #endif /*compile once*/ -- 1.8.3.1