From nobody Sat Apr 5 01:27:41 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1739291681; cv=none; d=zohomail.com; s=zohoarc; b=Q2+lqRXk/EnDk5q+lvg0wmZg+PhD0P0ZuC3+vi8BNIUsstr0qF4o7uoiQ+esZG73CmQJjbmJiNN8LlL1qQPcwHokxxJ5HWPwWOF0IbcV/jdcu5A7dnmfoeYitaGmxiEfkwsKObOpnr1Juocx70JTG6909us0Qde6mTIKNl/XnlA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1739291681; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=0HZn+lA/3QK6V9nAt4Z7tzwLTmDhEfAS7cpqC5pJp9g=; b=TV8lAugAWFFbZs/KTW7t6wDHkfIOEBbxf6WnGHPz9QfJdfxVoHr+r7zmg/ggHuuAeTImX4ZnhFtBPpcd3gm1kNreOw14o9lHFoyAwW75nLojcNK7WLtuQMbCd1qrjA9QH/v1CcOi7NAlSsBILHDevaC1szLfSfmE04Vxi80eH/E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1739291681208442.30517140504435; Tue, 11 Feb 2025 08:34:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tht8m-00078n-B1; Tue, 11 Feb 2025 11:29:40 -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 1tht6O-0007AT-LR for qemu-devel@nongnu.org; Tue, 11 Feb 2025 11:27:13 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tht6H-0003hK-F9 for qemu-devel@nongnu.org; Tue, 11 Feb 2025 11:27:08 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-436ce2ab251so40531775e9.1 for ; Tue, 11 Feb 2025 08:27:04 -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.27.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2025 08:27:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739291223; x=1739896023; 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=0HZn+lA/3QK6V9nAt4Z7tzwLTmDhEfAS7cpqC5pJp9g=; b=SwTJd51vDoe6P03Bz5GZTwTv+XwwsBcRsuj1bOUiGdeua0RKa7dOWOC1tva0pU6ZQJ rzxJX2PGRzPzRhI4QdopSp+2tI3Fc5U8J4nJ+Bxx8kYKsnykOwvHzCtA+bI0W1y9S82v h07oPwHwd2RXAZ8dOUxk6JUZWUuYDeqycnEoncGu8oJsrtmGZve/xz6FNAOvEmaCA2Bl HeLR47Peco3SAfzf8s5yZ4eXyu6ilkaTPEpHb+Qc1giz25kZZ92ifxM1iU3HSe/gdJXt LQOaa9rgrTIY4FF7oMfa6CtE+omp4Et2beSu5qzd9gO74+x7AuRMLqutqDIzfDeKHxvV edpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739291223; x=1739896023; 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=0HZn+lA/3QK6V9nAt4Z7tzwLTmDhEfAS7cpqC5pJp9g=; b=RViR76BY2974C4RjWUVJ7GF73rnDihBEouBPjXU6kAqrAOUuPItswm1B/k8cArLSlh ADdN9d+mCmXVRnU265QsoBf7uzMxFZ20azEmiJKsPWZkKefMm8xpVTCYovTMXM/ZUEPF xNs7Tq9bJvZpAtYvUnPWu6cl8ezx0llBNOyr0t0u7jgOP+mtRI5mNWD4+AjHsSCK5k/K Ha54dIbnVpE+/P7f0gXSONUU0XL31WUMxS8D6tubbjWA/jo7QhOgFznwyoFskVpep8kO MEZofMpDvhqjL7SuAmRPj+vhQ3LdiuFW0UM0Lzhnmg1QD9z47xqG0EFzDTRabcXY77Zk HO6w== X-Gm-Message-State: AOJu0Yz/rxaZmiDGG9zs/CpyVkgpZPsOqWD9WtF2/wfayEFQty8VlkLt kO8jA2N5yZQmNBjFBt5McKnB7wnZUY57YKVWOFHHZF9dNwqjhEB5C4N1Hy3C6CUXxR2JvAtJ7XE R X-Gm-Gg: ASbGncsqMFV+dmyII4+lRhDqeahKPP5a621uXGJ1oYYyNmvZKNlQv77mFIeM0zQcgQq lZGzVH/kpCyGYMaoGg1PlgLkZct/xR40djZ9oFK3r5jgpO4RxaivqA6AVoeu/lirDGBbm7/QL0B aBAioub4OghxEMekNzQZswsX0sk40juKlZSQu2FuTtgyjD3AOpi5B/kVuGkyhBbuu0FSK7qXNmd pdyYeJrZSEGgblZzarnWQgwGQgQ0SqzX5gGGlJanMmgSPxtiulm6wGOf9b9+Jx8gxIW5QH9NNqZ Sb7zs5tGPQ/alpmC9yox X-Google-Smtp-Source: AGHT+IFsBsAozWKgM3CFueL8jCFHcuDpmx1/OkmWTpEg1VYJooimJGKhs1N+e+pwuk3+wL5n6JNApQ== X-Received: by 2002:a05:600c:1da4:b0:439:564a:6503 with SMTP id 5b1f17b1804b1-439564a66e7mr18200715e9.18.1739291223276; Tue, 11 Feb 2025 08:27:03 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 65/68] target/arm: Simplify fp_status indexing in mve_helper.c Date: Tue, 11 Feb 2025 16:25:51 +0000 Message-Id: <20250211162554.4135349-66-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32a.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1739291683208019000 From: Richard Henderson Select on index instead of pointer. No functional change. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20250129013857.135256-16-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/tcg/mve_helper.c | 40 +++++++++++++------------------------ 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/target/arm/tcg/mve_helper.c b/target/arm/tcg/mve_helper.c index 3763d71e20b..274003e2e5b 100644 --- a/target/arm/tcg/mve_helper.c +++ b/target/arm/tcg/mve_helper.c @@ -2814,8 +2814,7 @@ DO_VMAXMINA(vminaw, 4, int32_t, uint32_t, DO_MIN) if ((mask & MAKE_64BIT_MASK(0, ESIZE)) =3D=3D 0) { = \ continue; \ } \ - fpst =3D (ESIZE =3D=3D 2) ? &env->vfp.fp_status[FPST_STD_F16] = : \ - &env->vfp.fp_status[FPST_STD]; \ + fpst =3D &env->vfp.fp_status[ESIZE =3D=3D 2 ? FPST_STD_F16 : F= PST_STD]; \ if (!(mask & 1)) { \ /* We need the result but without updating flags */ \ scratch_fpst =3D *fpst; \ @@ -2888,8 +2887,7 @@ DO_2OP_FP_ALL(vminnma, minnuma) r[e] =3D 0; \ continue; \ } \ - fpst =3D (ESIZE =3D=3D 2) ? &env->vfp.fp_status[FPST_STD_F16] = : \ - &env->vfp.fp_status[FPST_STD]; \ + fpst =3D &env->vfp.fp_status[ESIZE =3D=3D 2 ? FPST_STD_F16 : F= PST_STD]; \ if (!(tm & 1)) { \ /* We need the result but without updating flags */ \ scratch_fpst =3D *fpst; \ @@ -2926,8 +2924,7 @@ DO_VCADD_FP(vfcadd270s, 4, float32, float32_add, floa= t32_sub) if ((mask & MAKE_64BIT_MASK(0, ESIZE)) =3D=3D 0) { = \ continue; \ } \ - fpst =3D (ESIZE =3D=3D 2) ? &env->vfp.fp_status[FPST_STD_F16] = : \ - &env->vfp.fp_status[FPST_STD]; \ + fpst =3D &env->vfp.fp_status[ESIZE =3D=3D 2 ? FPST_STD_F16 : F= PST_STD]; \ if (!(mask & 1)) { \ /* We need the result but without updating flags */ \ scratch_fpst =3D *fpst; \ @@ -2964,8 +2961,7 @@ DO_VFMA(vfmss, 4, float32, true) if ((mask & MAKE_64BIT_MASK(0, ESIZE * 2)) =3D=3D 0) { = \ continue; \ } \ - fpst0 =3D (ESIZE =3D=3D 2) ? &env->vfp.fp_status[FPST_STD_F16]= : \ - &env->vfp.fp_status[FPST_STD]; \ + fpst0 =3D &env->vfp.fp_status[ESIZE =3D=3D 2 ? FPST_STD_F16 : = FPST_STD]; \ fpst1 =3D fpst0; \ if (!(mask & 1)) { \ scratch_fpst =3D *fpst0; \ @@ -3049,8 +3045,7 @@ DO_VCMLA(vcmla270s, 4, float32, 3, DO_VCMLAS) if ((mask & MAKE_64BIT_MASK(0, ESIZE)) =3D=3D 0) { = \ continue; \ } \ - fpst =3D (ESIZE =3D=3D 2) ? &env->vfp.fp_status[FPST_STD_F16] = : \ - &env->vfp.fp_status[FPST_STD]; \ + fpst =3D &env->vfp.fp_status[ESIZE =3D=3D 2 ? FPST_STD_F16 : F= PST_STD]; \ if (!(mask & 1)) { \ /* We need the result but without updating flags */ \ scratch_fpst =3D *fpst; \ @@ -3084,8 +3079,7 @@ DO_2OP_FP_SCALAR_ALL(vfmul_scalar, mul) if ((mask & MAKE_64BIT_MASK(0, ESIZE)) =3D=3D 0) { = \ continue; \ } \ - fpst =3D (ESIZE =3D=3D 2) ? &env->vfp.fp_status[FPST_STD_F16] = : \ - &env->vfp.fp_status[FPST_STD]; \ + fpst =3D &env->vfp.fp_status[ESIZE =3D=3D 2 ? FPST_STD_F16 : F= PST_STD]; \ if (!(mask & 1)) { \ /* We need the result but without updating flags */ \ scratch_fpst =3D *fpst; \ @@ -3116,9 +3110,8 @@ DO_2OP_FP_ACC_SCALAR(vfmas_scalars, 4, float32, DO_VF= MAS_SCALARS) unsigned e; \ TYPE *m =3D vm; \ TYPE ra =3D (TYPE)ra_in; \ - float_status *fpst =3D (ESIZE =3D=3D 2) ? \ - &env->vfp.fp_status[FPST_STD_F16] : \ - &env->vfp.fp_status[FPST_STD]; \ + float_status *fpst =3D \ + &env->vfp.fp_status[ESIZE =3D=3D 2 ? FPST_STD_F16 : FPST_STD];= \ for (e =3D 0; e < 16 / ESIZE; e++, mask >>=3D ESIZE) { \ if (mask & 1) { \ TYPE v =3D m[H##ESIZE(e)]; \ @@ -3168,8 +3161,7 @@ DO_FP_VMAXMINV(vminnmavs, 4, float32, true, float32_m= innum) if ((mask & emask) =3D=3D 0) { = \ continue; \ } \ - fpst =3D (ESIZE =3D=3D 2) ? &env->vfp.fp_status[FPST_STD_F16] = : \ - &env->vfp.fp_status[FPST_STD]; \ + fpst =3D &env->vfp.fp_status[ESIZE =3D=3D 2 ? FPST_STD_F16 : F= PST_STD]; \ if (!(mask & (1 << (e * ESIZE)))) { \ /* We need the result but without updating flags */ \ scratch_fpst =3D *fpst; \ @@ -3202,8 +3194,7 @@ DO_FP_VMAXMINV(vminnmavs, 4, float32, true, float32_m= innum) if ((mask & emask) =3D=3D 0) { = \ continue; \ } \ - fpst =3D (ESIZE =3D=3D 2) ? &env->vfp.fp_status[FPST_STD_F16] = : \ - &env->vfp.fp_status[FPST_STD]; \ + fpst =3D &env->vfp.fp_status[ESIZE =3D=3D 2 ? FPST_STD_F16 : F= PST_STD]; \ if (!(mask & (1 << (e * ESIZE)))) { \ /* We need the result but without updating flags */ \ scratch_fpst =3D *fpst; \ @@ -3267,8 +3258,7 @@ DO_VCMP_FP_BOTH(vfcmples, vfcmple_scalars, 4, float32= , !DO_GT32) if ((mask & MAKE_64BIT_MASK(0, ESIZE)) =3D=3D 0) { = \ continue; \ } \ - fpst =3D (ESIZE =3D=3D 2) ? &env->vfp.fp_status[FPST_STD_F16] = : \ - &env->vfp.fp_status[FPST_STD]; \ + fpst =3D &env->vfp.fp_status[ESIZE =3D=3D 2 ? FPST_STD_F16 : F= PST_STD]; \ if (!(mask & 1)) { \ /* We need the result but without updating flags */ \ scratch_fpst =3D *fpst; \ @@ -3300,9 +3290,8 @@ DO_VCVT_FIXED(vcvt_fu, 4, uint32_t, helper_vfp_touls_= round_to_zero) unsigned e; \ float_status *fpst; \ float_status scratch_fpst; \ - float_status *base_fpst =3D (ESIZE =3D=3D 2) ? = \ - &env->vfp.fp_status[FPST_STD_F16] : \ - &env->vfp.fp_status[FPST_STD]; \ + float_status *base_fpst =3D \ + &env->vfp.fp_status[ESIZE =3D=3D 2 ? FPST_STD_F16 : FPST_STD];= \ uint32_t prev_rmode =3D get_float_rounding_mode(base_fpst); \ set_float_rounding_mode(rmode, base_fpst); \ for (e =3D 0; e < 16 / ESIZE; e++, mask >>=3D ESIZE) { = \ @@ -3427,8 +3416,7 @@ void HELPER(mve_vcvtt_hs)(CPUARMState *env, void *vd,= void *vm) if ((mask & MAKE_64BIT_MASK(0, ESIZE)) =3D=3D 0) { = \ continue; \ } \ - fpst =3D (ESIZE =3D=3D 2) ? &env->vfp.fp_status[FPST_STD_F16] = : \ - &env->vfp.fp_status[FPST_STD]; \ + fpst =3D &env->vfp.fp_status[ESIZE =3D=3D 2 ? FPST_STD_F16 : F= PST_STD]; \ if (!(mask & 1)) { \ /* We need the result but without updating flags */ \ scratch_fpst =3D *fpst; \ --=20 2.34.1