diff mbox series

[3/6] target/m68k: Fix a tcg_temp leak

Message ID 20190310003428.11723-4-f4bug@amsat.org (mailing list archive)
State New, archived
Headers show
Series target/m68k: Optimize few instructions using deposit/extraxt_i32() | expand

Commit Message

Philippe Mathieu-Daudé March 10, 2019, 12:34 a.m. UTC
The function gen_get_ccr() returns a tcg_temp created with
tcg_temp_new(). Free it with tcg_temp_free().

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
Laurent/Richard, feel free to squash this with the next patch, but
IMHO having it split as a previous step makes the next patch easier
to review.
---
 target/m68k/translate.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Richard Henderson March 11, 2019, 2:48 p.m. UTC | #1
On 3/9/19 4:34 PM, Philippe Mathieu-Daudé wrote:
> The function gen_get_ccr() returns a tcg_temp created with
> tcg_temp_new(). Free it with tcg_temp_free().
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> Laurent/Richard, feel free to squash this with the next patch, but
> IMHO having it split as a previous step makes the next patch easier
> to review.
> ---
>  target/m68k/translate.c | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
diff mbox series

Patch

diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index 55766fd7ef..ea95d55a11 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -2224,6 +2224,7 @@  static TCGv gen_get_sr(DisasContext *s)
     sr = tcg_temp_new();
     tcg_gen_andi_i32(sr, QREG_SR, 0xffe0);
     tcg_gen_or_i32(sr, sr, ccr);
+    tcg_temp_free(ccr);
     return sr;
 }