From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGNo6-0000yJ-40 for qemu-devel@nongnu.org; Fri, 24 Jun 2016 05:53:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGNo5-0003TA-52 for qemu-devel@nongnu.org; Fri, 24 Jun 2016 05:53:50 -0400 Received: from mail-lf0-x229.google.com ([2a00:1450:4010:c07::229]:32957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGNo4-0003T2-TO for qemu-devel@nongnu.org; Fri, 24 Jun 2016 05:53:49 -0400 Received: by mail-lf0-x229.google.com with SMTP id f6so112307971lfg.0 for ; Fri, 24 Jun 2016 02:53:48 -0700 (PDT) From: riku.voipio@linaro.org Date: Fri, 24 Jun 2016 12:53:14 +0300 Message-Id: In-Reply-To: References: Subject: [Qemu-devel] [PULL 19/24] linux-user: fix x86_64 safe_syscall List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Richard Henderson From: Richard Henderson 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 Signed-off-by: Riku Voipio Reviewed-by: Peter Maydell --- linux-user/host/x86_64/safe-syscall.inc.S | 6 +++--- 1 file 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 e09368d..f36992d 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 -- 2.1.4