qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 09/13] exec: add tb_hash_func5, derived from


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v2 09/13] exec: add tb_hash_func5, derived from xxhash
Date: Fri, 8 Apr 2016 11:45:44 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1

On 04/07/2016 10:32 AM, Emilio G. Cota wrote:
> +#include <stdint.h>

Should already be done by <qemu/osdep.h>

> +/*
> + * Note : although _rotl exists for minGW (GCC under windows), performance
> + * seems poor.
> + */
> +#if defined(_MSC_VER)
> +#  define XXH_rotl32(x, r) _rotl(x, r)
> +#else
> +#  define XXH_rotl32(x, r) ((x << r) | (x >> (32 - r)))
> +#endif

Please use rol32 from <qemu/bitops.h>

> +static inline
> +uint32_t tb_hash_func5(uint64_t a0, uint64_t b0, uint32_t e, int seed)
> +{

Is there really any point in passing in "seed" anymore?
We certainly don't want different values passed in...


r~



reply via email to

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