]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
target/mips: Fix TCG temporary leak in gen_cache_operation()
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Tue, 6 Apr 2021 20:26:21 +0000 (22:26 +0200)
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>
Tue, 13 Apr 2021 10:07:00 +0000 (12:07 +0200)
Fix a TCG temporary leak when translating CACHE opcode.

Fixes: 0d74a222c27 ("make ITC Configuration Tags accessible to the CPU")
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210406202857.1440744-1-f4bug@amsat.org>

target/mips/translate.c

index c518bf3963b67c2bd38a25dd17a3ee2d73567bda..71fa5ec19739ed14554aa99b7cd0508cfd7523db 100644 (file)
@@ -12804,6 +12804,8 @@ static void gen_cache_operation(DisasContext *ctx, uint32_t op, int base,
     TCGv t1 = tcg_temp_new();
     gen_base_offset_addr(ctx, t1, base, offset);
     gen_helper_cache(cpu_env, t1, t0);
+    tcg_temp_free(t1);
+    tcg_temp_free_i32(t0);
 }
 
 #if defined(TARGET_MIPS64)