aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/main.c2
-rw-r--r--linux-user/syscall.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 4bf739e4eb..c32cd75e77 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -1887,6 +1887,7 @@ void cpu_loop (CPUState *env)
switch (trapnr) {
case 0x160:
+ env->pc += 2;
ret = do_syscall(env,
env->gregs[3],
env->gregs[4],
@@ -1896,7 +1897,6 @@ void cpu_loop (CPUState *env)
env->gregs[0],
env->gregs[1]);
env->gregs[0] = ret;
- env->pc += 2;
break;
case EXCP_INTERRUPT:
/* just indicate that signals should be handled asap */
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index eba2c02ad7..56b413857e 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -53,6 +53,7 @@
//#include <sys/user.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
+#include <qemu-common.h>
#define termios host_termios
#define winsize host_winsize
@@ -4662,7 +4663,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
ret = get_errno(fsync(arg1));
break;
case TARGET_NR_clone:
+#if defined(TARGET_SH4)
+ ret = get_errno(do_fork(cpu_env, arg1, arg2, arg3, arg5, arg4));
+#else
ret = get_errno(do_fork(cpu_env, arg1, arg2, arg3, arg4, arg5));
+#endif
break;
#ifdef __NR_exit_group
/* new thread calls */