From patchwork Wed May 16 15:52:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 136026 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1117937lji; Wed, 16 May 2018 09:08:14 -0700 (PDT) X-Google-Smtp-Source: AB8JxZptkHw5BLzoSdsGaGYBab9U7YNdUbsU8W3Cb6wVvYDS6z9dsARhL8tfn6PodEGwK/cNH9/P X-Received: by 2002:a37:bd7:: with SMTP id 206-v6mr1437798qkl.407.1526486894771; Wed, 16 May 2018 09:08:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526486894; cv=none; d=google.com; s=arc-20160816; b=VUVisEqmZfGay1mdJ6GYeuDHxA/ttGH+qcQEkNlVVLP4G0iQBmInO83NlYwIt4KBh/ /SbkgFKt+m/netKd9S1/C5cR3T88STh+XCXmFTb1uIoYvpygcFbUfS9V3m/7wPjoyoJ+ Zt5wkYYDgPlRxrALxyO2wJpjEAWibjCGn3junsO+jsVzbHDdDpr86oK6EapDyDaEuIsy JyEHuR/ASbCkkYNjvD4FJvsZZelY1brkxvEoVqqlSq23IS6N6wWG13zOGXO6mlf/q7rM FvA5lMRIscdyUz7UzgOng0ZzENIKkwdilq/FY9tG91f2jw/PzHvw4Gxhg/w+m5BK5MOq 9SbQ== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=cSZ33bwDEVkNnz6+2oRZOYUtCrbSKbPYkMTqNAn1iAA=; b=xD/LZyvlelVh5UtrT0XTe1HJ+qQXWxKuSObXWEpi7AKO6JL89M8F58+ZOhYjbiEkz5 nOSsX4h26WtstorPtgtNaI4SsUeJkTH9p8zUdDOU/J+83h9/QXmMBBrPUwIaK8BEZG3n /ztfr2rX3c9jE6sqKGI+jdFb71xKJ4TkFOdGNa/UxljOmAyQSRqrtbTHN2xJi/gFrp4i eHTrpXXHHYqp0BiNzqddmVuSUF7kaxvty/46etGDtsOOlfm2EtX2idFuSf3YI6+YPgwn 1sqdQiRqE95UCtMGe+mrjzgasr1mMesdHL9XVTpz0IednBD2pYUGihYwPxBCGWCsrUla NeLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Dp1FFT4q; 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 y126-v6si2917965qka.302.2018.05.16.09.08.14 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 16 May 2018 09:08:14 -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=Dp1FFT4q; 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]:53192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fIyyM-0007pm-3z for patch@linaro.org; Wed, 16 May 2018 12:08:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fIyjl-0004Tu-E7 for qemu-devel@nongnu.org; Wed, 16 May 2018 11:53:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fIyjj-000558-KC for qemu-devel@nongnu.org; Wed, 16 May 2018 11:53:09 -0400 Received: from mail-pl0-x242.google.com ([2607:f8b0:400e:c01::242]:40499) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fIyjj-00054y-EW for qemu-devel@nongnu.org; Wed, 16 May 2018 11:53:07 -0400 Received: by mail-pl0-x242.google.com with SMTP id t12-v6so667440plo.7 for ; Wed, 16 May 2018 08:53:07 -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 :mime-version:content-transfer-encoding; bh=cSZ33bwDEVkNnz6+2oRZOYUtCrbSKbPYkMTqNAn1iAA=; b=Dp1FFT4qSc3B7EMp27YGnq1ZkZeUIy92hBiIsTQ8bflVsS9UbdJWFb/KK1E7Es8HmB DaaseXVV9La+kGMtUuIr2y/u589M6FSFr0AZwGpFkInjlFRW5Nu0g1dzxyJHpBAaiaZv tkcvOK8kClfEuqjVfP+iBGxAY/pu58vI/t4mQ= 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:mime-version:content-transfer-encoding; bh=cSZ33bwDEVkNnz6+2oRZOYUtCrbSKbPYkMTqNAn1iAA=; b=dsFDmM+RU6c6guDsEVXnz+RwrXiwwvLdmSlote7WLiQ2E54Dlf/9sR7L3oU7uq57DZ QprliC2FR7L35/BS29N2USiUb19c6Z9p66+OZM/Z7gYrNy81tLauXB03eewX+1ry0FwK bgKMdfzNuXfHwvl1PT5drI0FaBB9XA5054ubr7yusGhgxkpJBsjuTNxkcLTNjhlKPpST KwlZu04/MxGx8eJI8Hoa7RJdfhbcK1f2ryQdN866yzlChoz7+vBykOYk6Zj4fU1jHAWB JC5DU2GFhNxhh11Tdl1ItkYshIvGx4QIxrZv9+7qTr2a8ZvKP8zKEYzjpK5/gkKigze2 lwhg== X-Gm-Message-State: ALKqPweA4blmXgc+wii/zjjknJO3FYBeoDeT4bmfvGojiy4831O9bUEj 3s5t1wYM8YjoqZGNsP3HeSde+00qoag= X-Received: by 2002:a17:902:c6b:: with SMTP id 98-v6mr1498860pls.270.1526485986121; Wed, 16 May 2018 08:53:06 -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 c3-v6sm4966632pfn.62.2018.05.16.08.53.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 May 2018 08:53:05 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 16 May 2018 08:52:29 -0700 Message-Id: <20180516155243.16937-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180516155243.16937-1-richard.henderson@linaro.org> References: <20180516155243.16937-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::242 Subject: [Qemu-devel] [PULL 14/28] 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 Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This is now handled properly by the generic softfloat code. Tested-by: Alex Bennée Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell 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 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. */