[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 30/48] target/m68k: prepare for 2-pass translation
From: |
Emilio G. Cota |
Subject: |
[Qemu-devel] [RFC 30/48] target/m68k: prepare for 2-pass translation |
Date: |
Thu, 25 Oct 2018 13:20:39 -0400 |
Signed-off-by: Emilio G. Cota <address@hidden>
---
target/m68k/translate.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index dd7d868b25..9b5a4b1eb5 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -116,6 +116,7 @@ typedef struct DisasContext {
int done_mac;
int writeback_mask;
TCGv writeback[8];
+ struct qemu_plugin_insn *plugin_insn;
#define MAX_TO_RELEASE 8
int release_count;
TCGv release[MAX_TO_RELEASE];
@@ -375,6 +376,7 @@ static inline uint16_t read_im16(CPUM68KState *env,
DisasContext *s)
uint16_t im;
im = cpu_lduw_code(env, s->pc);
s->pc += 2;
+ qemu_plugin_insn_append(s->plugin_insn, &im, sizeof(im));
return im;
}
@@ -6092,7 +6094,10 @@ static void m68k_tr_translate_insn(DisasContextBase
*dcbase, CPUState *cpu,
{
DisasContext *dc = container_of(dcbase, DisasContext, base);
CPUM68KState *env = cpu->env_ptr;
- uint16_t insn = read_im16(env, dc);
+ uint16_t insn;
+
+ dc->plugin_insn = plugin_insn;
+ insn = read_im16(env, dc);
opcode_table[insn](env, dc, insn);
do_writebacks(dc);
@@ -6167,6 +6172,8 @@ static const TranslatorOps m68k_tr_ops = {
.translate_insn = m68k_tr_translate_insn,
.tb_stop = m68k_tr_tb_stop,
.disas_log = m68k_tr_disas_log,
+ .ctx_base_offset = offsetof(DisasContext, base),
+ .ctx_size = sizeof(DisasContext),
};
void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb)
--
2.17.1
- [Qemu-devel] [RFC 00/48] Plugin support, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 37/48] target/openrisc: prepare for 2-pass translation, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 45/48] plugin: lockstep execution support, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 29/48] target/hppa: prepare for 2-pass translation, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 21/48] *-user: plugin syscalls, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 46/48] plugin: add plugin-chan PCI device, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 44/48] cpus: lockstep execution support, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 36/48] target/xtensa: prepare for 2-pass translation, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 42/48] vl: support -plugin option, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 33/48] target/riscv: prepare for 2-pass translation, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 30/48] target/m68k: prepare for 2-pass translation,
Emilio G. Cota <=
- [Qemu-devel] [RFC 35/48] target/sparc: prepare for 2-pass translation, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 41/48] configure: add --enable-plugins, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 38/48] translator: implement 2-pass translation, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 27/48] target/sh4: prepare for 2-pass translation (WIP), Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 22/48] cpu: hook plugin vcpu events, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 28/48] target/i386: prepare for 2-pass translation, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 39/48] plugin: add API symbols to qemu-plugins.symbols, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 18/48] tcg: add memory callbacks for plugins (WIP), Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 10/48] exec: export do_tb_flush, Emilio G. Cota, 2018/10/25