From patchwork Tue May 15 22:25:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 135948 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp83339lji; Tue, 15 May 2018 15:37:12 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoToqUBVxbJp06ZIs0JWnu5NYLKWWlGvSs8PHUAiQkCimQC1sUaBxoFxyeCzNJS7eph9rQY X-Received: by 2002:aed:3cf0:: with SMTP id e45-v6mr16017459qtf.276.1526423832893; Tue, 15 May 2018 15:37:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526423832; cv=none; d=google.com; s=arc-20160816; b=KpOuLg9X4E2HDt1MBYHwIY3/ZwUF8VgPjWECiQ5espr5aWxWkImwvgMW5tll4Xe+ey aAIMRkskXLwCvSUhwmzS2mSDrR3ne71RYLHLlnt68mZjKG5WmyjJPo+zvXiLT/Gkx6Dz q7FWDngByTaEiwk7cgdPs5Qrrh11lRJVX74YCa+IQjbjzph+m3mJ7XRbcsSHwW4kLdK+ Cd4AOjtbnTcweFhQvuVUPly1y2vcx8rjaJMt2IiBUdMOqQ41ILA5h+XkMPEdpIwo3BhV LyQ4TFxOB6bH4lCeJmFnspvD03bYt+A+MgcN2sB4sDkBZWC38pqKHw7o1VRUqN7VWWKB FT9A== 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=mL1Fv58u3wM7JFle68XlqaIy81EoC3LFZ+E3WNqLqM+a36nd3Xmtxqqgu964Pj/ysD 058nSGOM/8e7M/b2GRApeQ/ij80ApASzn0Ho88b0D3L1aO40SUK5ifDxTSowCytU4/Zn 2n9Y706H2X1jFo26neCcUVtaERQWc/N+jQhEGYtf3cfkBTOMcrjsFRM/KVBy8Z0S4gdn +gFEe1/uL4wmyLT2eUq/Gv7XDmpSun4CVia+as8Mt3fT8Cjdt83p04cJKbAe3OlCZwfd I+XJda9ZMeAjVChhT2BUqXj0JEzaAmtEOP439XdIv+LEYOz7qZW9oiN8/Opk9SRdcXHj CPbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=i1rLlJTS; 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 f202-v6si1241161qka.28.2018.05.15.15.37.12 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 15 May 2018 15:37:12 -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=i1rLlJTS; 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]:36367 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fIiZE-0002xR-Cd for patch@linaro.org; Tue, 15 May 2018 18:37:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fIiOU-0003WS-P5 for qemu-devel@nongnu.org; Tue, 15 May 2018 18:26:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fIiOT-0005yR-JU for qemu-devel@nongnu.org; Tue, 15 May 2018 18:26:06 -0400 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]:36934) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fIiOT-0005ql-Bt for qemu-devel@nongnu.org; Tue, 15 May 2018 18:26:05 -0400 Received: by mail-pf0-x243.google.com with SMTP id e9-v6so739515pfi.4 for ; Tue, 15 May 2018 15:26:05 -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=i1rLlJTSSyxjMrSTIMlmOSqMPS8oD+rlPDDc7bnZ7lmOOl7/IgHfRps7hwoV/7n0lr DvWGTMpwGh9T9i10xt9hYGNR8JSW/g940W1UJrz7KV459Ggr3tU22uNHT2xolXpTOTPV kZW5Y0gzvfj1I5UEezp+jtEUvmRQtfPVQr89o= 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=OD+Tj71TwN4V7ryt6YRNF6carzoQoLzsDxUpJeb1VpxN8M2mnKUaa4jP5ZHASlxp5F csR15ICLt34d+pPzTlHbkNiO6Kl/UAd3gQJmanAoAqD9R9AJxL/Fan/+vDj112tXThaj zABHuIpCAZVaEXFAKNu6UqQxkNqIy8oXlJZWI0V+kWrbNiIoh22+2NCM/Th+LFZZyTFs JPzpFpNxOeiPYxoIi5WIp9lTOUpI2OB9WGAAvyMnByjT2iRX07Nn0/Ggf9PvbP3O2R59 5CN4ohfCGvgtq6mL8W/jxqnas56vGn9sZwiSxjNffHLjlSfnejqRKFKlNQwPEVrwROWM i0Pg== X-Gm-Message-State: ALKqPwcjebgGdL1pf5qJI7pvkAKFe8xflinsNPcXjjCHSA7vDyAijttk ikOuFfoGYuIVKQTILy7vAu7CtyL8f1w= X-Received: by 2002:a63:7154:: with SMTP id b20-v6mr13713715pgn.13.1526423164059; Tue, 15 May 2018 15:26:04 -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 g11-v6sm941419pgq.62.2018.05.15.15.26.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 May 2018 15:26:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 15 May 2018 15:25:26 -0700 Message-Id: <20180515222540.9988-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180515222540.9988-1-richard.henderson@linaro.org> References: <20180515222540.9988-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:c00::243 Subject: [Qemu-devel] [PATCH v6 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, 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. 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. */