diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-05-04 09:25:12 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-05-04 09:25:12 +0100 |
commit | f0c889522255b8fee2fe3a6cc8157dfa80abac2a (patch) | |
tree | 4303e6870bc957055892b0c474c14376b0301a10 /linux-user/mips/signal.c | |
parent | e2f557f9889fea29fbb7bafae7719e38821df8fb (diff) | |
parent | 7f254c5cb80bc478794a4c3d7fe5d503b033be13 (diff) |
Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-2.13-pull-request' into staging
# gpg: Signature made Thu 03 May 2018 22:38:35 BST
# gpg: using RSA key F30C38BD3F2FBE3C
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>"
# gpg: aka "Laurent Vivier <laurent@vivier.eu>"
# gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>"
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C
* remotes/vivier2/tags/linux-user-for-2.13-pull-request:
linux-user: remove useless padding in flock64 structure
linux-user: introduce target_sigsp() and target_save_altstack()
linux-user: ARM-FDPIC: Add support for signals for FDPIC targets
linux-user: ARM-FDPIC: Add support of FDPIC for ARM.
linux-user: ARM-FDPIC: Identify ARM FDPIC binaries
Remove CONFIG_USE_FDPIC.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'linux-user/mips/signal.c')
-rw-r--r-- | linux-user/mips/signal.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/linux-user/mips/signal.c b/linux-user/mips/signal.c index adeb5a4241..ed9849c7f6 100644 --- a/linux-user/mips/signal.c +++ b/linux-user/mips/signal.c @@ -179,20 +179,12 @@ get_sigframe(struct target_sigaction *ka, CPUMIPSState *regs, size_t frame_size) { unsigned long sp; - /* Default to using normal stack */ - sp = regs->active_tc.gpr[29]; - /* * FPU emulator may have its own trampoline active just * above the user stack, 16-bytes before the next lowest * 16 byte boundary. Try to avoid trashing it. */ - sp -= 32; - - /* This is the X/Open sanctioned signal stack switching. */ - if ((ka->sa_flags & TARGET_SA_ONSTACK) && (sas_ss_flags (sp) == 0)) { - sp = target_sigaltstack_used.ss_sp + target_sigaltstack_used.ss_size; - } + sp = target_sigsp(get_sp_from_cpustate(regs) - 32, ka); return (sp - frame_size) & ~7; } @@ -323,10 +315,7 @@ void setup_rt_frame(int sig, struct target_sigaction *ka, __put_user(0, &frame->rs_uc.tuc_flags); __put_user(0, &frame->rs_uc.tuc_link); - __put_user(target_sigaltstack_used.ss_sp, &frame->rs_uc.tuc_stack.ss_sp); - __put_user(target_sigaltstack_used.ss_size, &frame->rs_uc.tuc_stack.ss_size); - __put_user(sas_ss_flags(get_sp_from_cpustate(env)), - &frame->rs_uc.tuc_stack.ss_flags); + target_save_altstack(&frame->rs_uc.tuc_stack, env); setup_sigcontext(env, &frame->rs_uc.tuc_mcontext); |