summaryrefslogtreecommitdiffstats
path: root/tcg
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2016-03-15 14:30:16 +0000
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:55:13 -0600
commit909151e55f97597790d4491e801fb40de3c3e9ba (patch)
treef373641c57cabe5d71c107b97153507765c92a90 /tcg
parent2c594eb97b17410fd65f3fed4af7355389ccb5b0 (diff)
downloadhqemu-909151e55f97597790d4491e801fb40de3c3e9ba.zip
hqemu-909151e55f97597790d4491e801fb40de3c3e9ba.tar.gz
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')
-rw-r--r--tcg/tcg.c6
-rw-r--r--tcg/tcg.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 453bc21..b876de0 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -2527,7 +2527,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;
@@ -2586,8 +2586,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);
diff --git a/tcg/tcg.h b/tcg/tcg.h
index f27060f..c3b37df 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -658,7 +658,7 @@ void tcg_context_init(TCGContext *s);
void tcg_prologue_init(TCGContext *s);
void tcg_func_start(TCGContext *s, TranslationBlock *tb);
-int tcg_gen_code(TCGContext *s, tcg_insn_unit *gen_code_buf);
+int tcg_gen_code(TCGContext *s, TranslationBlock *tb);
void tcg_set_frame(TCGContext *s, TCGReg reg, intptr_t start, intptr_t size);
OpenPOWER on IntegriCloud