aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-user/s390x/signal.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/linux-user/s390x/signal.c b/linux-user/s390x/signal.c
index ecfa2a14a9..7107c5fb53 100644
--- a/linux-user/s390x/signal.c
+++ b/linux-user/s390x/signal.c
@@ -211,9 +211,10 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
/* Set up to return from userspace. If provided, use a stub
already in userspace. */
if (ka->sa_flags & TARGET_SA_RESTORER) {
- env->regs[14] = (unsigned long) ka->sa_restorer | PSW_ADDR_AMODE;
+ env->regs[14] = ka->sa_restorer | PSW_ADDR_AMODE;
} else {
- env->regs[14] = (unsigned long) frame->retcode | PSW_ADDR_AMODE;
+ env->regs[14] = (frame_addr + offsetof(typeof(*frame), retcode))
+ | PSW_ADDR_AMODE;
__put_user(S390_SYSCALL_OPCODE | TARGET_NR_rt_sigreturn,
(uint16_t *)(frame->retcode));
}