From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXFZN-0002kx-Ih for qemu-devel@nongnu.org; Thu, 16 Jun 2011 12:37:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QXFZL-0005Ir-C2 for qemu-devel@nongnu.org; Thu, 16 Jun 2011 12:37:25 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:50682) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXFZK-0005Hn-KI for qemu-devel@nongnu.org; Thu, 16 Jun 2011 12:37:23 -0400 From: Peter Maydell Date: Thu, 16 Jun 2011 17:37:15 +0100 Message-Id: <1308242235-8261-9-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1308242235-8261-1-git-send-email-peter.maydell@linaro.org> References: <1308242235-8261-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 8/8] linux-user/signal.c: Remove unused fenab List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Riku Voipio , Juan Quintela , patches@linaro.org Remove fenab as it is only written, never used. Add a FIXME comment about the discrepancy between our behaviour and that of the Linux kernel for this routine. Signed-off-by: Peter Maydell --- linux-user/signal.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 2e34ffb..73670ac 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -2228,7 +2228,6 @@ void sparc64_set_context(CPUSPARCState *env) target_mc_gregset_t *grp; abi_ulong pc, npc, tstate; abi_ulong fp, i7, w_addr; - unsigned char fenab; int err; unsigned int i; @@ -2293,7 +2292,11 @@ void sparc64_set_context(CPUSPARCState *env) if (put_user(i7, w_addr + offsetof(struct target_reg_window, ins[7]), abi_ulong) != 0) goto do_sigsegv; - err |= __get_user(fenab, &(ucp->tuc_mcontext.mc_fpregs.mcfpu_enab)); + /* FIXME this does not match how the kernel handles the FPU in + * its sparc64_set_context implementation. In particular the FPU + * is only restored if fenab is non-zero in: + * __get_user(fenab, &(ucp->tuc_mcontext.mc_fpregs.mcfpu_enab)); + */ err |= __get_user(env->fprs, &(ucp->tuc_mcontext.mc_fpregs.mcfpu_fprs)); { uint32_t *src, *dst; -- 1.7.1