qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <lvivier@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] tcg: Fix typos in helper_gvec_sar{8, 32, 64}v
Date: Tue, 11 Jun 2019 09:40:34 +0200	[thread overview]
Message-ID: <cc5bf60a-5c1b-2f13-17d6-6c65e1de7ddf@redhat.com> (raw)
In-Reply-To: <20190607183016.8285-1-richard.henderson@linaro.org>

On 07/06/2019 20:30, Richard Henderson wrote:
> The loop is written with scalars, not vectors.
> Use the correct type when incrementing.
> 
> Fixes: 5ee5c14cacd
> Reported-by: Laurent Vivier <lvivier@redhat.com>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  accel/tcg/tcg-runtime-gvec.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/accel/tcg/tcg-runtime-gvec.c b/accel/tcg/tcg-runtime-gvec.c
> index 3b6052fe97..51cb29ca79 100644
> --- a/accel/tcg/tcg-runtime-gvec.c
> +++ b/accel/tcg/tcg-runtime-gvec.c
> @@ -874,7 +874,7 @@ void HELPER(gvec_sar8v)(void *d, void *a, void *b, uint32_t desc)
>      intptr_t oprsz = simd_oprsz(desc);
>      intptr_t i;
>  
> -    for (i = 0; i < oprsz; i += sizeof(vec8)) {
> +    for (i = 0; i < oprsz; i += sizeof(int8_t)) {
>          uint8_t sh = *(uint8_t *)(b + i) & 7;
>          *(int8_t *)(d + i) = *(int8_t *)(a + i) >> sh;
>      }
> @@ -898,7 +898,7 @@ void HELPER(gvec_sar32v)(void *d, void *a, void *b, uint32_t desc)
>      intptr_t oprsz = simd_oprsz(desc);
>      intptr_t i;
>  
> -    for (i = 0; i < oprsz; i += sizeof(vec32)) {
> +    for (i = 0; i < oprsz; i += sizeof(int32_t)) {
>          uint8_t sh = *(uint32_t *)(b + i) & 31;
>          *(int32_t *)(d + i) = *(int32_t *)(a + i) >> sh;
>      }
> @@ -910,7 +910,7 @@ void HELPER(gvec_sar64v)(void *d, void *a, void *b, uint32_t desc)
>      intptr_t oprsz = simd_oprsz(desc);
>      intptr_t i;
>  
> -    for (i = 0; i < oprsz; i += sizeof(vec64)) {
> +    for (i = 0; i < oprsz; i += sizeof(int64_t)) {
>          uint8_t sh = *(uint64_t *)(b + i) & 63;
>          *(int64_t *)(d + i) = *(int64_t *)(a + i) >> sh;
>      }
> 

Tested-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>


      reply	other threads:[~2019-06-11  7:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-07 18:30 [Qemu-devel] [PATCH] tcg: Fix typos in helper_gvec_sar{8,32,64}v Richard Henderson
2019-06-11  7:40 ` Laurent Vivier [this message]

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=cc5bf60a-5c1b-2f13-17d6-6c65e1de7ddf@redhat.com \
    --to=lvivier@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).