summary refs log tree commit diff stats
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-06 00:18:15 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-06 00:18:15 +0000
commitead9360e2fbcaae10a8ca3d8bfed885422205dca (patch)
treebbec65c2f895319d4192f9662919f74f51556f9a /linux-user/syscall.c
parent606b41e7020db7634fe90d069d2c019770c74b45 (diff)
downloadfocaccia-qemu-ead9360e2fbcaae10a8ca3d8bfed885422205dca.tar.gz
focaccia-qemu-ead9360e2fbcaae10a8ca3d8bfed885422205dca.zip
Partial support for 34K multithreading, not functional yet.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3156 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index e23a684e76..cd956aa1ac 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -2189,8 +2189,8 @@ int do_fork(CPUState *env, unsigned int flags, unsigned long newsp)
         /* ??? is this sufficient?  */
 #elif defined(TARGET_MIPS)
         if (!newsp)
-            newsp = env->gpr[29];
-        new_env->gpr[29] = newsp;
+            newsp = env->gpr[29][env->current_tc];
+        new_env->gpr[29][env->current_tc] = newsp;
 #elif defined(TARGET_PPC)
         if (!newsp)
             newsp = env->gpr[1];
@@ -2777,7 +2777,8 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
             ret = get_errno(pipe(host_pipe));
             if (!is_error(ret)) {
 #if defined(TARGET_MIPS)
-		((CPUMIPSState*)cpu_env)->gpr[3] = host_pipe[1];
+                CPUMIPSState *env = (CPUMIPSState*)cpu_env;
+		env->gpr[3][env->current_tc] = host_pipe[1];
 		ret = host_pipe[0];
 #else
                 tput32(arg1, host_pipe[0]);