]> xenbits.xensource.com Git - people/pauldu/qemu.git/commitdiff
target/xtensa: linux-user: rewind pc for restarted syscall
authorMax Filippov <jcmvbkbc@gmail.com>
Wed, 28 Mar 2018 08:08:36 +0000 (01:08 -0700)
committerMax Filippov <jcmvbkbc@gmail.com>
Sat, 31 Mar 2018 21:06:35 +0000 (14:06 -0700)
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>
linux-user/main.c

index ba09b7d0c873e6d381f9246c23af583198ea9e32..8907a841141183aa1b9a0215e5121d03d42e9242 100644 (file)
@@ -4006,6 +4006,9 @@ void cpu_loop(CPUXtensaState *env)
                     break;
 
                 case -TARGET_ERESTARTSYS:
+                    env->pc -= 3;
+                    break;
+
                 case -TARGET_QEMU_ESIGRETURN:
                     break;
                 }