From patchwork Fri Nov 19 16:04:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 519263 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp2739407imj; Fri, 19 Nov 2021 08:22:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJzRva9LaS+1Z9wQzeQ2JGO1TYQdVaF7qoTK5nEKPi0IyqpA9m8AKKZS/rj4EUUpe85KjtcI X-Received: by 2002:a0c:fa07:: with SMTP id q7mr75395392qvn.18.1637338963002; Fri, 19 Nov 2021 08:22:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637338962; cv=none; d=google.com; s=arc-20160816; b=o7ImSdqearq2CIaw7YhKsVPgjPC1uuFUWm8Hw5zUzaI11ynSt0NM1VARNKCnKy+NGg 8SFk12Uueu1lwDnVN0rtqVtXaAlpiqn3VhzigrPuOlufScgFcH82NsBoTeuDiWCnCGFH WmhYQeVOUGOd5zA7SGOknQAulI6VhQHf74ZGdTG7L0+kLqz5QABjmyKcduYc+Y5ihJj3 gnXwy6UK0Y1c4hWkqwFVDAYnCsrgggVqpVrzz61yjcOwFDuWzWr5Q4uT/fKUyDeeGkit FrjHOQqn/ZtJo2+Cz7rh5bxSKqd7gEnydS7x+mt2YgayFJ99euadEno05xn+n7Xcz3fU ul6Q== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=s7EfQpdLCHZf6QMUUM6cZX2T9EjRc0bCKi3InTs2Bf4=; b=KSZFce462QEF/nrGJHct6bqgBS/5T693xWcaItc8cXWM51tFDF+tXj47/U6MFcQpRV ZgljGzWaLooCm1AAiNkKotuonOqT3p5/seQaZUWcCo7Vm5sWhAfNLrTd8pfSzYAPILI5 l2HJuuIq4M4xG3pA3Vkbu3FZbm5jS0eD696V/9JmIzl60THay41IIuOkiCsb+JYTWzre npCZjx9gR5m+GZMLORxSrrJXMix2SLy5vZ1RgB6jtnmti7ahUvpVkYvBbwDfBoBBcnXT s3OH6sSR7n2fmOFhhzb6PnHDtTeq78R8/oPScvsIRQMHovN6XzsTHT7XjktfarpubBxK Qoxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=oN0Payc1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id w18si829014vsk.28.2021.11.19.08.22.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Nov 2021 08:22:42 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=oN0Payc1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:39316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mo6ew-000290-Fh for patch@linaro.org; Fri, 19 Nov 2021 11:22:42 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43822) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mo6Oc-0005UU-Dv for qemu-devel@nongnu.org; Fri, 19 Nov 2021 11:05:50 -0500 Received: from [2a00:1450:4864:20::330] (port=36647 helo=mail-wm1-x330.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mo6Oa-0004I4-KG for qemu-devel@nongnu.org; Fri, 19 Nov 2021 11:05:50 -0500 Received: by mail-wm1-x330.google.com with SMTP id i8-20020a7bc948000000b0030db7b70b6bso10873589wml.1 for ; Fri, 19 Nov 2021 08:05:47 -0800 (PST) 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=s7EfQpdLCHZf6QMUUM6cZX2T9EjRc0bCKi3InTs2Bf4=; b=oN0Payc1KdvQt/frd+8tdypM6VnvGDgj6AacPRA8rZfr34RhKbL7srm9s1uoBJOAw/ rFtbR83yy/wHGA/ZN8Z/6c/rJ5FGIRddbO+KGCdhX3ZLfcNJm4n0ru0QzTzKurrdM4jQ SyVakHLMfNHbK69iGqYBnt2pB2b0NtS9qA8Rvl5O74IMlnssQ7rJwU3xgi8Mvp4XGoSv DbWkCvroTJ/M1xuj1j74qoZqmZcyPv1UXOed6AqdtWsjHFX6Wb/igJot0ryqH1j2HZKF nSsaE1vMIrbg2vP3t3jVcoVdn8+vaR8VAQ3h8t5z+qF9FoTFy7DhbjGqy6HIpk0cuNGU lqEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=s7EfQpdLCHZf6QMUUM6cZX2T9EjRc0bCKi3InTs2Bf4=; b=4o0iI6Hd4KE/qqy4Xv/B3bFBYusdcSXMtsfFS5NQ5avsoZG8TWg5H+XuvGSVG/ejPb VW2YalHb5Hnt9svrC8pzUhfdzme/s+v484anYx409Mv4mtHFwQErwWAi52MPmh6c9Vsr YAyEvskVt/fuCbc8gD8KGljHknOIqXvvuFG/cjL4Y8SMcRsNgBcHRX6U00PzzJoqPcYw xL7fKSdI8GkWGC/tSA10XOJSyGV7tJFkhLgXYQOl+3kPHU4WHR5K4nYPlvtQBHcWtorO DUVthNDDb6HKyyWfzvH6U89Jd0trvWnzhcZwN91+oGi/naoSMR/tA2S/IVZKrtfQQWxn hXjA== X-Gm-Message-State: AOAM5310Ysz5j1InoH32Y1p90vs5Znq1NT10Hz5c5uars5ApHR/F7a+8 xTV3U4eTmO1SpXlUwWsPRMklhUPxbrxX5FrYJWg= X-Received: by 2002:a7b:cf25:: with SMTP id m5mr883885wmg.51.1637337946897; Fri, 19 Nov 2021 08:05:46 -0800 (PST) Received: from localhost.localdomain (165.red-37-158-79.dynamicip.rima-tde.net. [37.158.79.165]) by smtp.gmail.com with ESMTPSA id q84sm14044877wme.3.2021.11.19.08.05.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 08:05:46 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 16/35] target/ppc: Tidy inexact handling in do_fri Date: Fri, 19 Nov 2021 17:04:43 +0100 Message-Id: <20211119160502.17432-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211119160502.17432-1-richard.henderson@linaro.org> References: <20211119160502.17432-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::330 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, danielhb413@gmail.com, alex.bennee@linaro.org, clg@kaod.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" In GEN_FLOAT_B, we called helper_reset_fpstatus immediately before calling helper_fri*. Therefore get_float_exception_flags is known to be zero, and this code can be simplified. Signed-off-by: Richard Henderson --- target/ppc/fpu_helper.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/target/ppc/fpu_helper.c b/target/ppc/fpu_helper.c index 535002741a..ec0288df01 100644 --- a/target/ppc/fpu_helper.c +++ b/target/ppc/fpu_helper.c @@ -606,16 +606,12 @@ static uint64_t do_fri(CPUPPCState *env, uint64_t arg, float_invalid_op_vxsnan(env, GETPC()); farg.ll = arg | 0x0008000000000000ULL; } else { - int inexact = get_float_exception_flags(&env->fp_status) & - float_flag_inexact; set_float_rounding_mode(rounding_mode, &env->fp_status); farg.ll = float64_round_to_int(farg.d, &env->fp_status); set_float_rounding_mode(old_rounding_mode, &env->fp_status); /* fri* does not set FPSCR[XX] */ - if (!inexact) { - env->fp_status.float_exception_flags &= ~float_flag_inexact; - } + env->fp_status.float_exception_flags &= ~float_flag_inexact; } do_float_check_status(env, GETPC()); return farg.ll;