From patchwork Mon Feb 17 12:50:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 865923 Delivered-To: patch@linaro.org Received: by 2002:a5d:64e6:0:b0:38f:210b:807b with SMTP id g6csp1068902wri; Mon, 17 Feb 2025 04:52:19 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVAq76zCpj1FYaWQi0k0S+TkW0bLsR41AOPTWeTd+AFgaRy6q5rgdaT29KfXd5yDDTCYe0nNw==@linaro.org X-Google-Smtp-Source: AGHT+IHGupuQpQ1vf+8esWTSGSxlW6JW0SuuUmcSfWxGuNuGIw79cV8OQ0x+pO0p7WkOXjdEzYzZ X-Received: by 2002:ad4:5ecb:0:b0:6e4:8774:3743 with SMTP id 6a1803df08f44-6e66cf3d264mr128081976d6.41.1739796739673; Mon, 17 Feb 2025 04:52:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1739796739; cv=none; d=google.com; s=arc-20240605; b=M9/XAIHECmZVgc++5lud0lSWuqaqNPO7Anq+LLDs2nOG5fWzr8jDdXVzAEIhvNa1Tj i9zQ3MyvCt9CJrHO0SpPCjLHg/bKt5c2rIDWmNy7V6OoC5jkB2r7G4dxjiKHA6vpQjmJ dc0k8aFOSn+CgOFhW97PH2Ayfl/MhnglF9a8BXaWWTdBYDA9HXKVyvMVibBPQw2ZOx0g y2I2EDzT/ELfQSfGSHV/HkeME+cNBNatzjfnEK+D3SGB7fJfDHURbNDpB4mv3jbHeLlc MDnlODcP6z1lLAR9vZ4/5Mk6a7m8ir++MmOpRFjqEe3G3mXdXKU5csFB0i6038273y+J FtMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=0bvvc3Enq3kGNn8bnjLiI+WAHa6xgA+KATFzJxNZXkg=; fh=sX8zUUORJuGQY9ekiqVytwsRQCpKiqNE9LyGNVxaIX0=; b=JxTWU3nz48PuXJYglG/Y4doBC+kCE7O60qlkOh82rARyjGDy6BYBqBIyf3TDGGUc91 +j5go6w9bf/vExKyR73otazQsrneTHN6+wOCMvnT6OFO0DM3dSFJBv4p8yTJuQ3GOudF IY48OtvcoPdd5UFNafbzeotnggS/UB+vSz9l+4adtvMLW+i1gYmtGt0n5TFS7E8826Oj qKXVouGwPDrnZvPs96UztTeV8Qyaw3az90HFvqA8LyKIP+VdCufh1Liz021luDOFFSJR s9nk8WbA/8mlcvtQLTKK02mqH63161ao0l2oqvWfonWh0ekhD2cAYLXgLQSGIdTfIpGZ D+nA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yp9GJhgW; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-471c2b62a9csi88895311cf.550.2025.02.17.04.52.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Feb 2025 04:52:19 -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=pass header.i=@linaro.org header.s=google header.b=yp9GJhgW; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tk0ay-0001fC-4o; Mon, 17 Feb 2025 07:51:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tk0ae-0001cc-KW for qemu-devel@nongnu.org; Mon, 17 Feb 2025 07:51:17 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tk0ac-0002Gh-5Q for qemu-devel@nongnu.org; Mon, 17 Feb 2025 07:51:11 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-43967004304so19677045e9.2 for ; Mon, 17 Feb 2025 04:51:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739796667; x=1740401467; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0bvvc3Enq3kGNn8bnjLiI+WAHa6xgA+KATFzJxNZXkg=; b=yp9GJhgWrBvnRBugMDnIvPpbhlKYh0pPOEB5gl2j5xBkLZFw68WezlxSP6EhLMXX2U GXXfmhpecuwS8Krvk34+wUrPvqpkAavfADZBFrCiXGjoM4i+KNqV6ERase0rnxHs43o3 vMIqIz6Q+nbhSd6fBgBE1YZNJhUV07LpKV1Td0zSKKgpBsVPDnc0yuzXATOzQl5Dzp5l JWtmIFB2rBVKdi6WZcESRwKccYwDqFIm/Vx/lPSvLfwS8Yed7eQmx1sQGGeu4hHp6vS4 RTpWs5ygPMKC1Wjxa8X8XTg2/6WYuk+zOg7/gXBiMLykcQ2jR+L0dHmfchSXAlkfr3id 5kRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739796667; x=1740401467; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0bvvc3Enq3kGNn8bnjLiI+WAHa6xgA+KATFzJxNZXkg=; b=uk04he4BpkyidTZWR6SwjRXZ8TQrAObCHYgorAJh6liPFhYzYNBz5ytXIqy6NTVyWu C9EfWrYAEzmTwZFti+XeG8/pxpAMe5OeJNh97C+/4arPk9EWf39CnUiNSrJ6njT9Pa5L TnftX7qAvZ5EXbO8gQlfRZh6Anl2gt0mq/iFVudziAr2x44YXoSPIL7gtqC3pbbcpE5z HQH2DHo1VmdurxcysctFNEptczafWVWi7qUJE7uPu0eS5MokD/XCFwUTFm/kv1xZ949l BuwA3ePRxtMlMfcfjwwytzjNN9s7GNcZhMs1jXFBaUB6cVc87YXmSlAdXot/Iz894Zdw M5Cw== X-Gm-Message-State: AOJu0Yz6g2DGQ/A5dorPzF65uBYUZJc54L6e4DCXrUtGy+VyOYlkGVYD VmjU9ujJxTlQXyP7wPhWmfa7O+CXdv0d3LFi/gG2+u6PDi7Wad6RE89vxpHZTTYHcpy5g8x4bKF z X-Gm-Gg: ASbGnctQfcaN1OJXPtyZIdkrELaolswx9WfSVccQfXQ6wUgAmrhE+jZtTUNJovy70wO Q9147CeiXshsfxzJrlCTI4bHWLm0wvk4QA4vYfTtUBDNCVACNPaps1T9w9P8rlBR60qmtuKVZ8l geviBQkyw1JlhN++y+cPAHuJFYI8L+pOySTTMv/b5nNhG7bs1UCrt3u65DlNpBFmsQl/Jo18+/3 kbxKIOFATa3SuukFE/ExJ/Hiu0uWUgQL5IvTiiOU8GS0OZznUu6XgdImw1EY13k5UWoIhIfam40 faV4R1BSH9Wx/tOrXAwVmQ== X-Received: by 2002:a05:600c:3585:b0:439:5b36:b4e3 with SMTP id 5b1f17b1804b1-4396e6e19abmr80561085e9.12.1739796666736; Mon, 17 Feb 2025 04:51:06 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4398e84efb9sm3562455e9.10.2025.02.17.04.51.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2025 04:51:06 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , Paolo Bonzini , Eduardo Habkost , Laurent Vivier Subject: [PATCH 09/10] fpu: Don't compile-time disable hardfloat for PPC targets Date: Mon, 17 Feb 2025 12:50:54 +0000 Message-ID: <20250217125055.160887-10-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250217125055.160887-1-peter.maydell@linaro.org> References: <20250217125055.160887-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We happen to know that for the PPC target the FP status flags (and in particular float_flag_inexact) will always be cleared before a floating point operation, and so can_use_fpu() will always return false. So we speed things up a little by forcing QEMU_NO_HARDFLOAT to true on that target. We would like to build softfloat once for all targets; that means removing target-specific ifdefs. Remove the check for TARGET_PPC; this won't change behaviour because can_use_fpu() will see that float_flag_inexact is clear and take the softfloat path anyway. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- fpu/softfloat.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index b299cfaf860..b38eea8d879 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -220,11 +220,9 @@ GEN_INPUT_FLUSH3(float64_input_flush3, float64) * the use of hardfloat, since hardfloat relies on the inexact flag being * already set. */ -#if defined(TARGET_PPC) || defined(__FAST_MATH__) # if defined(__FAST_MATH__) # warning disabling hardfloat due to -ffast-math: hardfloat requires an exact \ IEEE implementation -# endif # define QEMU_NO_HARDFLOAT 1 # define QEMU_SOFTFLOAT_ATTR QEMU_FLATTEN #else