diff options
author | Edgar E. Iglesias <edgar.iglesias@xilinx.com> | 2016-05-12 13:22:26 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-05-12 13:22:26 +0100 |
commit | 1d41478fd428e01f057d3248292e4cdcdb048523 (patch) | |
tree | e6aeb32d404b3bbd59fa0111c7ee6f92175678c8 | |
parent | dddb5223413c5425ae6eaeb3b967627efc9675f7 (diff) |
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.
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1461931684-1867-2-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | tcg/tcg.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -595,6 +595,12 @@ struct TCGContext { extern TCGContext tcg_ctx; +static inline void tcg_set_insn_param(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(void) { |