diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2022-01-04 11:00:35 -0800 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2022-01-04 15:41:03 -0800 |
commit | d7478d4229f0a2b2817a55487e6b17081099fae4 (patch) | |
tree | ca20b264e8da395cfec86b0b37ea329c656e252f /common-user/host/mips | |
parent | 9de225a1c27500c2d80a916d1c2a41d8e2a5f6e8 (diff) | |
download | qemu-d7478d4229f0a2b2817a55487e6b17081099fae4.zip qemu-d7478d4229f0a2b2817a55487e6b17081099fae4.tar.gz qemu-d7478d4229f0a2b2817a55487e6b17081099fae4.tar.bz2 |
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>
Diffstat (limited to 'common-user/host/mips')
-rw-r--r-- | common-user/host/mips/safe-syscall.inc.S | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common-user/host/mips/safe-syscall.inc.S b/common-user/host/mips/safe-syscall.inc.S index fc75a33..6a44614 100644 --- a/common-user/host/mips/safe-syscall.inc.S +++ b/common-user/host/mips/safe-syscall.inc.S @@ -141,6 +141,7 @@ safe_syscall_end: 1: USE_ALT_CP(t0) SETUP_GPX(t1) SETUP_GPX64(t0, t1) + move a0, v0 PTR_LA t9, safe_syscall_set_errno_tail jr t9 |