aboutsummaryrefslogtreecommitdiff
path: root/linux-user/signal.c
diff options
context:
space:
mode:
authorSamuel Seay <lightningth@gmail.com>2013-01-04 14:35:48 +0000
committerAlexander Graf <agraf@suse.de>2013-01-07 17:37:11 +0100
commit61993a67128095946ed5df51c3c20748182d8efc (patch)
treea3649b3ec0d03fc342c0208a51af8c1cc695f63b /linux-user/signal.c
parent1b7ce68fb45b97a9eaf71eeb81d2b4f4ea6bf4b2 (diff)
PPC: linux-user: Calculate context pointer explicitly
Peter Maydell recommended the change to be more proper. The result was tested and shows coming up with the same proper value. Signed-off-by: Samuel Seay <LightningTH@GMail.com> [agraf: change subject] Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'linux-user/signal.c')
-rw-r--r--linux-user/signal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/signal.c b/linux-user/signal.c
index c43b8ac30a..bb08a9354e 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -4614,7 +4614,7 @@ static void setup_frame(int sig, struct target_sigaction *ka,
/* Set up registers for signal handler. */
env->gpr[1] = newsp;
env->gpr[3] = signal;
- env->gpr[4] = (target_ulong) h2g(sc);
+ env->gpr[4] = frame_addr + offsetof(struct target_sigframe, sctx);
env->nip = (target_ulong) ka->_sa_handler;
/* Signal handlers are entered in big-endian mode. */
env->msr &= ~MSR_LE;