]> Git Repo - qemu.git/commitdiff
target/avr/cpu: Fix $PC displayed address
authorPhilippe Mathieu-Daudé <[email protected]>
Mon, 30 Mar 2020 09:30:27 +0000 (11:30 +0200)
committerPhilippe Mathieu-Daudé <[email protected]>
Sat, 11 Jul 2020 09:02:05 +0000 (11:02 +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 <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <20200707070021[email protected]>

target/avr/cpu.c

index 0cfc5f2e4bf22e110e1d2434ab4b2cfa0ad29c12..5d9c4ad5bff8a6cf4e46237246c30cda35b7fd2d 100644 (file)
@@ -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);
This page took 0.026494 seconds and 4 git commands to generate.