mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-18 23:52:14 -06:00
tcg: Add addr_type to TCGContext
This will enable replacement of TARGET_LONG_BITS within tcg/. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
fcdab382c8
commit
4baf3978c0
3 changed files with 6 additions and 0 deletions
|
@ -356,6 +356,8 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
|
||||||
tb_set_page_addr0(tb, phys_pc);
|
tb_set_page_addr0(tb, phys_pc);
|
||||||
tb_set_page_addr1(tb, -1);
|
tb_set_page_addr1(tb, -1);
|
||||||
tcg_ctx->gen_tb = tb;
|
tcg_ctx->gen_tb = tb;
|
||||||
|
tcg_ctx->addr_type = TCG_TYPE_TL;
|
||||||
|
|
||||||
tb_overflow:
|
tb_overflow:
|
||||||
|
|
||||||
#ifdef CONFIG_PROFILER
|
#ifdef CONFIG_PROFILER
|
||||||
|
|
|
@ -558,6 +558,7 @@ struct TCGContext {
|
||||||
int nb_temps;
|
int nb_temps;
|
||||||
int nb_indirects;
|
int nb_indirects;
|
||||||
int nb_ops;
|
int nb_ops;
|
||||||
|
TCGType addr_type; /* TCG_TYPE_I32 or TCG_TYPE_I64 */
|
||||||
|
|
||||||
TCGRegSet reserved_regs;
|
TCGRegSet reserved_regs;
|
||||||
intptr_t current_frame_offset;
|
intptr_t current_frame_offset;
|
||||||
|
|
|
@ -1520,6 +1520,9 @@ void tcg_func_start(TCGContext *s)
|
||||||
QTAILQ_INIT(&s->ops);
|
QTAILQ_INIT(&s->ops);
|
||||||
QTAILQ_INIT(&s->free_ops);
|
QTAILQ_INIT(&s->free_ops);
|
||||||
QSIMPLEQ_INIT(&s->labels);
|
QSIMPLEQ_INIT(&s->labels);
|
||||||
|
|
||||||
|
tcg_debug_assert(s->addr_type == TCG_TYPE_I32 ||
|
||||||
|
s->addr_type == TCG_TYPE_I64);
|
||||||
}
|
}
|
||||||
|
|
||||||
static TCGTemp *tcg_temp_alloc(TCGContext *s)
|
static TCGTemp *tcg_temp_alloc(TCGContext *s)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue