From: Matthieu Bucchianeri Date: Mon, 27 Jul 2020 17:21:14 +0000 (-0700) Subject: target/ppc: Fix TCG leak with the evmwsmiaa instruction X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6d592c557e2d7131585ea7f6a3f214aba71e8776;p=qemu.git target/ppc: Fix TCG leak with the evmwsmiaa instruction 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 Message-Id: <20200727172114.31415-1-matthieu.bucchianeri@leostella.com> Reviewed-by: Richard Henderson Signed-off-by: David Gibson --- 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 @@ -531,8 +531,8 @@ static inline void gen_evmwsmia(DisasContext *ctx) 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 */