From patchwork Tue Feb 11 16:25:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 864075 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:1289:b0:385:e875:8a9e with SMTP id f9csp323985wrx; Tue, 11 Feb 2025 08:28:16 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWeTTFuljTvtU8R/OBI/0LmJIv/CIXhorlmXZnVvgFpqcGWrrFxVWehXcNivpeALMUM5/i1Yg==@linaro.org X-Google-Smtp-Source: AGHT+IG0SrEsi6Cp9BPnn9IFvIlk9aAb9gr+AXvGwV6NzHOIiTzBp0avw6yIRt1XP5OAP4naxBX/ X-Received: by 2002:a05:620a:3e83:b0:7c0:522f:165f with SMTP id af79cd13be357-7c0522f1712mr1560255285a.56.1739291296103; Tue, 11 Feb 2025 08:28:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1739291296; cv=none; d=google.com; s=arc-20240605; b=E6jTBz+yJqryjCn6nRXeyVfWbANq2lHXRaHMoCEPOyU3YD5NA8e0KAyYPLZpskh/16 E3YhiVngUZUOjfBEt/KKw2vEeZZg8xHUQYsZishlS3aZjob9IrLsMGeQmrGRYEn2SYHZ 6lkUAwwa3z9fl256aDx9OQpWCEoDuuUFzuBZXKhPOjI2JzWPc7WnXezeHDZMIbB7V2yW afObKOAdWFT1DmpGwx/K/grgB8A+NThyM5FOWDoGkKOtkYc3CW192tlWPSK+ytgANsWP Zk/T18781/yZhbz9vxy0Y6QbWu4ac2owznoraNlv6jU1a+INtyzCRwy9oM6vBv3zHfA3 JFKQ== 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:to:from :dkim-signature; bh=0k0Kw4Ra8wn9+INZJ2lXGRkC7tjdgx3LJCN8hyvaYL8=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=fccwvXTQZnfDGX5PlsD7+W+Lm45QdOfX5P+IMIQQoKBynMF/X3S/wDrXHHGb8fzrD5 wo23Q0aSPz7tKZUeBT80ZsawhV6sCEXV0wxkMyaFUBL1HQ34Vl2ppIN2cNSSqilTZZ6Q dDxmVmERsbtMY0cDgiYCAePbnxrRyALy3hDaHaoPBYjFAs2GRN5c04rV+0kBqzcw/ELC XY06jLUtfH+/N9rcxBBrOmq0D9Z4IhYI7phIWhAanrN+3sQydT18eVVvQoAJkRBJ1JB2 CemF0rabIaFwCkuh21S6kM7aCZkx3tCgmJM5+PazMiel83EZ2g4EP/QnNZwnJqFWHWds u3cA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TtKXpcly; 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 af79cd13be357-7c041df5933si1139714985a.34.2025.02.11.08.28.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 11 Feb 2025 08:28:16 -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=TtKXpcly; 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 1tht5d-0006Vb-NR; Tue, 11 Feb 2025 11:26:26 -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 1tht5V-0006Sp-Tx for qemu-devel@nongnu.org; Tue, 11 Feb 2025 11:26:17 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tht5U-00036n-9W for qemu-devel@nongnu.org; Tue, 11 Feb 2025 11:26:17 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4394820123dso13876255e9.2 for ; Tue, 11 Feb 2025 08:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739291175; x=1739895975; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=0k0Kw4Ra8wn9+INZJ2lXGRkC7tjdgx3LJCN8hyvaYL8=; b=TtKXpclyAcQCssMik9eO4l5dkDHjNSYZu6dSgzS14P4cMSPMDdFN5Fen7V9w975Qy/ xvCkfTR6f6d47b/bi48g1nLraSDBtgXbS+5kRLsNIvciul4Misy/7/OSbRhKNFSw1JnD 928y6p1PpiyTXkoV5O9IfPRy+ba/l4ip4JeDQTEv5VCpOR0hM3waOchh+Kl1wjgTa75d 5vqyjt2b54JpJIusQ/cXcw5u5daQESXFDl8nTDab/ZTNQ4RtpbueXGJxSitf+ZQOCXaC Ql02QDuSSP60UFt75rAyhKvBh5i/b6AnzRiEOMGXDeAffSZmJwThWA+WiIUl/kX8JVfN Jxuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739291175; x=1739895975; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0k0Kw4Ra8wn9+INZJ2lXGRkC7tjdgx3LJCN8hyvaYL8=; b=TDCzApo6fUmCHTb0wWAgHMAXJ5haDNCv8r/xDSkaHU3Y99sq8ZmWHzOXYkhA8Fsx/n k0fVZ7rKvCkKGRnTd3sO/RS9PMS4c7JiaPzZDsILo51HvHUZk4fH9+9/hcnh9fzhd37c 6t07MbMU2Jn0QkC7g1EDJKiSXK8UB3UHU4MK9wHZ/QWThno8Kw4rI0VNKULho/CA5GIJ cF8gEMJJQ1j4wwdFdNN8DtoOIs0lZhE5Y+wJ2/A+/UpEvnMMZYb9v94Jr3wcJM0oXELw CeO60m0sLdsLUKDOZYiIff+BcYYSseoJSuSnU8g92UVevZqKgjODsugxkp7zSc4G1YdR JZBQ== X-Gm-Message-State: AOJu0YzNWmkVYtM4UWeZhBXfP6QnaGPfiFgQlTzPJXP7c8AOO4svTnS7 opKQdvcyVBR0/vCXSXmqIhPoxnr3YH57U4ng0rBsMzTrDVMCd+r6Yn54BQwdFWzabeID/9nvZCp K X-Gm-Gg: ASbGncu3qBpdn9TA7IxdpiIUbf68QTX0CXcIwiPIKv6EQZm7MAwe25H4Nji2tGvirOL AyrahBufQZ9e5qje2oB8ySYFdk0vbIQshMUH6H4a39/ZTBmYFho0v8ZxzBJ9zgweu6KYcV27pHL XAcgQvJzL5mpGjxp0DT5qJlvVARQ8rOfO+L0SQpjSmvElL9MEH23virmHOpKifuRL0wsoAiz/c3 6aIb5zJ2MPli68C6Aj2jskA7KNPWz/R6MxtivmfPcplaMY8EFWtDRpKmA2yz/HZ6s27/D3FNu/h fZC8Tu9fc2+ABtT6mVTS X-Received: by 2002:a05:600c:55d9:b0:431:54d9:da57 with SMTP id 5b1f17b1804b1-4392508f359mr174446735e9.30.1739291174776; Tue, 11 Feb 2025 08:26:14 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4393f202721sm82660455e9.21.2025.02.11.08.26.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2025 08:26:13 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 16/68] target/arm: Handle FPCR.NEP for 3-input scalar operations Date: Tue, 11 Feb 2025 16:25:02 +0000 Message-Id: <20250211162554.4135349-17-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250211162554.4135349-1-peter.maydell@linaro.org> References: <20250211162554.4135349-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x329.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 Handle FPCR.NEP for the 3-input scalar operations which use do_fmla_scalar_idx() and do_fmadd(), by making them call the appropriate write_fp_*reg_merging() functions. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index 67c85db4775..3f6e31d36a5 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -6345,7 +6345,7 @@ static bool do_fmla_scalar_idx(DisasContext *s, arg_rrx_e *a, bool neg) gen_vfp_negd(t1, t1); } gen_helper_vfp_muladdd(t0, t1, t2, t0, fpstatus_ptr(FPST_A64)); - write_fp_dreg(s, a->rd, t0); + write_fp_dreg_merging(s, a->rd, a->rd, t0); } break; case MO_32: @@ -6359,7 +6359,7 @@ static bool do_fmla_scalar_idx(DisasContext *s, arg_rrx_e *a, bool neg) gen_vfp_negs(t1, t1); } gen_helper_vfp_muladds(t0, t1, t2, t0, fpstatus_ptr(FPST_A64)); - write_fp_sreg(s, a->rd, t0); + write_fp_sreg_merging(s, a->rd, a->rd, t0); } break; case MO_16: @@ -6377,7 +6377,7 @@ static bool do_fmla_scalar_idx(DisasContext *s, arg_rrx_e *a, bool neg) } gen_helper_advsimd_muladdh(t0, t1, t2, t0, fpstatus_ptr(FPST_A64_F16)); - write_fp_sreg(s, a->rd, t0); + write_fp_hreg_merging(s, a->rd, a->rd, t0); } break; default: @@ -6856,7 +6856,7 @@ static bool do_fmadd(DisasContext *s, arg_rrrr_e *a, bool neg_a, bool neg_n) } fpst = fpstatus_ptr(FPST_A64); gen_helper_vfp_muladdd(ta, tn, tm, ta, fpst); - write_fp_dreg(s, a->rd, ta); + write_fp_dreg_merging(s, a->rd, a->ra, ta); } break; @@ -6874,7 +6874,7 @@ static bool do_fmadd(DisasContext *s, arg_rrrr_e *a, bool neg_a, bool neg_n) } fpst = fpstatus_ptr(FPST_A64); gen_helper_vfp_muladds(ta, tn, tm, ta, fpst); - write_fp_sreg(s, a->rd, ta); + write_fp_sreg_merging(s, a->rd, a->ra, ta); } break; @@ -6895,7 +6895,7 @@ static bool do_fmadd(DisasContext *s, arg_rrrr_e *a, bool neg_a, bool neg_n) } fpst = fpstatus_ptr(FPST_A64_F16); gen_helper_advsimd_muladdh(ta, tn, tm, ta, fpst); - write_fp_sreg(s, a->rd, ta); + write_fp_hreg_merging(s, a->rd, a->ra, ta); } break;