]> git.proxmox.com Git - mirror_qemu.git/commitdiff
exec-all: Widen TranslationBlock pc and cs_base to 64-bits
authorRichard Henderson <richard.henderson@linaro.org>
Sat, 1 Apr 2023 22:28:18 +0000 (15:28 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 5 Jun 2023 19:04:29 +0000 (12:04 -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>
accel/tcg/cpu-exec.c
include/exec/exec-all.h

index 60ca9e229e2976283e33ab8f29138063a6c98df6..1cf4f1fa227e93d0ba47f10e3e91c0bf999a5ecd 100644 (file)
@@ -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));
index ec0902c5325a00c16e10469c1b1c68bc5216b0e2..dec17b1e6219eb3d38afa91812cd804b91f4ccc7 100644 (file)
@@ -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 */