summaryrefslogtreecommitdiffstats
path: root/common-user
diff options
context:
space:
mode:
authorRichard Henderson2022-02-08 03:54:29 +0100
committerRichard Henderson2022-02-08 22:46:23 +0100
commit620d0b49a40e24465472b667f19b5fb0c63a6f0c (patch)
tree1f5574c5dadb9d24491fe566cee3a7ba8cc5ef85 /common-user
parentMerge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20220208'... (diff)
downloadqemu-620d0b49a40e24465472b667f19b5fb0c63a6f0c.tar.gz
qemu-620d0b49a40e24465472b667f19b5fb0c63a6f0c.tar.xz
qemu-620d0b49a40e24465472b667f19b5fb0c63a6f0c.zip
common-user/host/sparc64: Fix safe_syscall_base
Use the "retl" instead of "ret" instruction alias, since we do not allocate a register window in this function. Fix the offset to the first stacked parameter, which lies beyond the register window save area. Fixes: 95c021dac835 ("linux-user/host/sparc64: Add safe-syscall.inc.S") Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'common-user')
-rw-r--r--common-user/host/sparc64/safe-syscall.inc.S5
1 files changed, 3 insertions, 2 deletions
diff --git a/common-user/host/sparc64/safe-syscall.inc.S b/common-user/host/sparc64/safe-syscall.inc.S
index a2f2b9c967..c7be8f2d25 100644
--- a/common-user/host/sparc64/safe-syscall.inc.S
+++ b/common-user/host/sparc64/safe-syscall.inc.S
@@ -24,7 +24,8 @@
.type safe_syscall_end, @function
#define STACK_BIAS 2047
-#define PARAM(N) STACK_BIAS + N*8
+#define WINDOW_SIZE 16 * 8
+#define PARAM(N) STACK_BIAS + WINDOW_SIZE + N * 8
/*
* This is the entry point for making a system call. The calling
@@ -74,7 +75,7 @@ safe_syscall_end:
/* code path for having successfully executed the syscall */
bcs,pn %xcc, 1f
nop
- ret
+ retl
nop
/* code path when we didn't execute the syscall */