[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 60/84] exec-all: Widen TranslationBlock pc and cs_base to 64-bits
|
From: |
Richard Henderson |
|
Subject: |
[PATCH 60/84] exec-all: Widen TranslationBlock pc and cs_base to 64-bits |
|
Date: |
Wed, 3 May 2023 08:23:07 +0100 |
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.
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 8c8526d9f8..58ac1a91c2 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -519,7 +519,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.:
@@ -528,7 +528,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 bc0e1c3299..9fe07c31fb 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -302,7 +302,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
- [PATCH 49/84] tcg: Pass TCGHelperInfo to tcg_gen_callN, (continued)
- [PATCH 49/84] tcg: Pass TCGHelperInfo to tcg_gen_callN, Richard Henderson, 2023/05/03
- [PATCH 56/84] tcg: Move TLB_FLAGS_MASK check out of get_alignment_bits, Richard Henderson, 2023/05/03
- [PATCH 64/84] include/exec: Remove CODE_GEN_AVG_BLOCK_SIZE, Richard Henderson, 2023/05/03
- [PATCH 61/84] tcg: Remove DEBUG_DISAS, Richard Henderson, 2023/05/03
- [PATCH 72/84] accel/tcg: Tidy includes for translator.[ch], Richard Henderson, 2023/05/03
- [PATCH 73/84] tcg: Define IN_TCG, Richard Henderson, 2023/05/03
- [PATCH 76/84] tcg: Remove target-specific headers from tcg.[ch], Richard Henderson, 2023/05/03
- [PATCH 70/84] *: Add missing includes of exec/translation-block.h, Richard Henderson, 2023/05/03
- [PATCH 66/84] accel/tcg: Introduce translator_io_start, Richard Henderson, 2023/05/03
- [PATCH 58/84] tcg: Remove NO_CPU_IO_DEFS, Richard Henderson, 2023/05/03
- [PATCH 60/84] exec-all: Widen TranslationBlock pc and cs_base to 64-bits,
Richard Henderson <=
- [PATCH 71/84] *: Add missing includes of exec/exec-all.h, Richard Henderson, 2023/05/03
- [PATCH 74/84] tcg: Fix PAGE/PROT confusion, Richard Henderson, 2023/05/03
- [PATCH 75/84] tcg: Move env defines out of NEED_CPU_H in helper-head.h, Richard Henderson, 2023/05/03
- [PATCH 77/84] plugins: Move plugin_insn_append to translator.c, Richard Henderson, 2023/05/03
- [PATCH 78/84] plugins: Drop unused headers from exec/plugin-gen.h, Richard Henderson, 2023/05/03
- [PATCH 79/84] disas: Move disas.c to disas/, Richard Henderson, 2023/05/03
- [PATCH 83/84] exec/poison: Do not poison CONFIG_SOFTMMU, Richard Henderson, 2023/05/03