[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 21/22] plugins: Inline plugin_gen_empty_callback
From: |
Richard Henderson |
Subject: |
[PATCH 21/22] plugins: Inline plugin_gen_empty_callback |
Date: |
Fri, 15 Mar 2024 15:57:19 -1000 |
Each caller can use tcg_gen_plugin_cb directly.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
accel/tcg/plugin-gen.c | 19 +++----------------
1 file changed, 3 insertions(+), 16 deletions(-)
diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c
index 70914c3bf8..fd52ea3987 100644
--- a/accel/tcg/plugin-gen.c
+++ b/accel/tcg/plugin-gen.c
@@ -67,19 +67,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)
{
@@ -369,7 +356,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;
@@ -426,12 +413,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);
}
/*
--
2.34.1
- [PATCH 13/22] tcg: Remove TCG_CALL_PLUGIN, (continued)
- [PATCH 13/22] tcg: Remove TCG_CALL_PLUGIN, Richard Henderson, 2024/03/15
- [PATCH 14/22] tcg: Remove INDEX_op_plugin_cb_{start,end}, Richard Henderson, 2024/03/15
- [PATCH 18/22] plugins: Split out common cb expanders, Richard Henderson, 2024/03/15
- [PATCH 19/22] plugins: Merge qemu_plugin_tb_insn_get to plugin-gen.c, Richard Henderson, 2024/03/15
- [PATCH 20/22] plugins: Move qemu_plugin_insn_cleanup_fn to tcg.c, Richard Henderson, 2024/03/15
- [PATCH 21/22] plugins: Inline plugin_gen_empty_callback,
Richard Henderson <=
- [PATCH 22/22] plugins: Update the documentation block for plugin-gen.c, Richard Henderson, 2024/03/15
- [PATCH 16/22] plugins: Introduce PLUGIN_CB_MEM_REGULAR, Richard Henderson, 2024/03/15
- [PATCH 17/22] plugins: Replace pr_ops with a proper debug dump flag, Richard Henderson, 2024/03/15
- [PATCH 15/22] plugins: Simplify callback queues, Richard Henderson, 2024/03/15
- Re: [PATCH 00/22] plugins: Rewrite plugin code generation, Pierrick Bouvier, 2024/03/19