linux-user: define TARGET_ARCH_HAS_KA_RESTORER
Sparc as an extended sigaction structure containing the field ka_restorer used in place of sa_restorer. Define TARGET_ARCH_HAS_KA_RESTORER and use it with sparc. Signed-off-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20180402102453.9883-2-laurent@vivier.eu>
This commit is contained in:
parent
95a29a4e3e
commit
5de154e82f
@ -2920,8 +2920,8 @@ static void setup_frame(int sig, struct target_sigaction *ka,
|
|||||||
env->pc = ka->_sa_handler;
|
env->pc = ka->_sa_handler;
|
||||||
env->npc = (env->pc + 4);
|
env->npc = (env->pc + 4);
|
||||||
/* 5. return to kernel instructions */
|
/* 5. return to kernel instructions */
|
||||||
if (ka->sa_restorer) {
|
if (ka->ka_restorer) {
|
||||||
env->regwptr[UREG_I7] = ka->sa_restorer;
|
env->regwptr[UREG_I7] = ka->ka_restorer;
|
||||||
} else {
|
} else {
|
||||||
uint32_t val32;
|
uint32_t val32;
|
||||||
|
|
||||||
|
@ -8699,6 +8699,9 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
|
|||||||
target_siginitset(&act.sa_mask, old_act->sa_mask);
|
target_siginitset(&act.sa_mask, old_act->sa_mask);
|
||||||
act.sa_flags = old_act->sa_flags;
|
act.sa_flags = old_act->sa_flags;
|
||||||
act.sa_restorer = old_act->sa_restorer;
|
act.sa_restorer = old_act->sa_restorer;
|
||||||
|
#ifdef TARGET_ARCH_HAS_KA_RESTORER
|
||||||
|
act.ka_restorer = 0;
|
||||||
|
#endif
|
||||||
unlock_user_struct(old_act, arg2, 0);
|
unlock_user_struct(old_act, arg2, 0);
|
||||||
pact = &act;
|
pact = &act;
|
||||||
} else {
|
} else {
|
||||||
@ -8773,8 +8776,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
|
|||||||
if (!lock_user_struct(VERIFY_READ, act, arg2, 1)) {
|
if (!lock_user_struct(VERIFY_READ, act, arg2, 1)) {
|
||||||
goto efault;
|
goto efault;
|
||||||
}
|
}
|
||||||
#ifdef TARGET_SPARC
|
#ifdef TARGET_ARCH_HAS_KA_RESTORER
|
||||||
act->sa_restorer = restorer;
|
act->ka_restorer = restorer;
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
act = NULL;
|
act = NULL;
|
||||||
|
@ -435,6 +435,7 @@ int do_sigaction(int sig, const struct target_sigaction *act,
|
|||||||
#define TARGET_SA_NODEFER 0x20u
|
#define TARGET_SA_NODEFER 0x20u
|
||||||
#define TARGET_SA_RESETHAND 4u
|
#define TARGET_SA_RESETHAND 4u
|
||||||
#define TARGET_ARCH_HAS_SA_RESTORER 1
|
#define TARGET_ARCH_HAS_SA_RESTORER 1
|
||||||
|
#define TARGET_ARCH_HAS_KA_RESTORER 1
|
||||||
#elif defined(TARGET_MIPS)
|
#elif defined(TARGET_MIPS)
|
||||||
#define TARGET_SA_NOCLDSTOP 0x00000001
|
#define TARGET_SA_NOCLDSTOP 0x00000001
|
||||||
#define TARGET_SA_NOCLDWAIT 0x00010000
|
#define TARGET_SA_NOCLDWAIT 0x00010000
|
||||||
@ -742,6 +743,9 @@ struct target_sigaction {
|
|||||||
abi_ulong sa_restorer;
|
abi_ulong sa_restorer;
|
||||||
#endif
|
#endif
|
||||||
target_sigset_t sa_mask;
|
target_sigset_t sa_mask;
|
||||||
|
#ifdef TARGET_ARCH_HAS_KA_RESTORER
|
||||||
|
abi_ulong ka_restorer;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user