From b9d100260950b4b84572e210bc815acf118a6fb3 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 18 Apr 2019 05:35:59 -0400 Subject: [PATCH] tcg-op: Make sure to free temporaries within gen_uc_tracecode() After the helper is generated, these are no longer needed and can be reclaimed. --- qemu/tcg/tcg-op.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qemu/tcg/tcg-op.h b/qemu/tcg/tcg-op.h index ce66b9d3..a38b1874 100644 --- a/qemu/tcg/tcg-op.h +++ b/qemu/tcg/tcg-op.h @@ -50,6 +50,10 @@ static inline void gen_uc_tracecode(TCGContext *tcg_ctx, int32_t size, int32_t t TCGv_ptr tuc = tcg_const_ptr(tcg_ctx, uc); TCGv_i64 tpc = tcg_const_i64(tcg_ctx, pc); gen_helper_uc_tracecode(tcg_ctx, tsize, ttype, tuc, tpc); + tcg_temp_free_i64(tcg_ctx, tpc); + tcg_temp_free_ptr(tcg_ctx, tuc); + tcg_temp_free_i32(tcg_ctx, ttype); + tcg_temp_free_i32(tcg_ctx, tsize); } static inline void tcg_gen_op1_i32(TCGContext *s, TCGOpcode opc, TCGv_i32 a1)