mirror of https://github.com/proxmox/mirror_qemu
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>master
parent
b9403979b5
commit
4eed9990a0
|
@ -67,8 +67,8 @@ safe_syscall_base:
|
||||||
*/
|
*/
|
||||||
safe_syscall_start:
|
safe_syscall_start:
|
||||||
/* if signal_pending is non-zero, don't do the call */
|
/* if signal_pending is non-zero, don't do the call */
|
||||||
testl $1, (%rbp)
|
cmpl $0, (%rbp)
|
||||||
jnz return_ERESTARTSYS
|
jnz 1f
|
||||||
syscall
|
syscall
|
||||||
safe_syscall_end:
|
safe_syscall_end:
|
||||||
/* code path for having successfully executed the syscall */
|
/* code path for having successfully executed the syscall */
|
||||||
|
@ -78,7 +78,7 @@ safe_syscall_end:
|
||||||
.cfi_restore rbp
|
.cfi_restore rbp
|
||||||
ret
|
ret
|
||||||
|
|
||||||
return_ERESTARTSYS:
|
1:
|
||||||
/* code path when we didn't execute the syscall */
|
/* code path when we didn't execute the syscall */
|
||||||
.cfi_restore_state
|
.cfi_restore_state
|
||||||
mov $-TARGET_ERESTARTSYS, %rax
|
mov $-TARGET_ERESTARTSYS, %rax
|
||||||
|
|
Loading…
Reference in New Issue