aboutsummaryrefslogtreecommitdiff
path: root/linux-user/main.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2011-10-26 09:59:18 -0700
committerRiku Voipio <riku.voipio@linaro.org>2011-10-27 14:43:30 +0300
commit9e0e2f967b17fc88cd288963e9cb1187d4b3841b (patch)
tree714b7ee84432e4912807f996c34a3099819e1a15 /linux-user/main.c
parent8e78064e9d95094b7db8e82e57fa6d57fd38b333 (diff)
ppc64-linux-user: Fix syscall return type.
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> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user/main.c')
-rw-r--r--linux-user/main.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index c36a8afc04..d1bbc577e5 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -1341,7 +1341,7 @@ void cpu_loop(CPUPPCState *env)
{
target_siginfo_t info;
int trapnr;
- uint32_t ret;
+ target_ulong ret;
for(;;) {
cpu_exec_start(env);
@@ -1704,27 +1704,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)) {