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>
This commit is contained in:
Samuel Seay 2013-01-04 14:35:48 +00:00 committed by Alexander Graf
parent 1b7ce68fb4
commit 61993a6712
1 changed files with 1 additions and 1 deletions

View File

@ -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;