[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 32/52] exec-all: Widen TranslationBlock pc and cs_base to 64-bits
From: |
Richard Henderson |
Subject: |
[PULL 32/52] exec-all: Widen TranslationBlock pc and cs_base to 64-bits |
Date: |
Mon, 5 Jun 2023 13:15:28 -0700 |
This makes TranslationBlock agnostic to the address size of the guest.
Use vaddr for pc, since that's always a virtual address.
Use uint64_t for cs_base, since usage varies between guests.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/exec/exec-all.h | 4 ++--
accel/tcg/cpu-exec.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index ec0902c532..dec17b1e62 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -516,7 +516,7 @@ struct TranslationBlock {
* Unwind information is taken as offsets from the page, to be
* deposited into the "current" PC.
*/
- target_ulong pc;
+ vaddr pc;
/*
* Target-specific data associated with the TranslationBlock, e.g.:
@@ -525,7 +525,7 @@ struct TranslationBlock {
* s390x: instruction data for EXECUTE,
* sparc: the next pc of the instruction queue (for delay slots).
*/
- target_ulong cs_base;
+ uint64_t cs_base;
uint32_t flags; /* flags defining in which context the code was generated
*/
uint32_t cflags; /* compile flags */
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 60ca9e229e..1cf4f1fa22 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -297,7 +297,7 @@ static void log_cpu_exec(target_ulong pc, CPUState *cpu,
{
if (qemu_log_in_addr_range(pc)) {
qemu_log_mask(CPU_LOG_EXEC,
- "Trace %d: %p [" TARGET_FMT_lx
+ "Trace %d: %p [%08" PRIx64
"/" TARGET_FMT_lx "/%08x/%08x] %s\n",
cpu->cpu_index, tb->tc.ptr, tb->cs_base, pc,
tb->flags, tb->cflags, lookup_symbol(pc));
--
2.34.1
- [PULL 12/52] target/arm: Fix test of TCG_OVERSIZED_GUEST, (continued)
- [PULL 12/52] target/arm: Fix test of TCG_OVERSIZED_GUEST, Richard Henderson, 2023/06/05
- [PULL 14/52] tcg: Move TCGv, dup_const_tl definitions to tcg-op.h, Richard Henderson, 2023/06/05
- [PULL 18/52] tcg: Remove outdated comments in helper-head.h, Richard Henderson, 2023/06/05
- [PULL 17/52] target/hexagon: Include helper-gen.h where needed, Richard Henderson, 2023/06/05
- [PULL 16/52] target/arm: Include helper-gen.h in translator.h, Richard Henderson, 2023/06/05
- [PULL 19/52] tcg: Move TCGHelperInfo and dependencies to tcg/helper-info.h, Richard Henderson, 2023/06/05
- [PULL 21/52] tcg: Move temp_idx and tcgv_i32_temp debug out of line, Richard Henderson, 2023/06/05
- [PULL 25/52] target/sh4: Emit insn_start for each insn in gUSA region, Richard Henderson, 2023/06/05
- [PULL 26/52] tcg: Add insn_start_words to TCGContext, Richard Henderson, 2023/06/05
- [PULL 27/52] tcg: Add guest_mo to TCGContext, Richard Henderson, 2023/06/05
- [PULL 32/52] exec-all: Widen TranslationBlock pc and cs_base to 64-bits,
Richard Henderson <=
- [PULL 24/52] tcg: Split helper-proto.h, Richard Henderson, 2023/06/05
- [PULL 28/52] tcg: Move TLB_FLAGS_MASK check out of get_alignment_bits, Richard Henderson, 2023/06/05
- [PULL 29/52] tcg: Split tcg/tcg-op-gvec.h, Richard Henderson, 2023/06/05
- [PULL 35/52] accel/tcg: Move most of gen-icount.h into translator.c, Richard Henderson, 2023/06/05
- [PULL 33/52] tcg: Spit out exec/translation-block.h, Richard Henderson, 2023/06/05
- [PULL 31/52] exec-all: Widen tb_page_addr_t for user-only, Richard Henderson, 2023/06/05
- [PULL 30/52] tcg: Remove NO_CPU_IO_DEFS, Richard Henderson, 2023/06/05
- [PULL 23/52] tcg: Split helper-gen.h, Richard Henderson, 2023/06/05
- [PULL 15/52] tcg: Split tcg/tcg-op-common.h from tcg/tcg-op.h, Richard Henderson, 2023/06/05
- [PULL 34/52] include/exec: Remove CODE_GEN_AVG_BLOCK_SIZE, Richard Henderson, 2023/06/05