OSDN Git Service

common-user: Fix tail calls to safe_syscall_set_errno_tail
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 4 Jan 2022 19:00:35 +0000 (11:00 -0800)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 4 Jan 2022 23:41:03 +0000 (15:41 -0800)
commitd7478d4229f0a2b2817a55487e6b17081099fae4
treeca20b264e8da395cfec86b0b37ea329c656e252f
parent9de225a1c27500c2d80a916d1c2a41d8e2a5f6e8
common-user: Fix tail calls to safe_syscall_set_errno_tail

For the ABIs in which the syscall return register is not
also the first function argument register, move the errno
value into the correct place.

Fixes: a3310c0397e2 ("linux-user: Move syscall error detection into safe_syscall_base")
Reported-by: Laurent Vivier <laurent@vivier.eu>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220104190454.542225-1-richard.henderson@linaro.org>
common-user/host/i386/safe-syscall.inc.S
common-user/host/mips/safe-syscall.inc.S
common-user/host/x86_64/safe-syscall.inc.S