tcg: Use tcg_constant_i32 in tcg_gen_io_start
authorRichard Henderson <richard.henderson@linaro.org>
Sat, 25 Feb 2023 00:53:35 +0000 (14:53 -1000)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 1 Mar 2023 17:33:27 +0000 (07:33 -1000)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
include/exec/gen-icount.h

index 166170b08ebbbd8f295516e5f4d3ed12830f165c..5b1794188fc8fe5bcc731c148dfe8475d2b8706c 100644 (file)
@@ -9,11 +9,9 @@ static TCGOp *icount_start_insn;
 
 static inline void gen_io_start(void)
 {
-    TCGv_i32 tmp = tcg_const_i32(1);
-    tcg_gen_st_i32(tmp, cpu_env,
+    tcg_gen_st_i32(tcg_constant_i32(1), cpu_env,
                    offsetof(ArchCPU, parent_obj.can_do_io) -
                    offsetof(ArchCPU, env));
-    tcg_temp_free_i32(tmp);
 }
 
 static inline void gen_tb_start(const TranslationBlock *tb)