[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 13/27] accel/tcg/plugin: Tidy plugin_gen_disable_mem_helpers
From: |
Richard Henderson |
Subject: |
[PATCH 13/27] accel/tcg/plugin: Tidy plugin_gen_disable_mem_helpers |
Date: |
Mon, 30 Jan 2023 10:59:21 -1000 |
Here we are creating a temp whose value needs to be replaced,
but always storing NULL into CPUState.plugin_mem_cbs.
Use tcg_constant_ptr(0) explicitly.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
accel/tcg/plugin-gen.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c
index ea875c0990..ae2dbd7ad0 100644
--- a/accel/tcg/plugin-gen.c
+++ b/accel/tcg/plugin-gen.c
@@ -628,16 +628,13 @@ static void inject_mem_disable_helper(struct
qemu_plugin_insn *plugin_insn,
/* called before finishing a TB with exit_tb, goto_tb or goto_ptr */
void plugin_gen_disable_mem_helpers(void)
{
- TCGv_ptr ptr;
-
if (likely(tcg_ctx->plugin_insn == NULL ||
!tcg_ctx->plugin_insn->mem_helper)) {
return;
}
- ptr = tcg_const_ptr(NULL);
- tcg_gen_st_ptr(ptr, cpu_env, offsetof(CPUState, plugin_mem_cbs) -
- offsetof(ArchCPU, env));
- tcg_temp_free_ptr(ptr);
+
+ tcg_gen_st_ptr(tcg_constant_ptr(NULL), cpu_env,
+ offsetof(CPUState, plugin_mem_cbs) - offsetof(ArchCPU,
env));
tcg_ctx->plugin_insn->mem_helper = false;
}
--
2.34.1
- Re: [PATCH 08/27] tcg: Pass TCGTempKind to tcg_temp_new_internal, (continued)
- [PATCH 09/27] tcg: Add tcg_temp_ebb_new_{i32,i64,ptr}, Richard Henderson, 2023/01/30
- [PATCH 04/27] tcg: Remove branch-to-next regardless of reference count, Richard Henderson, 2023/01/30
- [PATCH 10/27] tcg: Add tcg_gen_movi_ptr, Richard Henderson, 2023/01/30
- [PATCH 07/27] tcg: Remove TEMP_NORMAL, Richard Henderson, 2023/01/30
- [PATCH 16/27] target/arm: Drop copies in gen_sve_{ldr,str}, Richard Henderson, 2023/01/30
- [PATCH 15/27] tcg: Change default temp lifetime to TEMP_TB, Richard Henderson, 2023/01/30
- [PATCH 13/27] accel/tcg/plugin: Tidy plugin_gen_disable_mem_helpers,
Richard Henderson <=
- [PATCH 11/27] tcg: Use tcg_temp_ebb_new_* in tcg/, Richard Henderson, 2023/01/30
- [PATCH 14/27] tcg: Don't re-use TEMP_TB temporaries, Richard Henderson, 2023/01/30
- [PATCH 19/27] target/hexagon: Don't use tcg_temp_local_new_*, Richard Henderson, 2023/01/30
- [PATCH 21/27] target/i386: Don't use tcg_temp_local_new, Richard Henderson, 2023/01/30
- [PATCH 22/27] target/mips: Don't use tcg_temp_local_new, Richard Henderson, 2023/01/30
- [PATCH 25/27] exec/gen-icount: Don't use tcg_temp_local_new_i32, Richard Henderson, 2023/01/30