From patchwork Fri May 6 12:48:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 1375 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:51:31 -0000 Delivered-To: patches@linaro.org Received: by 10.224.184.145 with SMTP id ck17cs137356qab; Fri, 6 May 2011 05:48:21 -0700 (PDT) Received: by 10.68.48.133 with SMTP id l5mr4683997pbn.360.1304686100529; Fri, 06 May 2011 05:48:20 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk [81.2.115.146]) by mx.google.com with ESMTPS id g1si9593500pbe.145.2011.05.06.05.48.18 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 06 May 2011 05:48:19 -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 1QIKS7-0007so-GI; Fri, 06 May 2011 13:48:15 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org Subject: [PATCH 7/7] target-arm: Signal Underflow when denormal flushed to zero on output Date: Fri, 6 May 2011 13:48:15 +0100 Message-Id: <1304686095-30265-8-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1304686095-30265-1-git-send-email-peter.maydell@linaro.org> References: <1304686095-30265-1-git-send-email-peter.maydell@linaro.org> On ARM the architecture mandates that when an output denormal is flushed to zero we must set the FPSCR UFC (underflow) bit, so map softfloat's float_flag_output_denormal accordingly. Signed-off-by: Peter Maydell --- target-arm/helper.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index de00468..149fc82 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -2355,7 +2355,7 @@ static inline int vfp_exceptbits_from_host(int host_bits) target_bits |= 2; if (host_bits & float_flag_overflow) target_bits |= 4; - if (host_bits & float_flag_underflow) + if (host_bits & (float_flag_underflow | float_flag_output_denormal)) target_bits |= 8; if (host_bits & float_flag_inexact) target_bits |= 0x10;