From patchwork Sat May 12 00:43:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 135596 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1570976lji; Fri, 11 May 2018 17:53:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp38GLec0YGABXt2UlBDKkXCOBZv+BPeRWYqwmWadnbjRHV9fJ2CoSSSiyI4z72mDaAw4Tz X-Received: by 2002:a37:129b:: with SMTP id 27-v6mr264622qks.96.1526086403626; Fri, 11 May 2018 17:53:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526086403; cv=none; d=google.com; s=arc-20160816; b=sxTxd/ZqPdtCvHIVxpIzLlyRVA2JAZxuWgM4MBUrnzTWuV8M7UdzpyXsiTf9EXyQAx kev6j9rqZt8vCZSJR+lHWjUQ+GgplYC92IW8joj3fs3+7sZwS5HyyX2pUz8ySpDx3NzI 6r+HhwCFKNMTDeBDvHOM0+of4wdl/niT16ZIiZ2dmXj9DNm1WT0vZ3LbnRRYb5qhPzUn BQQvUcXbVT/EdqHelgvwKPcNEJxSXc9eOaSdfiaYEUNIpFQGpYXRa5pswNnsUgwzF+Dy o3LqpgMtwZDdzSAFvufts37VjvxBAmhME1F/Ow2OBTO5P9GkPndFuIG+HvtM9MmUIcQw VzNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=azT2szVJWo3w0aiYlJcxf2GCjh0Q/WRHs+y2Wc2Yg20=; b=DiclSb+hk1IjEUyXiz4e5COLWRp01JferWq/+KzYR1RemQAFsq6PlPWjp3UiM0hPRD KFmcvbswG8+l81CwUXZgFGu/chCO+z8I/Om/6NXZgZ6R6nd3oHHUxJZeWXz+TSyS6NVR 4X8sC8jF9/6P5W5KuD3zWQWY09VOM2btGZxe0H1t7v4HHf40V+9uJGWMTRBN9ru9TDCV fCzyVhnKb0b0vOQIogk8OVNQEYpRY8b24EjpvPVdGL1r4Ip7wEF6tNx4sD64NXRI+sxA kE1GcUdS1WVgEzmunLduCq+/BxLGubfqdlFJ3V66pZi8wGyRsLsVG6c8Mp55hhOyrdON cJ5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=REB0Nzmd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id a187-v6si4432033qkf.205.2018.05.11.17.53.23 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 11 May 2018 17:53:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=REB0Nzmd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59303 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHImp-0008MF-27 for patch@linaro.org; Fri, 11 May 2018 20:53:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33518) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHIdP-0004kj-Bn for qemu-devel@nongnu.org; Fri, 11 May 2018 20:43:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fHIdO-0002xg-Ci for qemu-devel@nongnu.org; Fri, 11 May 2018 20:43:39 -0400 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:35291) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fHIdO-0002xN-6x for qemu-devel@nongnu.org; Fri, 11 May 2018 20:43:38 -0400 Received: by mail-pf0-x242.google.com with SMTP id x9-v6so3436894pfm.2 for ; Fri, 11 May 2018 17:43:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=azT2szVJWo3w0aiYlJcxf2GCjh0Q/WRHs+y2Wc2Yg20=; b=REB0Nzmd20pfDxij/AOfM6jbnTz0WpZLt3AGp2aX7iQTpEc6d9QoQwIeWtVfzDsZOK AcPrbT3MllPJnlCASijcDMTgl+DWQGiS5iV68DDX98w+ZXXNUtqfMD/1N/EvXQgPVmX9 pw2xAdiQ0vk7TfrogwcGViOAh0T1qZyIG4Gkc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=azT2szVJWo3w0aiYlJcxf2GCjh0Q/WRHs+y2Wc2Yg20=; b=CTUR8FdYXTx0GamEXnrx7VSBEuaPVej6Wdwfxv7XTZeR/QmxmfWlLkghVcDO36Mxcp 7RWI+DaAi+vU4207q09bcJv3CT1Xw/uGzyzrswnvGMp6uqrPBaf/r0IZRd1l/GhDLe2V kTEcncuUTCRNOolOWfA7WmrjA7ecMJ75XY84KjSnUSMk4cW1cMLPOdSNRwTlu+ZhxZSp 5rPgCsx/VCswc0D09EPdbyG2vBzHALC6vpRhV9Vin05w1uJ5AcMulcPZW7HuPwodLxZS RzwaTK2c1lrWTqqYHetvHwiyMPibMGY0Yrq3MybtFa/iQJstG05A3p+3rlCUSodRtn6V NMUQ== X-Gm-Message-State: ALKqPwfnPv2gQUox3onqbc1Y7Xi4pVkTcQccgSd2TiQgWDyWGULjrs1N EGkke8LTMvFtkkd8xkEU6lMBay/9Sa0= X-Received: by 2002:a65:6496:: with SMTP id e22-v6mr1002687pgv.386.1526085816803; Fri, 11 May 2018 17:43:36 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-2-170.tukw.qwest.net. [97.113.2.170]) by smtp.gmail.com with ESMTPSA id k84-v6sm10756406pfh.93.2018.05.11.17.43.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 May 2018 17:43:36 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 11 May 2018 17:43:00 -0700 Message-Id: <20180512004311.9299-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180512004311.9299-1-richard.henderson@linaro.org> References: <20180512004311.9299-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::242 Subject: [Qemu-devel] [PATCH v2 16/27] target/arm: Remove floatX_maybe_silence_nan from conversions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This is now handled properly by the generic softfloat code. Signed-off-by: Richard Henderson --- target/arm/helper-a64.c | 1 - target/arm/helper.c | 12 ++---------- 2 files changed, 2 insertions(+), 11 deletions(-) -- 2.17.0 Reviewed-by: Peter Maydell diff --git a/target/arm/helper-a64.c b/target/arm/helper-a64.c index 6f0eb83661..f92bdea732 100644 --- a/target/arm/helper-a64.c +++ b/target/arm/helper-a64.c @@ -466,7 +466,6 @@ float32 HELPER(fcvtx_f64_to_f32)(float64 a, CPUARMState *env) set_float_rounding_mode(float_round_to_zero, &tstat); set_float_exception_flags(0, &tstat); r = float64_to_float32(a, &tstat); - r = float32_maybe_silence_nan(r, &tstat); exflags = get_float_exception_flags(&tstat); if (exflags & float_flag_inexact) { r = make_float32(float32_val(r) | 1); diff --git a/target/arm/helper.c b/target/arm/helper.c index e05c7230d4..db8bbe52a6 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -11348,20 +11348,12 @@ FLOAT_CONVS(ui, d, 64, u) /* floating point conversion */ float64 VFP_HELPER(fcvtd, s)(float32 x, CPUARMState *env) { - float64 r = float32_to_float64(x, &env->vfp.fp_status); - /* ARM requires that S<->D conversion of any kind of NaN generates - * a quiet NaN by forcing the most significant frac bit to 1. - */ - return float64_maybe_silence_nan(r, &env->vfp.fp_status); + return float32_to_float64(x, &env->vfp.fp_status); } float32 VFP_HELPER(fcvts, d)(float64 x, CPUARMState *env) { - float32 r = float64_to_float32(x, &env->vfp.fp_status); - /* ARM requires that S<->D conversion of any kind of NaN generates - * a quiet NaN by forcing the most significant frac bit to 1. - */ - return float32_maybe_silence_nan(r, &env->vfp.fp_status); + return float64_to_float32(x, &env->vfp.fp_status); } /* VFP3 fixed point conversion. */