qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Riku Voipio <riku.voipio@iki.fi>,
	Juan Quintela <quintela@redhat.com>,
	patches@linaro.org
Subject: [Qemu-devel] [PATCH 8/8] linux-user/signal.c: Remove unused fenab
Date: Thu, 16 Jun 2011 17:37:15 +0100	[thread overview]
Message-ID: <1308242235-8261-9-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1308242235-8261-1-git-send-email-peter.maydell@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 <peter.maydell@linaro.org>
---
 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

      parent reply	other threads:[~2011-06-16 16:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16 16:37 [Qemu-devel] [PATCH 0/8] linux-user: Fix gcc 4.6 compile warnings Peter Maydell
2011-06-16 16:37 ` [Qemu-devel] [PATCH 1/8] linuxload: id_change was a write only variable Peter Maydell
2011-06-16 16:37 ` [Qemu-devel] [PATCH 2/8] syscall: really return ret code Peter Maydell
2011-06-16 16:37 ` [Qemu-devel] [PATCH 3/8] linux-user: syscall should use sanitized arg1 Peter Maydell
2011-06-16 16:37 ` [Qemu-devel] [PATCH 4/8] flatload: end_code was only used in a debug message Peter Maydell
2011-06-16 16:37 ` [Qemu-devel] [PATCH 5/8] flatload: memp was a write-only variable Peter Maydell
2011-06-16 16:37 ` [Qemu-devel] [PATCH 6/8] linux-user: Bump do_syscall() up to 8 syscall arguments Peter Maydell
2011-06-16 16:37 ` [Qemu-devel] [PATCH 7/8] linux-user/signal.c: Remove only-ever-set variable fpu_save_addr Peter Maydell
2011-06-16 16:37 ` Peter Maydell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1308242235-8261-9-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=patches@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=riku.voipio@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).