[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 31/32] target/avr/cpu: Fix $PC displayed address
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 31/32] target/avr/cpu: Fix $PC displayed address |
Date: |
Tue, 7 Jul 2020 20:17:09 +0200 |
$PC is 16-bit wide. Other registers display addresses on a byte
granularity.
To have a coherent ouput, display $PC using byte granularity too.
Reviewed-by: Thomas Huth <huth@tuxfamily.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200707070021.10031-3-f4bug@amsat.org>
---
target/avr/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/avr/cpu.c b/target/avr/cpu.c
index f0f992aa32..f659bc10f5 100644
--- a/target/avr/cpu.c
+++ b/target/avr/cpu.c
@@ -151,7 +151,7 @@ static void avr_cpu_dump_state(CPUState *cs, FILE *f, int
flags)
int i;
qemu_fprintf(f, "\n");
- qemu_fprintf(f, "PC: %06x\n", env->pc_w);
+ qemu_fprintf(f, "PC: %06x\n", env->pc_w * 2); /* PC points to words */
qemu_fprintf(f, "SP: %04x\n", env->sp);
qemu_fprintf(f, "rampD: %02x\n", env->rampD >> 16);
qemu_fprintf(f, "rampX: %02x\n", env->rampX >> 16);
--
2.21.3
- [PULL 16/32] target/avr: Add instruction translation - CPU main translation function, (continued)
- [PULL 16/32] target/avr: Add instruction translation - CPU main translation function, Philippe Mathieu-Daudé, 2020/07/07
- [PULL 18/32] target/avr: Add support for disassembling via option '-d in_asm', Philippe Mathieu-Daudé, 2020/07/07
- [PULL 19/32] target/avr: Register AVR support with the rest of QEMU, Philippe Mathieu-Daudé, 2020/07/07
- [PULL 20/32] tests/machine-none: Add AVR support, Philippe Mathieu-Daudé, 2020/07/07
- [PULL 21/32] hw/char: avr: Add limited support for USART peripheral, Philippe Mathieu-Daudé, 2020/07/07
- [PULL 22/32] hw/timer: avr: Add limited support for 16-bit timer peripheral, Philippe Mathieu-Daudé, 2020/07/07
- [PULL 26/32] hw/avr: Add limited support for some Arduino boards, Philippe Mathieu-Daudé, 2020/07/07
- [PULL 24/32] hw/avr: Add support for loading ELF/raw binaries, Philippe Mathieu-Daudé, 2020/07/07
- [PULL 27/32] tests/boot-serial: Test some Arduino boards (AVR based), Philippe Mathieu-Daudé, 2020/07/07
- [PULL 23/32] hw/misc: avr: Add limited support for power reduction device, Philippe Mathieu-Daudé, 2020/07/07
- [PULL 31/32] target/avr/cpu: Fix $PC displayed address,
Philippe Mathieu-Daudé <=
- [PULL 32/32] target/avr/disas: Fix store instructions display order, Philippe Mathieu-Daudé, 2020/07/07
- [PULL 28/32] tests/acceptance: Test the Arduino MEGA2560 board, Philippe Mathieu-Daudé, 2020/07/07
- [PULL 29/32] target/avr: Add section into QEMU documentation, Philippe Mathieu-Daudé, 2020/07/07
- [PULL 25/32] hw/avr: Add some ATmega microcontrollers, Philippe Mathieu-Daudé, 2020/07/07
- [PULL 30/32] target/avr/cpu: Drop tlb_flush() in avr_cpu_reset(), Philippe Mathieu-Daudé, 2020/07/07
- Re: [PULL 00/32] AVR port, Peter Maydell, 2020/07/10