diff options
author | Tom Musta | 2014-06-30 15:13:40 +0200 |
---|---|---|
committer | Alexander Graf | 2014-09-08 12:50:46 +0200 |
commit | 19774ec5c4019d1802b497d702e1eefd3c193e84 (patch) | |
tree | 646b5ea3d32d523f09c496cd5e78bfffddcf2395 | |
parent | linux-user: Properly Dereference PPC64 ELFv1 Signal Handler Pointer (diff) | |
download | qemu-19774ec5c4019d1802b497d702e1eefd3c193e84.tar.gz qemu-19774ec5c4019d1802b497d702e1eefd3c193e84.tar.xz qemu-19774ec5c4019d1802b497d702e1eefd3c193e84.zip |
linux-user: Implement do_setcontext for PPC64
Eliminate the stub for the do_setcontext() function for TARGET_PPC64. The
implementation re-uses the existing TARGET_PPC32 code with the only change
being the computation of the address of the register save area.
Signed-off-by: Tom Musta <tommusta@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
-rw-r--r-- | linux-user/signal.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/linux-user/signal.c b/linux-user/signal.c index e8e49db9dd..281d1c4a03 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -4877,10 +4877,6 @@ sigsegv: /* See arch/powerpc/kernel/signal_32.c. */ static int do_setcontext(struct target_ucontext *ucp, CPUPPCState *env, int sig) { -#if defined(TARGET_PPC64) - fprintf(stderr, "do_setcontext: not implemented\n"); - return 0; -#else struct target_mcontext *mcp; target_ulong mcp_addr; sigset_t blocked; @@ -4890,7 +4886,12 @@ static int do_setcontext(struct target_ucontext *ucp, CPUPPCState *env, int sig) sizeof (set))) return 1; +#if defined(TARGET_PPC64) + mcp_addr = h2g(ucp) + + offsetof(struct target_ucontext, tuc_sigcontext.mcontext); +#else __get_user(mcp_addr, &ucp->tuc_regs); +#endif if (!lock_user_struct(VERIFY_READ, mcp, mcp_addr, 1)) return 1; @@ -4901,7 +4902,6 @@ static int do_setcontext(struct target_ucontext *ucp, CPUPPCState *env, int sig) unlock_user_struct(mcp, mcp_addr, 1); return 0; -#endif } long do_rt_sigreturn(CPUPPCState *env) |