microblaze: Support setting of TLS ptr
authorEdgar E. Iglesias <edgar.iglesias@gmail.com>
Thu, 26 Apr 2012 12:17:41 +0000 (14:17 +0200)
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>
Fri, 19 Oct 2012 11:24:12 +0000 (13:24 +0200)
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
linux-user/syscall.c
target-microblaze/cpu.h

index 471d0605f7a5b8ba2471a6a6678986d5a01194e0..c6a633742635ad120e1fa5e94fd828378b6df540 100644 (file)
@@ -6888,6 +6888,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
         ret = get_errno(do_fork(cpu_env, arg1, arg2, arg3, arg5, arg4));
 #elif defined(TARGET_CRIS)
         ret = get_errno(do_fork(cpu_env, arg2, arg1, arg3, arg4, arg5));
+#elif defined(TARGET_MICROBLAZE)
+        ret = get_errno(do_fork(cpu_env, arg1, arg2, arg4, arg6, arg5));
 #elif defined(TARGET_S390X)
         ret = get_errno(do_fork(cpu_env, arg2, arg1, arg3, arg5, arg4));
 #else
index 4968c244e81fc1c39b8aed23f28bc51519a1c9d7..88430b5057854f83ae409cef69e70ed68ad3b334 100644 (file)
@@ -345,6 +345,7 @@ static inline void cpu_clone_regs(CPUMBState *env, target_ulong newsp)
 
 static inline void cpu_set_tls(CPUMBState *env, target_ulong newtls)
 {
+    env->regs[21] = newtls;
 }
 
 static inline int cpu_interrupts_enabled(CPUMBState *env)