mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-23 06:25:12 +00:00
tcg: Add tcg_set_insn_param
Add tcg_set_insn_param as a mechanism to modify an insn parameter after emiting the insn. This is useful for icount and also for embedding fault information for a specific insn. Backports commit 1d41478fd428e01f057d3248292e4cdcdb048523 from qemu
This commit is contained in:
parent
98a6d44c54
commit
a30a478538
|
@ -853,6 +853,12 @@ struct TCGContext {
|
|||
TCGLabel *exitreq_label; // gen_tb_start()
|
||||
};
|
||||
|
||||
static inline void tcg_set_insn_param(TCGContext *tcg_ctx, int op_idx, int arg, TCGArg v)
|
||||
{
|
||||
int op_argi = tcg_ctx->gen_op_buf[op_idx].args;
|
||||
tcg_ctx->gen_opparam_buf[op_argi + arg] = v;
|
||||
}
|
||||
|
||||
/* The number of opcodes emitted so far. */
|
||||
static inline int tcg_op_buf_count(TCGContext *tcg_ctx)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue