From patchwork Fri Nov 23 23:02:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Emilio Cota X-Patchwork-Id: 1002534 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=braap.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=braap.org header.i=@braap.org header.b="02awuLK/"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="EnOSgT+G"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 431sKj01Y0z9s3l for ; Sat, 24 Nov 2018 10:03:03 +1100 (AEDT) Received: from localhost ([::1]:54520 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gQKTU-0007in-Rm for incoming@patchwork.ozlabs.org; Fri, 23 Nov 2018 18:03:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gQKSr-0007hD-AH for qemu-devel@nongnu.org; Fri, 23 Nov 2018 18:02:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gQKSo-000294-3a for qemu-devel@nongnu.org; Fri, 23 Nov 2018 18:02:21 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:60245) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gQKSn-00025c-N1 for qemu-devel@nongnu.org; Fri, 23 Nov 2018 18:02:17 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 60B9B21FB2; Fri, 23 Nov 2018 18:02:17 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 23 Nov 2018 18:02:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h= from:to:cc:subject:date:message-id:in-reply-to:references; s= mesmtp; bh=g/8u82naiqG+ptLtnie9KJ2nVzpSc5Vui7bQArLLK30=; b=02awu LK/n9bEv1GYzxuvksk8KDcWo6M0I0b+nR9ssYugYcLkc8VwRQKJe41mjDJmQGNyM gBoSEhpG1TbcODj4jQUP9LN0WHzSfOL6ou7JeBpOY1NZo7gp8/9ZeWDn7ym9MZaD FNNAeN2dxGVgoUomb2JTHeR8kyuJORzOZEnkqc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=g/8u82naiqG+ptLtnie9KJ2nVzpSc 5Vui7bQArLLK30=; b=EnOSgT+GIJcrKplZBzKKbMUevtJoD4u2BKyXEkrO9OhiD +YFXB3jSn493TQA7veWv4+huvGqNuiPdb/GUfQFzKsMYsm4hXfVbCPN7M25tJ4d1 qIkC2+r5aUPPCVtKdwJxlz4hga0WDmdzwuHsOpDnD69LQYjzoLsEw8NgSRndfhVQ 9yG+aXPUg0cAsmMFDFfwGzQ904l/z8y9aN9PcugFErbo6aNVkhVQt8bokYy/YdxP 8gHxxcmV3TzRV/GXwnHxHqVbJRD6qcU6EGJkEYvF5ACkmXqbtZZRyLoWTFb7nVtL /1dAtlDpO8wsRadxIZTst76El/AWIjc50rDto9sEg== X-ME-Sender: X-ME-Proxy: Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 166CC102F0; Fri, 23 Nov 2018 18:02:17 -0500 (EST) From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Fri, 23 Nov 2018 18:02:06 -0500 Message-Id: <20181123230206.12629-5-cota@braap.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181123230206.12629-1-cota@braap.org> References: <20181123230206.12629-1-cota@braap.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.28 Subject: [Qemu-devel] [PATCH 4/4] xxhash: match output against the original xxhash32 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Change the order in which we extract a/b and c/d to match the output of the upstream xxhash32. Tested with: https://github.com/cota/xxhash/tree/qemu Signed-off-by: Emilio G. Cota Reviewed-by: Alex Bennée Tested-by: Alex Bennée --- include/qemu/xxhash.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/qemu/xxhash.h b/include/qemu/xxhash.h index fe35dde328..076f1f6054 100644 --- a/include/qemu/xxhash.h +++ b/include/qemu/xxhash.h @@ -55,10 +55,10 @@ qemu_xxhash7(uint64_t ab, uint64_t cd, uint32_t e, uint32_t f, uint32_t g) uint32_t v2 = QEMU_XXHASH_SEED + PRIME32_2; uint32_t v3 = QEMU_XXHASH_SEED + 0; uint32_t v4 = QEMU_XXHASH_SEED - PRIME32_1; - uint32_t a = ab >> 32; - uint32_t b = ab; - uint32_t c = cd >> 32; - uint32_t d = cd; + uint32_t a = ab; + uint32_t b = ab >> 32; + uint32_t c = cd; + uint32_t d = cd >> 32; uint32_t h32; v1 += a * PRIME32_2;