From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: Keith Packard <keithp@keithp.com>,
Peter Maydell <peter.maydell@linaro.org>
Subject: [PULL 7/9] target/m68k: Pass semihosting arg to exit
Date: Wed, 24 Apr 2024 15:51:21 -0700 [thread overview]
Message-ID: <20240424225123.929152-8-richard.henderson@linaro.org> (raw)
In-Reply-To: <20240424225123.929152-1-richard.henderson@linaro.org>
From: Keith Packard <keithp@keithp.com>
Instead of using d0 (the semihost function number), use d1 (the
provide exit status).
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20230802161914.395443-2-keithp@keithp.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
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 546cff2246..6fbbd140f3 100644
--- a/target/m68k/m68k-semi.c
+++ b/target/m68k/m68k-semi.c
@@ -132,8 +132,8 @@ void do_m68k_semihosting(CPUM68KState *env, int nr)
args = env->dregs[1];
switch (nr) {
case HOSTED_EXIT:
- gdb_exit(env->dregs[0]);
- exit(env->dregs[0]);
+ gdb_exit(env->dregs[1]);
+ exit(env->dregs[1]);
case HOSTED_OPEN:
GET_ARG(0);
--
2.34.1
next prev parent reply other threads:[~2024-04-24 22:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-24 22:51 [PULL 0/9] tcg + linux-user patch queue Richard Henderson
2024-04-24 22:51 ` [PULL 1/9] meson: Make DEBUG_REMAP a meson option Richard Henderson
2024-04-24 22:51 ` [PULL 2/9] linux-user: do_setsockopt: fix SOL_ALG.ALG_SET_KEY Richard Henderson
2024-04-24 22:51 ` [PULL 3/9] linux-user: do_setsockopt: make ip_mreq local to the place it is used and inline target_to_host_ip_mreq() Richard Henderson
2024-04-24 22:51 ` [PULL 4/9] linux-user: do_setsockopt: make ip_mreq_source local to the place where it is used Richard Henderson
2024-04-24 22:51 ` [PULL 5/9] linux-user: do_setsockopt: eliminate goto in switch for SO_SNDTIMEO Richard Henderson
2024-04-24 22:51 ` [PULL 6/9] linux-user: Add FITRIM ioctl Richard Henderson
2024-04-24 22:51 ` Richard Henderson [this message]
2024-04-24 22:51 ` [PULL 8/9] target/m68k: Perform the semihosting test during translate Richard Henderson
2024-04-24 22:51 ` [PULL 9/9] target/m68k: Support semihosting on non-ColdFire targets Richard Henderson
2024-04-25 2:49 ` [PULL 0/9] tcg + linux-user patch queue Richard Henderson
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=20240424225123.929152-8-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=keithp@keithp.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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).