qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <huth@tuxfamily.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Richard Henderson <richard.henderson@linaro.org>,
	Joaquin de Andres <me@xcancerberox.com.ar>,
	Michael Rolnik <mrolnik@gmail.com>,
	qemu-devel@nongnu.org, Sarah Harris <S.E.Harris@kent.ac.uk>
Subject: Re: [PATCH v2 2/4] target/avr/cpu: Fix $PC displayed address
Date: Tue, 7 Jul 2020 10:22:04 +0200	[thread overview]
Message-ID: <20200707102204.10d63988@thl530.multi.box> (raw)
In-Reply-To: <20200707070021.10031-3-f4bug@amsat.org>

Am Tue,  7 Jul 2020 09:00:19 +0200
schrieb Philippe Mathieu-Daudé <f4bug@amsat.org>:

> $PC is 16-bit wide. Other registers display addresses on a byte
> granularity.
> To have a coherent ouput, display $PC using byte granularity too.
> 
> Signed-off-by: Philippe Mathieu-Daudé <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 50fb1c378b..9be464991f 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);
>      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);

Reviewed-by: Thomas Huth <huth@tuxfamily.org>


  reply	other threads:[~2020-07-07  8:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-07  7:00 [PATCH v2 0/4] target/avr: Few fixes Philippe Mathieu-Daudé
2020-07-07  7:00 ` [PATCH v2 1/4] target/avr/cpu: Drop tlb_flush() in avr_cpu_reset() Philippe Mathieu-Daudé
2020-07-07  8:21   ` Thomas Huth
2020-07-07 16:34   ` Richard Henderson
2020-07-07  7:00 ` [PATCH v2 2/4] target/avr/cpu: Fix $PC displayed address Philippe Mathieu-Daudé
2020-07-07  8:22   ` Thomas Huth [this message]
2020-07-07 16:34   ` Richard Henderson
2020-07-07  7:00 ` [PATCH v2 3/4] target/avr/disas: Fix store instructions display order Philippe Mathieu-Daudé
2020-07-07 16:35   ` Richard Henderson
2020-07-07  7:00 ` [RFC PATCH v2 4/4] target/avr/translate: Fix SBRC/SBRS instructions Philippe Mathieu-Daudé
2020-07-07 16:34   ` Richard Henderson
2020-07-07 16:58     ` Philippe Mathieu-Daudé
2020-07-10 18:25       ` Richard Henderson
2020-07-07 17:58 ` [PATCH v2 0/4] target/avr: Few fixes Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200707102204.10d63988@thl530.multi.box \
    --to=huth@tuxfamily.org \
    --cc=S.E.Harris@kent.ac.uk \
    --cc=f4bug@amsat.org \
    --cc=me@xcancerberox.com.ar \
    --cc=mrolnik@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).