From patchwork Thu May 19 13:46:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 96400 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B1F79B6F7B for ; Fri, 20 May 2011 00:59:17 +1000 (EST) Received: from localhost ([::1]:47126 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QN3if-0001nx-4q for incoming@patchwork.ozlabs.org; Thu, 19 May 2011 09:56:53 -0400 Received: from eggs.gnu.org ([140.186.70.92]:34107) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QN3iD-0001kk-CZ for qemu-devel@nongnu.org; Thu, 19 May 2011 09:56:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QN3iC-0002RT-I0 for qemu-devel@nongnu.org; Thu, 19 May 2011 09:56:25 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:33236) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QN3iC-0002RA-CS for qemu-devel@nongnu.org; Thu, 19 May 2011 09:56:24 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1QN3YR-00062O-CS; Thu, 19 May 2011 14:46:19 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 19 May 2011 14:46:18 +0100 Message-Id: <1305812779-23175-6-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1305812779-23175-1-git-send-email-peter.maydell@linaro.org> References: <1305812779-23175-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 81.2.115.146 Cc: Paul Brook , Aurelien Jarno , patches@linaro.org Subject: [Qemu-devel] [PATCH v2 5/6] target-arm: Signal Underflow when denormal flushed to zero on output X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.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 f072527..05b3ccc 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;