summaryrefslogtreecommitdiffstats
path: root/linux-user/host
diff options
context:
space:
mode:
authorRichard Henderson2016-06-13 23:45:21 +0200
committerRiku Voipio2016-06-26 12:17:22 +0200
commit4eed9990a0d50d9c2bc7042fb3b68579985867ae (patch)
treed1e4f3b04de8ca0b6efa72c325f8b9ed4a215e54 /linux-user/host
parentlinux-user: don't swap NLMSG_DATA() fields (diff)
downloadqemu-4eed9990a0d50d9c2bc7042fb3b68579985867ae.tar.gz
qemu-4eed9990a0d50d9c2bc7042fb3b68579985867ae.tar.xz
qemu-4eed9990a0d50d9c2bc7042fb3b68579985867ae.zip
linux-user: fix x86_64 safe_syscall
Do what the comment says, test for signal_pending non-zero, rather than the current code which tests for bit 0 non-zero. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Riku Voipio <riku.voipio@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'linux-user/host')
-rw-r--r--linux-user/host/x86_64/safe-syscall.inc.S6
1 files changed, 3 insertions, 3 deletions
diff --git a/linux-user/host/x86_64/safe-syscall.inc.S b/linux-user/host/x86_64/safe-syscall.inc.S
index e09368d450..f36992daa3 100644
--- a/linux-user/host/x86_64/safe-syscall.inc.S
+++ b/linux-user/host/x86_64/safe-syscall.inc.S
@@ -67,8 +67,8 @@ safe_syscall_base:
*/
safe_syscall_start:
/* if signal_pending is non-zero, don't do the call */
- testl $1, (%rbp)
- jnz return_ERESTARTSYS
+ cmpl $0, (%rbp)
+ jnz 1f
syscall
safe_syscall_end:
/* code path for having successfully executed the syscall */
@@ -78,7 +78,7 @@ safe_syscall_end:
.cfi_restore rbp
ret
-return_ERESTARTSYS:
+1:
/* code path when we didn't execute the syscall */
.cfi_restore_state
mov $-TARGET_ERESTARTSYS, %rax