diff mbox series

[PULL,09/32] target/i386: [tcg] Port to insn_start

Message ID 20170906160612.22769-10-richard.henderson@linaro.org
State Accepted
Commit 9d75f52b34053066b8e8fc37610d5f300d67538b
Headers show
Series tcg generic translate loop | expand

Commit Message

Richard Henderson Sept. 6, 2017, 4:05 p.m. UTC
From: Lluís Vilanova <vilanova@ac.upc.edu>


Incrementally paves the way towards using the generic instruction translation
loop.

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>

Reviewed-by: Emilio G. Cota <cota@braap.org>

Reviewed-by: Richard Henderson <rth@twiddle.net>

Reviewed-by: Alex Benneé <alex.benee@linaro.org>

Message-Id: <150002146647.22386.13380064201042141261.stgit@frigg.lan>
Signed-off-by: Richard Henderson <rth@twiddle.net>

---
 target/i386/translate.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

-- 
2.13.5
diff mbox series

Patch

diff --git a/target/i386/translate.c b/target/i386/translate.c
index 4281e9bc56..b7e5854513 100644
--- a/target/i386/translate.c
+++ b/target/i386/translate.c
@@ -8449,6 +8449,13 @@  static int i386_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cpu,
     return max_insns;
 }
 
+static void i386_tr_insn_start(DisasContextBase *dcbase, CPUState *cpu)
+{
+    DisasContext *dc = container_of(dcbase, DisasContext, base);
+
+    tcg_gen_insn_start(dc->base.pc_next, dc->cc_op);
+}
+
 /* generate intermediate code for basic block 'tb'.  */
 void gen_intermediate_code(CPUState *cs, TranslationBlock *tb)
 {
@@ -8476,7 +8483,7 @@  void gen_intermediate_code(CPUState *cs, TranslationBlock *tb)
     num_insns = 0;
     gen_tb_start(tb);
     for(;;) {
-        tcg_gen_insn_start(dc->base.pc_next, dc->cc_op);
+        i386_tr_insn_start(&dc->base, cs);
         num_insns++;
 
         /* If RF is set, suppress an internally generated breakpoint.  */