qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCH for-3.0] target/arm: Fix LD1W and LDFF1W (scalar plus vector)
Date: Thu, 12 Jul 2018 14:04:04 +0100	[thread overview]
Message-ID: <87lgagd2rf.fsf@linaro.org> (raw)
In-Reply-To: <20180711103957.3040-1-richard.henderson@linaro.org>


Richard Henderson <richard.henderson@linaro.org> writes:

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

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

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


--
Alex Bennée

  parent reply	other threads:[~2018-07-12 13: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
2018-07-11 13:23   ` Richard Henderson
2018-07-12 13:04 ` Alex Bennée [this message]
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=87lgagd2rf.fsf@linaro.org \
    --to=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 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).