[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 63/80] tcg: Add addr_type to TCGContext
From: |
Richard Henderson |
Subject: |
[PULL 63/80] tcg: Add addr_type to TCGContext |
Date: |
Tue, 16 May 2023 12:41:28 -0700 |
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>
---
include/tcg/tcg.h | 1 +
accel/tcg/translate-all.c | 2 ++
tcg/tcg.c | 3 +++
3 files changed, 6 insertions(+)
diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h
index 42a3c05607..b9748fd0c5 100644
--- a/include/tcg/tcg.h
+++ b/include/tcg/tcg.h
@@ -558,6 +558,7 @@ struct TCGContext {
int nb_temps;
int nb_indirects;
int nb_ops;
+ TCGType addr_type; /* TCG_TYPE_I32 or TCG_TYPE_I64 */
TCGRegSet reserved_regs;
intptr_t current_frame_offset;
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index 7b7d9a5fff..99a9d0e34f 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -356,6 +356,8 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
tb_set_page_addr0(tb, phys_pc);
tb_set_page_addr1(tb, -1);
tcg_ctx->gen_tb = tb;
+ tcg_ctx->addr_type = TCG_TYPE_TL;
+
tb_overflow:
#ifdef CONFIG_PROFILER
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 800dcba159..dfe5dde63d 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1520,6 +1520,9 @@ void tcg_func_start(TCGContext *s)
QTAILQ_INIT(&s->ops);
QTAILQ_INIT(&s->free_ops);
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)
--
2.34.1
- [PULL 50/80] tcg/aarch64: Support 128-bit load/store, (continued)
- [PULL 50/80] tcg/aarch64: Support 128-bit load/store, Richard Henderson, 2023/05/16
- [PULL 58/80] tcg: Widen tcg_gen_code pc_start argument to uint64_t, Richard Henderson, 2023/05/16
- [PULL 49/80] tcg/aarch64: Rename temporaries, Richard Henderson, 2023/05/16
- [PULL 51/80] tcg/ppc: Support 128-bit load/store, Richard Henderson, 2023/05/16
- [PULL 55/80] accel/tcg: Widen tcg-ldst.h addresses to uint64_t, Richard Henderson, 2023/05/16
- [PULL 54/80] tcg: Widen gen_insn_data to uint64_t, Richard Henderson, 2023/05/16
- [PULL 57/80] tcg: Widen helper_atomic_* addresses to uint64_t, Richard Henderson, 2023/05/16
- [PULL 59/80] accel/tcg: Merge gen_mem_wrapped with plugin_gen_empty_mem_callback, Richard Henderson, 2023/05/16
- [PULL 70/80] tcg/i386: Adjust type of tlb_mask, Richard Henderson, 2023/05/16
- [PULL 53/80] tcg: Split out memory ops to tcg-op-ldst.c, Richard Henderson, 2023/05/16
- [PULL 63/80] tcg: Add addr_type to TCGContext,
Richard Henderson <=
- [PULL 66/80] tcg: Split INDEX_op_qemu_{ld, st}* for guest address size, Richard Henderson, 2023/05/16
- [PULL 72/80] tcg/arm: Remove TARGET_LONG_BITS, Richard Henderson, 2023/05/16
- [PULL 73/80] tcg/aarch64: Remove USE_GUEST_BASE, Richard Henderson, 2023/05/16
- [PULL 76/80] tcg/mips: Remove TARGET_LONG_BITS, TCG_TYPE_TL, Richard Henderson, 2023/05/16
- [PULL 67/80] tcg/tci: Elimnate TARGET_LONG_BITS, target_ulong, Richard Henderson, 2023/05/16
- [PULL 78/80] tcg: Add page_bits and page_mask to TCGContext, Richard Henderson, 2023/05/16
- [PULL 77/80] tcg: Remove TARGET_LONG_BITS, TCG_TYPE_TL, Richard Henderson, 2023/05/16
- [PULL 60/80] accel/tcg: Merge do_gen_mem_cb into caller, Richard Henderson, 2023/05/16
- [PULL 62/80] accel/tcg: Widen plugin_gen_empty_mem_callback to i64, Richard Henderson, 2023/05/16