From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2qTZ-0001Gk-Un for qemu-devel@nongnu.org; Tue, 17 May 2016 21:40:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2kz0-0003qa-3r for qemu-devel@nongnu.org; Tue, 17 May 2016 15:48:51 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:39786) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2kyx-0003pA-RI for qemu-devel@nongnu.org; Tue, 17 May 2016 15:48:46 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id C71B020DAD for ; Tue, 17 May 2016 15:48:34 -0400 (EDT) Date: Tue, 17 May 2016 15:48:34 -0400 From: "Emilio G. Cota" Message-ID: <20160517194834.GC30174@flamenco> References: <1463196873-17737-1-git-send-email-cota@braap.org> <1463196873-17737-9-git-send-email-cota@braap.org> <573B536C.90804@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <573B536C.90804@gmail.com> Subject: Re: [Qemu-devel] [PATCH v5 08/18] exec: add tb_hash_func5, derived from xxhash List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sergey Fedorov Cc: QEMU Developers , MTTCG Devel , Alex =?iso-8859-1?Q?Benn=E9e?= , Paolo Bonzini , Peter Crosthwaite , Richard Henderson 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