qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] target/ppc: Fix TCG leak with the evmwsmiaa instruction


From: David Gibson
Subject: Re: [PATCH] target/ppc: Fix TCG leak with the evmwsmiaa instruction
Date: Tue, 28 Jul 2020 13:53:06 +1000

On Mon, Jul 27, 2020 at 10:21:14AM -0700, Matthieu Bucchianeri wrote:
> Fix double-call to tcg_temp_new_i64(), where a temp is allocated both at
> declaration time and further down the implementation of gen_evmwsmiaa().
> 
> Note that gen_evmwsmia() and gen_evmwsmiaa() are still not implemented
> correctly, as they invoke gen_evmwsmi() which may return early, but the
> return is not propagated. This will be fixed in my patch for bug #1888918.
> 
> Signed-off-by: Matthieu Bucchianeri
> <matthieu.bucchianeri@leostella.com>

Applied to ppc-for-5.1.  Note that since this isn't a regression, it's
not entirely clear it's a good candidate for 5.1 this late in the
freeze.  There's a possibility it will get punted to 5.2, therefore,
but for now I'm staging it for 5.1.

> ---
>  target/ppc/translate/spe-impl.inc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target/ppc/translate/spe-impl.inc.c 
> b/target/ppc/translate/spe-impl.inc.c
> index 36b4d5654d..42a0d1cffb 100644
> --- a/target/ppc/translate/spe-impl.inc.c
> +++ b/target/ppc/translate/spe-impl.inc.c
> @@ -528,14 +528,14 @@ static inline void gen_evmwsmia(DisasContext *ctx)
> 
>      tcg_temp_free_i64(tmp);
>  }
> 
>  static inline void gen_evmwsmiaa(DisasContext *ctx)
>  {
> -    TCGv_i64 acc = tcg_temp_new_i64();
> -    TCGv_i64 tmp = tcg_temp_new_i64();
> +    TCGv_i64 acc;
> +    TCGv_i64 tmp;
> 
>      gen_evmwsmi(ctx);           /* rD := rA * rB */
> 
>      acc = tcg_temp_new_i64();
>      tmp = tcg_temp_new_i64();
> 

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]