From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: riku.voipio@iki.fi, agraf@suse.de
Subject: [Qemu-devel] [PATCH 2/2] ppc64-linux-user: Fix syscall return type.
Date: Wed, 26 Oct 2011 09:59:18 -0700 [thread overview]
Message-ID: <1319648358-18812-3-git-send-email-rth@twiddle.net> (raw)
In-Reply-To: <1319648358-18812-1-git-send-email-rth@twiddle.net>
Use target_ulong instead of hard-coded uint32_t.
Remove the disabled printf's that are redundant with -strace.
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
linux-user/main.c | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/linux-user/main.c b/linux-user/main.c
index e7dad54..dd55648 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -1332,7 +1332,7 @@ void cpu_loop(CPUPPCState *env)
{
target_siginfo_t info;
int trapnr;
- uint32_t ret;
+ target_ulong ret;
for(;;) {
cpu_exec_start(env);
@@ -1695,27 +1695,20 @@ void cpu_loop(CPUPPCState *env)
* PPC ABI uses overflow flag in cr0 to signal an error
* in syscalls.
*/
-#if 0
- printf("syscall %d 0x%08x 0x%08x 0x%08x 0x%08x\n", env->gpr[0],
- env->gpr[3], env->gpr[4], env->gpr[5], env->gpr[6]);
-#endif
env->crf[0] &= ~0x1;
ret = do_syscall(env, env->gpr[0], env->gpr[3], env->gpr[4],
env->gpr[5], env->gpr[6], env->gpr[7],
env->gpr[8], 0, 0);
- if (ret == (uint32_t)(-TARGET_QEMU_ESIGRETURN)) {
+ if (ret == (target_ulong)(-TARGET_QEMU_ESIGRETURN)) {
/* Returning from a successful sigreturn syscall.
Avoid corrupting register state. */
break;
}
- if (ret > (uint32_t)(-515)) {
+ if (ret > (target_ulong)(-515)) {
env->crf[0] |= 0x1;
ret = -ret;
}
env->gpr[3] = ret;
-#if 0
- printf("syscall returned 0x%08x (%d)\n", ret, ret);
-#endif
break;
case POWERPC_EXCP_STCX:
if (do_store_exclusive(env)) {
--
1.7.6.4
next prev parent reply other threads:[~2011-10-26 17:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-26 16:59 [Qemu-devel] [PATCH 0/2] Fix ppc64-linux-user Richard Henderson
2011-10-26 16:59 ` [Qemu-devel] [PATCH 1/2] ppc64-linux-user: Properly interpret the entry function descriptor Richard Henderson
2011-10-30 16:47 ` Alexander Graf
2011-10-26 16:59 ` Richard Henderson [this message]
2011-10-30 16:47 ` [Qemu-devel] [PATCH 2/2] ppc64-linux-user: Fix syscall return type Alexander Graf
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=1319648358-18812-3-git-send-email-rth@twiddle.net \
--to=rth@twiddle.net \
--cc=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/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).