From patchwork Tue Apr 12 12:56:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 974 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:47:53 -0000 Delivered-To: patches@linaro.org Received: by 10.68.59.138 with SMTP id z10cs176898pbq; Tue, 12 Apr 2011 05:56:44 -0700 (PDT) Received: by 10.213.8.22 with SMTP id f22mr922258ebf.138.1302613003719; Tue, 12 Apr 2011 05:56:43 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk [81.2.115.146]) by mx.google.com with ESMTPS id u13si15840280eeh.3.2011.04.12.05.56.42 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 12 Apr 2011 05:56:43 -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 1Q9d97-0004ZP-AK; Tue, 12 Apr 2011 13:56:41 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org Subject: [PATCH 2/2] target-arm: Detect tininess before rounding for FP operations Date: Tue, 12 Apr 2011 13:56:41 +0100 Message-Id: <1302613001-17540-3-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1302613001-17540-1-git-send-email-peter.maydell@linaro.org> References: <1302613001-17540-1-git-send-email-peter.maydell@linaro.org> The ARM architecture mandates that we detect tininess before rounding, so set the softfloat fp_status up appropriately. Signed-off-by: Peter Maydell --- target-arm/helper.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index ce9a9d8..9172fc7 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -269,6 +269,10 @@ void cpu_reset(CPUARMState *env) set_flush_to_zero(1, &env->vfp.standard_fp_status); set_flush_inputs_to_zero(1, &env->vfp.standard_fp_status); set_default_nan_mode(1, &env->vfp.standard_fp_status); + set_float_detect_tininess(float_tininess_before_rounding, + &env->vfp.fp_status); + set_float_detect_tininess(float_tininess_before_rounding, + &env->vfp.standard_fp_status); tlb_flush(env, 1); }