mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
linux-user: ppc signal handling
Implement setup_{,rt_}frame and do_{,rt_}sigreturn for PPC 32-bit. Use
the same TARGET_QEMU_ESIGRETURN hack as for MIPS to avoid clobbering
register state on a sigreturn.
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: malc <av1474@comtv.ru>
This commit is contained in:
@@ -1461,6 +1461,11 @@ void cpu_loop(CPUPPCState *env)
|
|||||||
ret = do_syscall(env, env->gpr[0], env->gpr[3], env->gpr[4],
|
ret = do_syscall(env, env->gpr[0], env->gpr[3], env->gpr[4],
|
||||||
env->gpr[5], env->gpr[6], env->gpr[7],
|
env->gpr[5], env->gpr[6], env->gpr[7],
|
||||||
env->gpr[8]);
|
env->gpr[8]);
|
||||||
|
if (ret == (uint32_t)(-TARGET_QEMU_ESIGRETURN)) {
|
||||||
|
/* Returning from a successful sigreturn syscall.
|
||||||
|
Avoid corrupting register state. */
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (ret > (uint32_t)(-515)) {
|
if (ret > (uint32_t)(-515)) {
|
||||||
env->crf[0] |= 0x1;
|
env->crf[0] |= 0x1;
|
||||||
ret = -ret;
|
ret = -ret;
|
||||||
|
|||||||
@@ -51,6 +51,9 @@ struct target_revectored_struct {
|
|||||||
abi_ulong __map[8]; /* 256 bits */
|
abi_ulong __map[8]; /* 256 bits */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Nasty hack: define a fake errno value for use by sigreturn. */
|
||||||
|
#define TARGET_QEMU_ESIGRETURN 255
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* flags masks
|
* flags masks
|
||||||
*/
|
*/
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user