plugins: Use emit_before_op for PLUGIN_GEN_AFTER_INSN

Introduce a new plugin_cb op and migrate one operation.
By using emit_before_op, we do not need to emit opcodes
early and modify them later -- we can simply emit the
final set of opcodes once.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2024-03-14 07:09:57 -10:00
parent c7ba94836a
commit a0948bb78c
4 changed files with 50 additions and 31 deletions

View file

@ -312,6 +312,11 @@ void tcg_gen_mb(TCGBar mb_type)
}
}
void tcg_gen_plugin_cb(unsigned from)
{
tcg_gen_op1(INDEX_op_plugin_cb, from);
}
void tcg_gen_plugin_cb_start(unsigned from, unsigned type, unsigned wr)
{
tcg_gen_op3(INDEX_op_plugin_cb_start, from, type, wr);