aboutsummaryrefslogtreecommitdiff
path: root/linux-user/main.c
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2018-03-28 01:08:36 -0700
committerMax Filippov <jcmvbkbc@gmail.com>2018-03-31 14:06:35 -0700
commit4a6bf7adb92d1b8b7cd3763740b4a5180c0147d5 (patch)
tree18e12e7d1726cf418d17098fca78023c50e95796 /linux-user/main.c
parent20ef66706020a874d03092a673a24ae74685cb4d (diff)
downloadqemu-4a6bf7adb92d1b8b7cd3763740b4a5180c0147d5.zip
qemu-4a6bf7adb92d1b8b7cd3763740b4a5180c0147d5.tar.gz
qemu-4a6bf7adb92d1b8b7cd3763740b4a5180c0147d5.tar.bz2
target/xtensa: linux-user: rewind pc for restarted syscall
In case of syscall restart request set pc back to the syscall instruction. Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'linux-user/main.c')
-rw-r--r--linux-user/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index ba09b7d..8907a84 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -4006,6 +4006,9 @@ void cpu_loop(CPUXtensaState *env)
break;
case -TARGET_ERESTARTSYS:
+ env->pc -= 3;
+ break;
+
case -TARGET_QEMU_ESIGRETURN:
break;
}