aboutsummaryrefslogtreecommitdiff
path: root/accel/tcg/plugin-gen.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2024-03-14 19:41:40 -1000
committerRichard Henderson <richard.henderson@linaro.org>2024-04-30 16:12:05 -0700
commit5c48b011bb417627752031cb67e4f2652d7cd378 (patch)
tree5ccd21af9946adb6b17eccf9be4a4fd67b5a070c /accel/tcg/plugin-gen.c
parent5e379b08bceb04631401fda674c4c9f7ab1e3f94 (diff)
downloadqemu-5c48b011bb417627752031cb67e4f2652d7cd378.zip
qemu-5c48b011bb417627752031cb67e4f2652d7cd378.tar.gz
qemu-5c48b011bb417627752031cb67e4f2652d7cd378.tar.bz2
plugins: Inline plugin_gen_empty_callback
Each caller can use tcg_gen_plugin_cb directly. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'accel/tcg/plugin-gen.c')
-rw-r--r--accel/tcg/plugin-gen.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c
index c0cbc26..d914d64 100644
--- a/accel/tcg/plugin-gen.c
+++ b/accel/tcg/plugin-gen.c
@@ -60,19 +60,6 @@ enum plugin_gen_from {
PLUGIN_GEN_AFTER_TB,
};
-static void plugin_gen_empty_callback(enum plugin_gen_from from)
-{
- switch (from) {
- case PLUGIN_GEN_AFTER_INSN:
- case PLUGIN_GEN_FROM_TB:
- case PLUGIN_GEN_FROM_INSN:
- tcg_gen_plugin_cb(from);
- break;
- default:
- g_assert_not_reached();
- }
-}
-
/* called before finishing a TB with exit_tb, goto_tb or goto_ptr */
void plugin_gen_disable_mem_helpers(void)
{
@@ -362,7 +349,7 @@ bool plugin_gen_tb_start(CPUState *cpu, const DisasContextBase *db,
ptb->mem_only = mem_only;
ptb->mem_helper = false;
- plugin_gen_empty_callback(PLUGIN_GEN_FROM_TB);
+ tcg_gen_plugin_cb(PLUGIN_GEN_FROM_TB);
}
tcg_ctx->plugin_insn = NULL;
@@ -419,12 +406,12 @@ void plugin_gen_insn_start(CPUState *cpu, const DisasContextBase *db)
insn->haddr = ptb->haddr2 + pc - ptb->vaddr2;
}
- plugin_gen_empty_callback(PLUGIN_GEN_FROM_INSN);
+ tcg_gen_plugin_cb(PLUGIN_GEN_FROM_INSN);
}
void plugin_gen_insn_end(void)
{
- plugin_gen_empty_callback(PLUGIN_GEN_AFTER_INSN);
+ tcg_gen_plugin_cb(PLUGIN_GEN_AFTER_INSN);
}
/*