aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2013-07-06 17:39:48 +0100
committerRiku Voipio <riku.voipio@linaro.org>2013-07-23 17:28:28 +0300
commit82f05b69e6b701157b4a2e7d76ae6cf5542d66c9 (patch)
tree3ed5cc4c5d349608f3aaa7ff3bc32a0675962726 /linux-user
parentc7819dfbd22be6a3711f11056f33300e881563d5 (diff)
downloadqemu-82f05b69e6b701157b4a2e7d76ae6cf5542d66c9.zip
qemu-82f05b69e6b701157b4a2e7d76ae6cf5542d66c9.tar.gz
qemu-82f05b69e6b701157b4a2e7d76ae6cf5542d66c9.tar.bz2
linux-user: Fix pipe syscall return for SPARC
SPARC is one of the CPUs which has a funny syscall ABI for the pipe syscall; add it to the set of special cases in do_pipe(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/syscall.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 5bd57d0..a797afc 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -1032,6 +1032,9 @@ static abi_long do_pipe(void *cpu_env, abi_ulong pipedes,
#elif defined(TARGET_SH4)
((CPUSH4State*)cpu_env)->gregs[1] = host_pipe[1];
return host_pipe[0];
+#elif defined(TARGET_SPARC)
+ ((CPUSPARCState*)cpu_env)->regwptr[1] = host_pipe[1];
+ return host_pipe[0];
#endif
}