From patchwork Thu Jun 16 16:37:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 1983 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id B314718818 for ; Thu, 16 Jun 2011 16:37:22 +0000 (UTC) Received: from mail-vx0-f180.google.com (mail-vx0-f180.google.com [209.85.220.180]) by fiordland.canonical.com (Postfix) with ESMTP id 7E22BA188BA for ; Thu, 16 Jun 2011 16:37:22 +0000 (UTC) Received: by vxk12 with SMTP id 12so1844577vxk.11 for ; Thu, 16 Jun 2011 09:37:22 -0700 (PDT) Received: by 10.52.75.4 with SMTP id y4mr1520897vdv.167.1308242241812; Thu, 16 Jun 2011 09:37:21 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.52.183.130 with SMTP id em2cs199482vdc; Thu, 16 Jun 2011 09:37:21 -0700 (PDT) Received: by 10.236.170.68 with SMTP id o44mr1466231yhl.121.1308242240560; Thu, 16 Jun 2011 09:37:20 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk [81.2.115.146]) by mx.google.com with ESMTPS id z5si8851294yhh.39.2011.06.16.09.37.19 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 16 Jun 2011 09:37:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1QXFZD-00029u-A1; Thu, 16 Jun 2011 17:37:15 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Juan Quintela , Riku Voipio Subject: [PATCH 7/8] linux-user/signal.c: Remove only-ever-set variable fpu_save_addr Date: Thu, 16 Jun 2011 17:37:14 +0100 Message-Id: <1308242235-8261-8-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1308242235-8261-1-git-send-email-peter.maydell@linaro.org> References: <1308242235-8261-1-git-send-email-peter.maydell@linaro.org> Move the access of fpu_save into the commented out skeleton code for restoring FPU registers on SPARC sigreturn, thus silencing a gcc 4.6 "variable set but never used" warning. (This doesn't affect the calculation of 'err' because in fact __get_user() can never fail.) Signed-off-by: Peter Maydell --- linux-user/signal.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 11b25be..2e34ffb 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -2080,7 +2080,6 @@ long do_sigreturn(CPUState *env) uint32_t up_psr, pc, npc; target_sigset_t set; sigset_t host_set; - abi_ulong fpu_save_addr; int err, i; sf_addr = env->regwptr[UREG_FP]; @@ -2120,10 +2119,11 @@ long do_sigreturn(CPUState *env) err |= __get_user(env->regwptr[i + UREG_I0], &sf->info.si_regs.u_regs[i+8]); } - err |= __get_user(fpu_save_addr, &sf->fpu_save); - - //if (fpu_save) - // err |= restore_fpu_state(env, fpu_save); + /* FIXME: implement FPU save/restore: + * __get_user(fpu_save, &sf->fpu_save); + * if (fpu_save) + * err |= restore_fpu_state(env, fpu_save); + */ /* This is pretty much atomic, no amount locking would prevent * the races which exist anyways.