qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Sandra Loosemore <sandra@codesourcery.com>, qemu-devel@nongnu.org
Cc: Marek Vasut <marex@denx.de>,
	Peter Maydell <peter.maydell@linaro.org>,
	Chris Wulff <crwulff@gmail.com>,
	Laurent Vivier <laurent@vivier.eu>
Subject: Re: [Qemu-devel] [PATCH 2/2] target/m68k: Fix bug in semihosted exit handling
Date: Wed, 21 Aug 2019 16:31:51 +0200	[thread overview]
Message-ID: <8c38e143-1674-5b53-ee6f-d31b2e1ca2bb@redhat.com> (raw)
In-Reply-To: <20190821142151.19995-3-sandra@codesourcery.com>

On 8/21/19 4:21 PM, Sandra Loosemore wrote:
> This patch fixes a bug that caused semihosted exit to always return
> status 0; it was incorrectly using the value of D0 (which
> contains the HOSTED_EXIT request number) instead of D1.
> 

Fixes: a87295e8df0 and 0e1c9c54afb

> Signed-off-by: Sandra Loosemore <sandra@codesourcery.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>  target/m68k/m68k-semi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target/m68k/m68k-semi.c b/target/m68k/m68k-semi.c
> index 8e5fbfc..f189c92 100644
> --- a/target/m68k/m68k-semi.c
> +++ b/target/m68k/m68k-semi.c
> @@ -194,8 +194,8 @@ void do_m68k_semihosting(CPUM68KState *env, int nr)
>      args = env->dregs[1];
>      switch (nr) {
>      case HOSTED_EXIT:
> -        gdb_exit(env, env->dregs[0]);
> -        exit(env->dregs[0]);
> +        gdb_exit(env, env->dregs[1]);
> +        exit(env->dregs[1]);
>      case HOSTED_OPEN:
>          GET_ARG(0);
>          GET_ARG(1);
> 


  reply	other threads:[~2019-08-21 14:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-21 14:21 [Qemu-devel] [PATCH 0/2] Fix bug in nios2 and m68k semihosting Sandra Loosemore
2019-08-21 14:21 ` [Qemu-devel] [PATCH 1/2] target/nios2: Fix bug in semihosted exit handling Sandra Loosemore
2019-08-21 14:29   ` Philippe Mathieu-Daudé
2019-08-21 14:41   ` Laurent Vivier
2019-08-21 15:27     ` Sandra Loosemore
2019-08-21 15:41       ` Laurent Vivier
2019-08-21 17:48         ` Sandra Loosemore
2019-08-21 14:21 ` [Qemu-devel] [PATCH 2/2] target/m68k: " Sandra Loosemore
2019-08-21 14:31   ` Philippe Mathieu-Daudé [this message]
2019-08-21 15:41   ` Laurent Vivier

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=8c38e143-1674-5b53-ee6f-d31b2e1ca2bb@redhat.com \
    --to=philmd@redhat.com \
    --cc=crwulff@gmail.com \
    --cc=laurent@vivier.eu \
    --cc=marex@denx.de \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sandra@codesourcery.com \
    /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).