qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: laurent@vivier.eu
Subject: [PATCH 1/5] common-user/host/sparc64: Fix safe_syscall_base
Date: Tue,  8 Feb 2022 18:12:33 +1100	[thread overview]
Message-ID: <20220208071237.319844-2-richard.henderson@linaro.org> (raw)
In-Reply-To: <20220208071237.319844-1-richard.henderson@linaro.org>

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>
---
 common-user/host/sparc64/safe-syscall.inc.S | 5 +++--
 1 file 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 */
-- 
2.25.1



  reply	other threads:[~2022-02-08  8:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-08  7:12 [PATCH 0/5] linux-user: Fixes for sparc64 host Richard Henderson
2022-02-08  7:12 ` Richard Henderson [this message]
2022-02-08  7:12 ` [PATCH 2/5] linux-user: Introduce host_signal_mask Richard Henderson
2022-02-08 10:39   ` Philippe Mathieu-Daudé via
2022-02-08 10:59   ` Peter Maydell
2022-02-08 11:17     ` Richard Henderson
2022-02-08 11:32       ` Peter Maydell
2022-02-08  7:12 ` [PATCH 3/5] linux-user: Introduce host_sigcontext Richard Henderson
2022-02-08 10:40   ` Philippe Mathieu-Daudé via
2022-02-08 11:06   ` Peter Maydell
2022-02-08  7:12 ` [PATCH 4/5] linux-user: Move sparc/host-signal.h to sparc64/host-signal.h Richard Henderson
2022-02-08 10:40   ` Philippe Mathieu-Daudé via
2022-02-08 11:01   ` Peter Maydell
2022-02-08 11:19     ` Richard Henderson
2022-02-08  7:12 ` [PATCH 5/5] linux-user/include/host/sparc64: Fix host_sigcontext Richard Henderson
2022-02-08 11:14   ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220208071237.319844-2-richard.henderson@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).