mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
linux-user: introduce target_sigsp() and target_save_altstack()
Signed-off-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20180411192347.30228-1-laurent@vivier.eu>
This commit is contained in:
parent
e8fa729574
commit
465e237bf7
19 changed files with 108 additions and 203 deletions
|
@ -217,13 +217,7 @@ static target_ulong get_sigframe(struct target_sigaction *ka,
|
|||
{
|
||||
target_ulong oldsp;
|
||||
|
||||
oldsp = env->gpr[1];
|
||||
|
||||
if ((ka->sa_flags & TARGET_SA_ONSTACK) &&
|
||||
(sas_ss_flags(oldsp) == 0)) {
|
||||
oldsp = (target_sigaltstack_used.ss_sp
|
||||
+ target_sigaltstack_used.ss_size);
|
||||
}
|
||||
oldsp = target_sigsp(get_sp_from_cpustate(env), ka);
|
||||
|
||||
return (oldsp - frame_size) & ~0xFUL;
|
||||
}
|
||||
|
@ -515,12 +509,7 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
|
|||
|
||||
__put_user(0, &rt_sf->uc.tuc_flags);
|
||||
__put_user(0, &rt_sf->uc.tuc_link);
|
||||
__put_user((target_ulong)target_sigaltstack_used.ss_sp,
|
||||
&rt_sf->uc.tuc_stack.ss_sp);
|
||||
__put_user(sas_ss_flags(env->gpr[1]),
|
||||
&rt_sf->uc.tuc_stack.ss_flags);
|
||||
__put_user(target_sigaltstack_used.ss_size,
|
||||
&rt_sf->uc.tuc_stack.ss_size);
|
||||
target_save_altstack(&rt_sf->uc.tuc_stack, env);
|
||||
#if !defined(TARGET_PPC64)
|
||||
__put_user(h2g (&rt_sf->uc.tuc_mcontext),
|
||||
&rt_sf->uc.tuc_regs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue