diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2021-05-15 12:42:02 +0200 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2021-05-16 09:05:14 -0500 |
commit | 6c6a4a76eea900112c343ba4f9c5737e298feddf (patch) | |
tree | 71cfa4093b4e5e2cf454a690978cfc27f40bb5e5 /accel | |
parent | 4d87fcddb54d801c7c1c9d83d17ab0a7d10b637f (diff) | |
download | qemu-6c6a4a76eea900112c343ba4f9c5737e298feddf.zip |
accel/tcg: Align data dumped at end of TB
To better visualize the data dumped at the end of a TB, left-align it
(padding it with 0). Print ".long" instead of ".quad" on 32-bit hosts.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210515104202.241504-1-f4bug@amsat.org>
[rth: Split the qemu_log and print .long for 32-bit hosts.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'accel')
-rw-r--r-- | accel/tcg/translate-all.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index ae7e873713..fbf8fc630b 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -2042,8 +2042,15 @@ TranslationBlock *tb_gen_code(CPUState *cpu, int i; qemu_log(" data: [size=%d]\n", data_size); for (i = 0; i < data_size / sizeof(tcg_target_ulong); i++) { - qemu_log("0x%08" PRIxPTR ": .quad 0x%" TCG_PRIlx "\n", - (uintptr_t)&rx_data_gen_ptr[i], rx_data_gen_ptr[i]); + if (sizeof(tcg_target_ulong) == 8) { + qemu_log("0x%08" PRIxPTR ": .quad 0x%016" TCG_PRIlx "\n", + (uintptr_t)&rx_data_gen_ptr[i], rx_data_gen_ptr[i]); + } else if (sizeof(tcg_target_ulong) == 4) { + qemu_log("0x%08" PRIxPTR ": .long 0x%08" TCG_PRIlx "\n", + (uintptr_t)&rx_data_gen_ptr[i], rx_data_gen_ptr[i]); + } else { + qemu_build_not_reached(); + } } } qemu_log("\n"); |