@@ -74,6 +74,7 @@ typedef enum DisasJumpType {
* @singlestep_enabled: "Hardware" single stepping enabled.
* @saved_can_do_io: Known value of cpu->neg.can_do_io, or -1 for unknown.
* @plugin_enabled: TCG plugin enabled in this TB.
+ * @fake_insn: True if translator_fake_ldb used.
*
* Architecture-agnostic disassembly context.
*/
@@ -87,6 +88,7 @@ typedef struct DisasContextBase {
bool singlestep_enabled;
int8_t saved_can_do_io;
bool plugin_enabled;
+ bool fake_insn;
void *host_addr[2];
/*
@@ -141,6 +141,7 @@ void translator_loop(CPUState *cpu, TranslationBlock *tb, int *max_insns,
db->max_insns = *max_insns;
db->singlestep_enabled = cflags & CF_SINGLE_STEP;
db->saved_can_do_io = -1;
+ db->fake_insn = false;
db->host_addr[0] = host_pc;
db->host_addr[1] = NULL;
db->record_start = 0;
@@ -430,6 +431,7 @@ uint64_t translator_ldq(CPUArchState *env, DisasContextBase *db, vaddr pc)
void translator_fake_ldb(DisasContextBase *db, vaddr pc, uint8_t insn8)
{
assert(pc >= db->pc_first);
+ db->fake_insn = true;
record_save(db, pc, &insn8, sizeof(insn8));
plugin_insn_append(pc, &insn8, sizeof(insn8));
}
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- include/exec/translator.h | 2 ++ accel/tcg/translator.c | 2 ++ 2 files changed, 4 insertions(+)