From patchwork Mon May 14 22:12:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 135767 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp191483lji; Mon, 14 May 2018 15:19:35 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr8hO6B8rK79clIaggsqTryNMOarFHxE68dDl2vOhfRVVqaRdOT0Hhmau1dHjDlYh2E7d4f X-Received: by 2002:a37:8503:: with SMTP id h3-v6mr9742284qkd.199.1526336375614; Mon, 14 May 2018 15:19:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526336375; cv=none; d=google.com; s=arc-20160816; b=cRahFuqcF/H/9OhAoFzFXnTaKcbC1QMkRUlAJhtw3iY/UE6k3HvhBQ5VXsC4X7wi4b m4MjRUn9OSFNguenL1QC1to/RaXyhlCuZ3/GaNEYX1pDxXZK910cxVYFKQxDKb308yH+ QnlR8oCl/6nWnD90aczhcgOuJsEMXqs7dXpuUrJ/nrl4WCGDcvNAd0f503xRKPtr30wL 5PK5VEyjC70UvnmsKSApdEYYjUr/NlVwBfQjSl0NbYl+tdJPFP0kmrGQfdljOlwY93OR 2biny4q8gqdoPkf+a2YQmcL/XX7JjkhSh1I0hgSB7ObImADiWAlQTNztSbpCifrmJclK g+cg== 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=3p1uYPjT+Qh7BPWBI2DONjm1ihiuZReCWqTClVy4o+c=; b=vp7a20USAd3KXZrrv02/54m4fyaSqC+dLdlcvYMmkhpSqHGbAXXrVZWRvkcAguemQK M3Q8mZ3JmM5EFXZYdH7MRss7nmDI/wIbSzgKlLdMlw5cgecaWTUBwAZ583QjUbow59YQ lCe6K/MSinvSbGOgyihIjQ0+AObGLRdMu0JeFmI1jQnxiqSSkw1n5VxoxdvZQD6esdmj eU5plP4rUM+T8FDvUhmWLoF9Q54y1sL6gjTj1sDsOjH/LLU/1V2w2BTmI0HUCUAcB9v/ NZv7kUtkH4v/SG3dSHwsI219E+hMX4+asFcS8ym6QkNYyvEAVcjg3ONnijLrW6Y4a8c7 avzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=MftfZeHn; 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 d88-v6si1430394qkh.133.2018.05.14.15.19.35 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 14 May 2018 15:19:35 -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=MftfZeHn; 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]:49913 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fILoc-0005Hp-Vu for patch@linaro.org; Mon, 14 May 2018 18:19:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fILhw-0007zT-J7 for qemu-devel@nongnu.org; Mon, 14 May 2018 18:12:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fILhv-0007pc-MM for qemu-devel@nongnu.org; Mon, 14 May 2018 18:12:40 -0400 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]:44297) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fILhv-0007o7-HU for qemu-devel@nongnu.org; Mon, 14 May 2018 18:12:39 -0400 Received: by mail-pg0-x241.google.com with SMTP id x145-v6so6057473pgx.11 for ; Mon, 14 May 2018 15:12:39 -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=3p1uYPjT+Qh7BPWBI2DONjm1ihiuZReCWqTClVy4o+c=; b=MftfZeHnFRwIvAEpXl6i8nx22jPVEbWx/bZgX4etNf8Di/jK2g4Hcq3qtJHBwEi7RO DVu1Io1OMZlFda4Z/dgzNtiM3gfvAEPbPKBZ4+XBRi8CIv8hPjVpt4jGpqVbueOM7ma8 qiRWSUToNAVBgj9PBPsXJ3NdYTfAQfPSFKkm4= 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=3p1uYPjT+Qh7BPWBI2DONjm1ihiuZReCWqTClVy4o+c=; b=d2Uu5rwY2z7UUFLQZ7RtkZFjRKpB/TPf1fuiLsRAaT6Z8rBm4QKvaPrNs1zu0MncWS gz8FF8gCVo+JuQJyk5iZyRB7rNKq3hgeli0+djWbPUWWQQZ5aFveIiZQgLmrk8+eUX9Y XwmtY3BwDGNhVDkYOqdb3h0KCH8xP64l7PkI2htzBRbmQXRA5NrkSSMDGu35Etd6LFUb M7tpI6Uqjh8aPLzYVBYBMtTQ7AfAteO2uyg1XGZzR7SUIooP/FpYCEKWxM0f8dMCUNVp D/3gDKMA5AaR2ecJ46RqYk4mYLg29/irioTypjSPFCsIVoCtKGzM+RGziQ/+sxkyeiRC FSiQ== X-Gm-Message-State: ALKqPweyUMcYbf6mtxDRu36xFoVN40dNhE6BhLDbCvlhhiFniY7+a2OB hD0/Es11Xv9BQ032zP+GVjZEkRMgo9Q= X-Received: by 2002:a63:5f11:: with SMTP id t17-v6mr8331778pgb.94.1526335958243; Mon, 14 May 2018 15:12:38 -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 y2-v6sm14512457pgp.92.2018.05.14.15.12.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 May 2018 15:12:37 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 14 May 2018 15:12:03 -0700 Message-Id: <20180514221219.7091-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180514221219.7091-1-richard.henderson@linaro.org> References: <20180514221219.7091-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:c05::241 Subject: [Qemu-devel] [PATCH v5 12/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. 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 Reviewed-by: Alex Bennée 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. */