All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Emilio G. Cota" <cota@braap.org>
Cc: qemu-devel@nongnu.org, Richard Henderson <richard.henderson@linaro.org>
Subject: Re: [Qemu-devel] [PATCH 4/4] xxhash: match output against the original xxhash32
Date: Wed, 28 Nov 2018 15:09:34 +0000	[thread overview]
Message-ID: <875zwh44sx.fsf@linaro.org> (raw)
In-Reply-To: <20181123230206.12629-5-cota@braap.org>


Emilio G. Cota <cota@braap.org> writes:

> 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 <cota@braap.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>

> ---
>  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;


--
Alex Bennée

  reply	other threads:[~2018-11-28 15:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-23 23:02 [Qemu-devel] [PATCH 0/4] xxhash patches for 4.0 Emilio G. Cota
2018-11-23 23:02 ` [Qemu-devel] [PATCH 1/4] qht-bench: document -p flag Emilio G. Cota
2018-11-28 14:57   ` Alex Bennée
2018-11-23 23:02 ` [Qemu-devel] [PATCH 2/4] exec: introduce qemu_xxhash{2,4,5,6,7} Emilio G. Cota
2018-11-23 23:02 ` [Qemu-devel] [PATCH 3/4] include: move exec/tb-hash-xx.h to qemu/xxhash.h Emilio G. Cota
2018-11-23 23:02 ` [Qemu-devel] [PATCH 4/4] xxhash: match output against the original xxhash32 Emilio G. Cota
2018-11-28 15:09   ` Alex Bennée [this message]
2018-12-14  0:45 ` [Qemu-devel] [PATCH 0/4] xxhash patches for 4.0 Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875zwh44sx.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=cota@braap.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.