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>
.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
/* 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 */