diff options
| author | Timothy E Baldwin | 2016-05-12 19:47:34 +0200 |
|---|---|---|
| committer | Riku Voipio | 2016-05-27 13:49:49 +0200 |
| commit | c0bea68f9ea48f0dea7a06a259a613bfd3a7e35e (patch) | |
| tree | f46658f976a156b5e5b981a567cddf4582dd9df1 /linux-user/main.c | |
| parent | linux-user: Support for restarting system calls for PPC targets (diff) | |
| download | qemu-c0bea68f9ea48f0dea7a06a259a613bfd3a7e35e.tar.gz qemu-c0bea68f9ea48f0dea7a06a259a613bfd3a7e35e.tar.xz qemu-c0bea68f9ea48f0dea7a06a259a613bfd3a7e35e.zip | |
linux-user: Support for restarting system calls for SPARC targets
Update the SPARC main loop and sigreturn code:
* on TARGET_ERESTARTSYS, wind guest PC backwards to repeat syscall insn
* set all guest CPU state within signal.c code on sigreturn
* handle TARGET_QEMU_ESIGRETURN in the main loop as the indication
that the main loop should not touch any guest CPU state
Signed-off-by: Timothy Edward Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
Message-id: 1441497448-32489-9-git-send-email-T.E.Baldwin99@members.leeds.ac.uk
[PMM: Commit message tweaks; drop TARGET_USE_ERESTARTSYS define]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user/main.c')
| -rw-r--r-- | linux-user/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index dfc098f121..04a9b9b4c1 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -1376,6 +1376,9 @@ void cpu_loop (CPUSPARCState *env) env->regwptr[2], env->regwptr[3], env->regwptr[4], env->regwptr[5], 0, 0); + if (ret == -TARGET_ERESTARTSYS || ret == -TARGET_QEMU_ESIGRETURN) { + break; + } if ((abi_ulong)ret >= (abi_ulong)(-515)) { #if defined(TARGET_SPARC64) && !defined(TARGET_ABI32) env->xcc |= PSR_CARRY; |
