All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Desnogues <laurent.desnogues@gmail.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [Qemu-devel] [PATCH for-3.0] target/arm: Fix LD1W and LDFF1W (scalar plus vector)
Date: Wed, 11 Jul 2018 13:04:38 +0200	[thread overview]
Message-ID: <CABoDooMcGmex9s58D=bH-GTM0jkCUTNyx5A+JXE_Hyd--kBgbg@mail.gmail.com> (raw)
In-Reply-To: <20180711103957.3040-1-richard.henderson@linaro.org>

Hello,

On Wed, Jul 11, 2018 at 12:39 PM, Richard Henderson
<richard.henderson@linaro.org> wrote:
> 'I' was being double-incremented; correctly within the inner loop
> and incorrectly within the outer loop.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

I didn't try to apply the patch but line numbers look wrong.

I guess this should apply to DO_LD1_ZPZ_S and DO_LDFF1_ZPZ macros, in
which case you get my review:

Reviewed-by: Laurent Desnogues <laurent.desnogues@gmail.com>

Thanks,

Laurent

> ---
>
> Fixes a SIGSEGV within one of these generated helpers,
> exposed by an armclang vectorized code sample.
>
>
> r~
>
> ---
>  target/arm/sve_helper.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c
> index cec0d3ee54..ddc592ff79 100644
> --- a/target/arm/sve_helper.c
> +++ b/target/arm/sve_helper.c
> @@ -4855,7 +4855,7 @@ void HELPER(NAME)(CPUARMState *env, void *vd, void *vg, void *vm,       \
>      intptr_t i, oprsz = simd_oprsz(desc);                               \
>      unsigned scale = simd_data(desc);                                   \
>      uintptr_t ra = GETPC();                                             \
> -    for (i = 0; i < oprsz; i++) {                                       \
> +    for (i = 0; i < oprsz; ) {                                          \
>          uint16_t pg = *(uint16_t *)(vg + H1_2(i >> 3));                 \
>          do {                                                            \
>              TYPEM m = 0;                                                \
> @@ -4936,7 +4936,7 @@ void HELPER(NAME)(CPUARMState *env, void *vd, void *vg, void *vm,       \
>      uintptr_t ra = GETPC();                                             \
>      bool first = true;                                                  \
>      mmap_lock();                                                        \
> -    for (i = 0; i < oprsz; i++) {                                       \
> +    for (i = 0; i < oprsz; ) {                                          \
>          uint16_t pg = *(uint16_t *)(vg + H1_2(i >> 3));                 \
>          do {                                                            \
>              TYPEM m = 0;                                                \
> --
> 2.17.1
>
>

  reply	other threads:[~2018-07-11 11:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11 10:39 [Qemu-devel] [PATCH for-3.0] target/arm: Fix LD1W and LDFF1W (scalar plus vector) Richard Henderson
2018-07-11 11:04 ` Laurent Desnogues [this message]
2018-07-11 13:23   ` Richard Henderson
2018-07-12 13:04 ` Alex Bennée
2018-07-12 15:56 ` Peter Maydell

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='CABoDooMcGmex9s58D=bH-GTM0jkCUTNyx5A+JXE_Hyd--kBgbg@mail.gmail.com' \
    --to=laurent.desnogues@gmail.com \
    --cc=alex.bennee@linaro.org \
    --cc=peter.maydell@linaro.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.