From patchwork Fri Dec 14 03:19:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 153737 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1609968ljp; Thu, 13 Dec 2018 19:45:47 -0800 (PST) X-Google-Smtp-Source: AFSGD/XXsur1X3/kfM/oty5rrcXk6+oCIOlX/pTF4HuRvQvbSxrGulUROLuDHSonlSIKyqVwc72F X-Received: by 2002:ac8:7353:: with SMTP id q19mr1247411qtp.265.1544759146773; Thu, 13 Dec 2018 19:45:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544759146; cv=none; d=google.com; s=arc-20160816; b=LrXcVBITw8TsWAsHxsKxOTdYpzmgHdUsvp+3rqMm5wM1xjjtVulZZoPiUfFcpWCRrx y3KrZ8SRKXqHx9Uq8zMF4lCVwkXCqX+YwVF+6OA33+bFnD2vWhZz59n77b1MFlITpvA8 MZvaqDclvSNkQsvwX49/kfy4ECIK0ZIp7vlmb29foVF92F95hI0YqQq+58iU+1pwv4oF uDv2UqIfFBRB5IotHnJeUGoxK/RCtmG1MK8KL//7VcdNfWXO98rVZvajjZf0B/FmIYdg 4nmz6+yfG8MX+VKmGEJZaa4so4M2gMTM2LBNoBVp1TllmuH0b3JPg+ArQZTD0WTDHQfX 4rDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=HOR5xbwz9EmkIQh396vVWN9pPwvDwijcaDuswD3C1fw=; b=wKX/MvBwueo5anBEBo7Fa71j4G3yKQJY+PBYCAwav3aCV7+dhYJkXz+j8H41ywDFUH P0vSjtce2wSSjd+u1pZVwMej9X/ooOekSoYz7RIbXRA5gXjxmFE/egSJsx/A61pHsOhl wySlNz6s5gHJZuAHVnKbDjoZZLY9j4+1ltjplvTgCEVczdn7YMkf6TYg+zBOdIjgXPFN /9lYjVxjzPn1bw459KeGKdI5QXWmOqL3NbvaVcwAAn0+NbP85ORF/XyIuBTjkd1hRffB LM9cGs7HnL8U8kW7gKx/Bo/48tSLb9LFaPBwMH03lmSIsyxCTV01pQs/xDLSnZesq/dW yq3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=EMDnI1jZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id b5si1363142qtg.383.2018.12.13.19.45.46 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 13 Dec 2018 19:45:46 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=EMDnI1jZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59203 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXeQ6-00040M-9r for patch@linaro.org; Thu, 13 Dec 2018 22:45:46 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59036) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXe1E-0006Iu-Cn for qemu-devel@nongnu.org; Thu, 13 Dec 2018 22:20:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gXe1D-0007mB-BR for qemu-devel@nongnu.org; Thu, 13 Dec 2018 22:20:04 -0500 Received: from mail-oi1-x234.google.com ([2607:f8b0:4864:20::234]:40818) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gXe1D-0007ko-4U for qemu-devel@nongnu.org; Thu, 13 Dec 2018 22:20:03 -0500 Received: by mail-oi1-x234.google.com with SMTP id t204so3458047oie.7 for ; Thu, 13 Dec 2018 19:20:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HOR5xbwz9EmkIQh396vVWN9pPwvDwijcaDuswD3C1fw=; b=EMDnI1jZ0d8jqxIWCW7HGi6cPoYL8hCm7of6wJJueuAWBm+GcrWMXe65MfS+6fQ4De bKwkMUlqF2l0wGvfnW2zbOxTSqxAMLq6g/UAjw8WlDUbhFCJJHA8OFAEV4PvdaSTEPFf bdVy/3ejpG+Q8eQZWIA6tlHb9Cw8aZRHJfXfs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HOR5xbwz9EmkIQh396vVWN9pPwvDwijcaDuswD3C1fw=; b=XWXQnfqtjF1sKz9dP+OttyxzajRscLnEIpkQ1XlcOVDVhZ7MphzJ0kJr85YKQMJd7L 4BjzxuJp2H1m33AmC15wYcorhIyxeT5nwH1etCyidNAC1fm+Jz45xBX0Pd2Fa8cY8ghB Ds6nQw6kpH7S6MlnqoYk23TDkcDC6qvePDw/11K6iQfFftRCMSG3B5xVZZeNl7FeQBgh VVjIyTErZoueDCxbWUpiefo4v3dqBTxF7ZALRH0xFO9UH6hP+L9XTssxFXccWZOfX46R 1JfPddy21ztU/eTXUXFet2+NJN6JrluABjzPpd2tDj/4X0vDoXlr7x1EsCE0vVlNuILK r3Jw== X-Gm-Message-State: AA+aEWZDnCYOEEVkpZyw/JwzICJEcebN2ULL4KoFMbuIJIjD9cDQq2oN mV78YL7K9Q5T+40oMg5xw5HfTxct9ckv/w== X-Received: by 2002:aca:ce86:: with SMTP id e128mr836161oig.247.1544757602230; Thu, 13 Dec 2018 19:20:02 -0800 (PST) Received: from cloudburst.twiddle.net ([187.217.227.243]) by smtp.gmail.com with ESMTPSA id g138sm2367537oib.26.2018.12.13.19.20.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Dec 2018 19:20:01 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 13 Dec 2018 21:19:23 -0600 Message-Id: <20181214031923.29527-34-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181214031923.29527-1-richard.henderson@linaro.org> References: <20181214031923.29527-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::234 Subject: [Qemu-devel] [PULL 32/32] 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: peter.maydell@linaro.org, "Emilio G. Cota" Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" 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 Reviewed-by: Alex Bennée Tested-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- include/qemu/xxhash.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.17.2 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;