qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v5 08/18] exec: add tb_hash_func5, derived from


From: Emilio G. Cota
Subject: Re: [Qemu-devel] [PATCH v5 08/18] exec: add tb_hash_func5, derived from xxhash
Date: Tue, 17 May 2016 15:48:34 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, May 17, 2016 at 20:22:52 +0300, Sergey Fedorov wrote:
> On 14/05/16 06:34, Emilio G. Cota wrote:
(snip)
> > +static inline
> > +uint32_t tb_hash_func5(uint64_t a0, uint64_t b0, uint32_t e)
> > +{
> > +    uint32_t v1 = TB_HASH_XX_SEED + PRIME32_1 + PRIME32_2;
> > +    uint32_t v2 = TB_HASH_XX_SEED + PRIME32_2;
> > +    uint32_t v3 = TB_HASH_XX_SEED + 0;
> > +    uint32_t v4 = TB_HASH_XX_SEED - PRIME32_1;
> > +    uint32_t a = a0 >> 31 >> 1;
> 
> I'm wondering if there's something special forcing us to make ">> 31
> >>1" instead of just ">> 32" on uint64_t?

Not really; it's perfectly fine to do >> 32 since both a0 and b0
are u64's.

I've changed it in my tree, thanks.

                Emilio



reply via email to

[Prev in Thread] Current Thread [Next in Thread]