diff mbox series

[v2,19/25] linux-user/sparc: Add rwin_save to signal frame

Message ID 20210426025334.1168495-20-richard.henderson@linaro.org
State Superseded
Headers show
Series linux-user/sparc: Implement rt signals | expand

Commit Message

Richard Henderson April 26, 2021, 2:53 a.m. UTC
Stub it out to zero, but at least include it.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 linux-user/sparc/signal.c | 8 ++++++++
 1 file changed, 8 insertions(+)

-- 
2.25.1
diff mbox series

Patch

diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c
index 59bb449512..4a0578ebf3 100644
--- a/linux-user/sparc/signal.c
+++ b/linux-user/sparc/signal.c
@@ -62,6 +62,7 @@  struct target_signal_frame {
     uint32_t insns[2] QEMU_ALIGNED(8);
     abi_ulong extramask[TARGET_NSIG_WORDS - 1];
     abi_ulong extra_size; /* Should be 0 */
+    abi_ulong rwin_save;
 };
 
 static abi_ulong get_sigframe(struct target_sigaction *sa,
@@ -208,6 +209,8 @@  void setup_frame(int sig, struct target_sigaction *ka,
     save_fpu((struct target_siginfo_fpu *)(sf + 1), env);
     __put_user(sf_addr + sizeof(*sf), &sf->fpu_save);
 
+    __put_user(0, &sf->rwin_save);  /* TODO: save_rwin_state */
+
     __put_user(set->sig[0], &sf->si_mask);
     for (i = 0; i < TARGET_NSIG_WORDS - 1; i++) {
         __put_user(set->sig[i + 1], &sf->extramask[i]);
@@ -303,6 +306,11 @@  long do_sigreturn(CPUSPARCState *env)
         unlock_user_struct(fpu, ptr, 0);
     }
 
+    __get_user(ptr, &sf->rwin_save);
+    if (ptr) {
+        goto segv_and_exit;  /* TODO: restore_rwin */
+    }
+
     __get_user(set.sig[0], &sf->si_mask);
     for (i = 1; i < TARGET_NSIG_WORDS; i++) {
         __get_user(set.sig[i], &sf->extramask[i - 1]);