qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-arm <qemu-arm@nongnu.org>, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH 02/10] target/arm: Add missing TCG temp free in do_2shift_env_64()
Date: Thu, 11 Jun 2020 18:05:06 +0100	[thread overview]
Message-ID: <CAFEAcA-xw6pHejLVjUze1UWwBpygNWjam_KNOCyfthL-3vYDBQ@mail.gmail.com> (raw)
In-Reply-To: <d32b36c2-6662-91b1-5b18-ff7a56386cd8@linaro.org>

On Thu, 11 Jun 2020 at 16:43, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 6/11/20 7:45 AM, Peter Maydell wrote:
> > In commit 37bfce81b10450071 we accidentally introduced a leak of a TCG
> > temporary in do_2shift_env_64(); free it.
> >
> > Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> > ---
> > My test setup wasn't looking for temporary-leak warnings (they are
> > not as easy to get at as they used to be because they only appear
> > if you enable qemu_log tracing for some other purpose). This is the
> > only one that snuck through, though.
> > ---
> >  target/arm/translate-neon.inc.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/target/arm/translate-neon.inc.c b/target/arm/translate-neon.inc.c
> > index 7c4888a80c9..f2c241a87e9 100644
> > --- a/target/arm/translate-neon.inc.c
> > +++ b/target/arm/translate-neon.inc.c
> > @@ -1329,6 +1329,7 @@ static bool do_2shift_env_64(DisasContext *s, arg_2reg_shift *a,
> >          neon_load_reg64(tmp, a->vm + pass);
> >          fn(tmp, cpu_env, tmp, constimm);
> >          neon_store_reg64(tmp, a->vd + pass);
> > +        tcg_temp_free_i64(tmp);
>
> Huh.  I thought all the a32 stores magically freed their inputs.  I guess
> that's just the general-purpose registers.

Confusingly, neon_load_reg()/neon_store_reg() do the "create
new TCG temp for the load, free the store input" thing, but
neon_load_reg64()/neon_store_reg64()/neon_load_reg32()/neon_store_reg32()
do not. I'd kind of like to get rid of this weird proliferation
of load and store functions, but neon_load_reg()/neon_store_reg() are
also the only ones which take a (regno, pass) pair of inputs,
so it's not a completely trivial substitution.

thanks
-- PMM


  reply	other threads:[~2020-06-11 17:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 14:45 [PATCH 00/10] target/arm: Convert 2-reg-scalar to decodetree Peter Maydell
2020-06-11 14:45 ` [PATCH 01/10] target/arm: Add 'static' and 'const' annotations to VSHLL function arrays Peter Maydell
2020-06-11 15:41   ` Richard Henderson
2020-06-11 14:45 ` [PATCH 02/10] target/arm: Add missing TCG temp free in do_2shift_env_64() Peter Maydell
2020-06-11 15:43   ` Richard Henderson
2020-06-11 17:05     ` Peter Maydell [this message]
2020-06-11 14:45 ` [PATCH 03/10] target/arm: Convert Neon 2-reg-scalar integer multiplies to decodetree Peter Maydell
2020-06-11 16:09   ` Richard Henderson
2020-06-11 14:45 ` [PATCH 04/10] target/arm: Convert Neon 2-reg-scalar float " Peter Maydell
2020-06-11 16:14   ` Richard Henderson
2020-06-11 14:45 ` [PATCH 05/10] target/arm: Convert Neon 2-reg-scalar VQDMULH, VQRDMULH " Peter Maydell
2020-06-11 16:15   ` Richard Henderson
2020-06-11 14:45 ` [PATCH 06/10] target/arm: Convert Neon 2-reg-scalar VQRDMLAH, VQRDMLSH " Peter Maydell
2020-06-11 16:19   ` Richard Henderson
2020-06-11 14:45 ` [PATCH 07/10] target/arm: Convert Neon 2-reg-scalar long multiplies " Peter Maydell
2020-06-11 16:25   ` Richard Henderson
2020-06-11 14:45 ` [PATCH 08/10] target/arm: Convert Neon VEXT " Peter Maydell
2020-06-11 16:26   ` Richard Henderson
2020-06-11 14:45 ` [PATCH 09/10] target/arm: Convert Neon VTBL, VTBX " Peter Maydell
2020-06-11 16:43   ` Richard Henderson
2020-06-11 16:45   ` Richard Henderson
2020-06-11 14:45 ` [PATCH 10/10] target/arm: Convert Neon VDUP (scalar) " Peter Maydell
2020-06-11 16:48   ` Richard Henderson
2020-06-11 23:16 ` [PATCH 00/10] target/arm: Convert 2-reg-scalar " no-reply
2020-06-11 23:42 ` no-reply

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=CAFEAcA-xw6pHejLVjUze1UWwBpygNWjam_KNOCyfthL-3vYDBQ@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.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).