summaryrefslogtreecommitdiff
path: root/tcg/tcg.c
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2016-03-15 14:30:16 +0000
committerPaolo Bonzini <pbonzini@redhat.com>2016-03-22 22:20:17 +0100
commit5bd2ec3d7b47b2252745882795d79aef36380fb7 (patch)
tree1a53273d4cc4559a10650d1dd81ea519e34c6a4b /tcg/tcg.c
parentf348b6d1a53e5271cf1c9f9acc4646b4b98c1771 (diff)
downloadqemu-5bd2ec3d7b47b2252745882795d79aef36380fb7.tar.gz
qemu-5bd2ec3d7b47b2252745882795d79aef36380fb7.tar.bz2
qemu-5bd2ec3d7b47b2252745882795d79aef36380fb7.zip
tcg: pass down TranslationBlock to tcg_code_gen
My later debugging patches need access to the origin PC which is held in the TranslationBlock structure. Pass down the whole structure as it also holds the information about the code start point. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Message-Id: <1458052224-9316-3-git-send-email-alex.bennee@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tcg/tcg.c')
-rw-r--r--tcg/tcg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 4c8c2d2991..f1f1640c9b 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -2328,7 +2328,7 @@ void tcg_dump_op_count(FILE *f, fprintf_function cpu_fprintf)
#endif
-int tcg_gen_code(TCGContext *s, tcg_insn_unit *gen_code_buf)
+int tcg_gen_code(TCGContext *s, TranslationBlock *tb)
{
int i, oi, oi_next, num_insns;
@@ -2387,8 +2387,8 @@ int tcg_gen_code(TCGContext *s, tcg_insn_unit *gen_code_buf)
tcg_reg_alloc_start(s);
- s->code_buf = gen_code_buf;
- s->code_ptr = gen_code_buf;
+ s->code_buf = tb->tc_ptr;
+ s->code_ptr = tb->tc_ptr;
tcg_out_tb_init(s);