aboutsummaryrefslogtreecommitdiff
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authoredgar_igl <edgar_igl@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-07 14:19:38 +0000
committeredgar_igl <edgar_igl@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-07 14:19:38 +0000
commitef96779bc3df7f4fe228fb9a5c7ecb81a04b2644 (patch)
treea268cc6ea2908946d2d62979e7e071a78d016a7f /linux-user/syscall.c
parent35ef81d6d2dd1e49a597e6ef44d0c64951ae933c (diff)
CRIS: Implement set_thread_area for CRIS.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6210 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 3cc14b8e3f..18d008c1c4 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5912,6 +5912,14 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
((CPUMIPSState *) cpu_env)->tls_value = arg1;
ret = 0;
break;
+#elif defined(TARGET_CRIS)
+ if (arg1 & 0xff)
+ ret = -TARGET_EINVAL;
+ else {
+ ((CPUCRISState *) cpu_env)->pregs[PR_PID] = arg1;
+ ret = 0;
+ }
+ break;
#elif defined(TARGET_I386) && defined(TARGET_ABI32)
ret = do_set_thread_area(cpu_env, arg1);
break;