[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 16/29] tcg: pass down TranslationBlock to tcg_code_ge
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 16/29] tcg: pass down TranslationBlock to tcg_code_gen |
Date: |
Tue, 22 Mar 2016 15:16:56 +0100 |
From: Alex Bennée <address@hidden>
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 <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
tcg/tcg.c | 6 +++---
tcg/tcg.h | 2 +-
translate-all.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 4c8c2d2..f1f1640 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);
diff --git a/tcg/tcg.h b/tcg/tcg.h
index b83f763..40c8fbe 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -636,7 +636,7 @@ void tcg_context_init(TCGContext *s);
void tcg_prologue_init(TCGContext *s);
void tcg_func_start(TCGContext *s);
-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);
diff --git a/translate-all.c b/translate-all.c
index e9f409b..b3207fe 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -1120,7 +1120,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
the tcg optimization currently hidden inside tcg_gen_code. All
that should be required is to flush the TBs, allocate a new TB,
re-initialize it per above, and re-do the actual code generation. */
- gen_code_size = tcg_gen_code(&tcg_ctx, gen_code_buf);
+ gen_code_size = tcg_gen_code(&tcg_ctx, tb);
if (unlikely(gen_code_size < 0)) {
goto buffer_overflow;
}
--
2.5.0
- [Qemu-devel] [PULL 07/29] hw/pci/pci.h: Don't include qemu-common.h, (continued)
- [Qemu-devel] [PULL 07/29] hw/pci/pci.h: Don't include qemu-common.h, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 09/29] Move QEMU_ALIGN_*() from qemu-common.h to qemu/osdep.h, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 11/29] isa: Move DMA_transfer_handler from qemu-common.h to hw/isa/isa.h, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 05/29] include/qemu/iov.h: Don't include qemu-common.h, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 06/29] include/hw/hw.h: Don't include qemu-common.h, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 10/29] Move ParallelIOArg from qemu-common.h to sysemu/char.h, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 12/29] include/crypto: Include qapi-types.h or qemu/bswap.h instead of qemu-common.h, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 13/29] hw: explicitly include qemu-common.h and cpu.h, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 01/29] include/qemu/osdep.h: Don't include qapi/error.h, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 14/29] Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 16/29] tcg: pass down TranslationBlock to tcg_code_gen,
Paolo Bonzini <=
- [Qemu-devel] [PULL 21/29] qemu-log: dfilter-ise exec, out_asm, op and opt_op, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 18/29] qemu-log: Avoid function call for disabled qemu_log_mask logging, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 20/29] qemu-log: new option -dfilter to limit output, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 19/29] qemu-log: Improve the "exec" TB execution logging, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 17/29] qemu-log: correct help text for -d cpu, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 23/29] qemu-log: support simple pid substitution for logs, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 22/29] target-arm: dfilter support for in_asm, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 26/29] char: translate from QIOChannel error to errno, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 15/29] util: move declarations out of qemu-common.h, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 25/29] exec: fix error handling in file_ram_alloc, Paolo Bonzini, 2016/03/22