diff options
author | Richard Henderson <rth@twiddle.net> | 2015-09-01 15:51:12 -0700 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2015-10-07 20:36:51 +1100 |
commit | bad729e272387de7dbfa3ec4319036552fc6c107 (patch) | |
tree | 94e36f4afab09565c1fe76e8500b4fc5620a2833 /tcg | |
parent | 190ce7fbc79fd0883a6170d7f30da59d366e6830 (diff) |
tcg: Pass data argument to restore_state_to_opc
The gen_opc_* arrays are already redundant with the data stored in
the insn_start arguments. Transition restore_state_to_opc to use
data from the latter.
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'tcg')
-rw-r--r-- | tcg/tcg.c | 11 | ||||
-rw-r--r-- | tcg/tcg.h | 2 |
2 files changed, 12 insertions, 1 deletions
@@ -2294,7 +2294,7 @@ static inline int tcg_gen_code_common(TCGContext *s, tcg_insn_unit *gen_code_buf, long search_pc) { - int oi, oi_next; + int i, oi, oi_next; #ifdef DEBUG_DISAS if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) { @@ -2361,6 +2361,15 @@ static inline int tcg_gen_code_common(TCGContext *s, tcg_reg_alloc_movi(s, args, dead_args, sync_args); break; case INDEX_op_insn_start: + for (i = 0; i < TARGET_INSN_START_WORDS; ++i) { + target_ulong a; +#if TARGET_LONG_BITS > TCG_TARGET_REG_BITS + a = ((target_ulong)args[i * 2 + 1] << 32) | args[i * 2]; +#else + a = args[i]; +#endif + s->gen_opc_data[i] = a; + } break; case INDEX_op_discard: temp_dead(s, args[0]); @@ -580,6 +580,8 @@ struct TCGContext { target_ulong gen_opc_pc[OPC_BUF_SIZE]; uint16_t gen_opc_icount[OPC_BUF_SIZE]; uint8_t gen_opc_instr_start[OPC_BUF_SIZE]; + + target_ulong gen_opc_data[TARGET_INSN_START_WORDS]; }; extern TCGContext tcg_ctx; |