diff options
author | Nathan Froyd <froydnj@codesourcery.com> | 2009-05-12 19:13:18 -0700 |
---|---|---|
committer | malc <av1474@comtv.ru> | 2009-05-16 01:36:12 +0400 |
commit | bcd4933a23f1dbdb5b5546b81f3305ebcb13c9c0 (patch) | |
tree | 950314ceb935ce3fcb11bb1f62d9ab24ac0cf243 /linux-user/main.c | |
parent | c29b735c50524c0561def6f4f04502a581a15683 (diff) |
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>
Diffstat (limited to 'linux-user/main.c')
-rw-r--r-- | linux-user/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index 0d36978ad6..17cdfa6d99 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -1461,6 +1461,11 @@ void cpu_loop(CPUPPCState *env) ret = do_syscall(env, env->gpr[0], env->gpr[3], env->gpr[4], env->gpr[5], env->gpr[6], env->gpr[7], 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)) { env->crf[0] |= 0x1; ret = -ret; |