From patchwork Sat Jan 5 00:35:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Modification to remove a h2g() call and calculate properly instead Date: Fri, 04 Jan 2013 14:35:48 -0000 From: Samuel Seay X-Patchwork-Id: 209581 Message-Id: <1357346148-26703-1-git-send-email-LightningTH@GMail.com> To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org Cc: Samuel Seay 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 --- linux-user/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index c43b8ac..bb08a93 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;