[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 36/48] target/xtensa: prepare for 2-pass translation
From: |
Emilio G. Cota |
Subject: |
[Qemu-devel] [RFC 36/48] target/xtensa: prepare for 2-pass translation |
Date: |
Thu, 25 Oct 2018 13:20:45 -0400 |
Signed-off-by: Emilio G. Cota <address@hidden>
---
target/xtensa/translate.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
index 14ab1c5ceb..83711f2a18 100644
--- a/target/xtensa/translate.c
+++ b/target/xtensa/translate.c
@@ -879,7 +879,8 @@ static inline unsigned xtensa_op0_insn_len(DisasContext
*dc, uint8_t op0)
return xtensa_isa_length_from_chars(dc->config->isa, &op0);
}
-static void disas_xtensa_insn(CPUXtensaState *env, DisasContext *dc)
+static void disas_xtensa_insn(CPUXtensaState *env, DisasContext *dc,
+ struct qemu_plugin_insn *plugin_insn)
{
xtensa_isa isa = dc->config->isa;
unsigned char b[MAX_INSN_LENGTH] = {cpu_ldub_code(env, dc->pc)};
@@ -916,6 +917,7 @@ static void disas_xtensa_insn(CPUXtensaState *env,
DisasContext *dc)
for (i = 1; i < len; ++i) {
b[i] = cpu_ldub_code(env, dc->pc + i);
}
+ qemu_plugin_insn_append(plugin_insn, b, len);
xtensa_insnbuf_from_chars(isa, dc->insnbuf, b, len);
fmt = xtensa_format_decode(isa, dc->insnbuf);
if (fmt == XTENSA_UNDEFINED) {
@@ -1183,7 +1185,7 @@ static void xtensa_tr_translate_insn(DisasContextBase
*dcbase, CPUState *cpu,
gen_ibreak_check(env, dc);
}
- disas_xtensa_insn(env, dc);
+ disas_xtensa_insn(env, dc, plugin_insn);
if (dc->icount) {
tcg_gen_mov_i32(cpu_SR[ICOUNT], dc->next_icount);
@@ -1241,6 +1243,8 @@ static const TranslatorOps xtensa_translator_ops = {
.translate_insn = xtensa_tr_translate_insn,
.tb_stop = xtensa_tr_tb_stop,
.disas_log = xtensa_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 <=
- [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, 2018/10/25
- [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