From nobody Sun Nov 16 06:00:30 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1743735195; cv=none; d=zohomail.com; s=zohoarc; b=Dajdo5o49R/3/6uY2qftZMgmTyJ0SruZpX9uUmxtQx8NIcKoFKuxmBq+lp5jbJO6mqehGhnNomjtF3eWUmmPj99gCneUworcvKucEedr5paost7Bvl3qpZXQVRSlliZWT/i/tSCXexZaqgmHoSUq8WenlQG1XTdH0uEpgsqzD5Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1743735195; h=Content-Type:Content-Transfer-Encoding:Cc:Cc: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; bh=XdOoA6yP8KgHJ0ReAntJTjKigv+wvIvUfO0xtSYIysE=; b=VdK4y5bJcsHJCuHSYuLCOkLFtKkoDZjDalC0HrgrTLJ6idBNWEU0QF2ig9RQaQHDxIHoiaeJmZ46tG8gXEUJErh2OMtt+IzbI/tD6US/uq8fjQhe+Z0j7PVU7jzt002/fNJoH9oToNMETKVNZ4rbQiRDeLwwZDaRrSgOIl7GMJc= 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=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1743735195576632.862568814573; Thu, 3 Apr 2025 19:53:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u0XAY-0005xN-Tz; Thu, 03 Apr 2025 22:52:34 -0400 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 1u0XAW-0005ud-LY for qemu-devel@nongnu.org; Thu, 03 Apr 2025 22:52:33 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u0XAU-0006mP-KM for qemu-devel@nongnu.org; Thu, 03 Apr 2025 22:52:32 -0400 Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5341PEwh012194 for ; Fri, 4 Apr 2025 02:52:29 GMT Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 45t2d8rgcu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 04 Apr 2025 02:52:28 +0000 (GMT) Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-2ff798e8c93so1614117a91.2 for ; Thu, 03 Apr 2025 19:52:28 -0700 (PDT) Received: from hu-bcain-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-229785ea16bsm22014865ad.106.2025.04.03.19.52.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Apr 2025 19:52:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= XdOoA6yP8KgHJ0ReAntJTjKigv+wvIvUfO0xtSYIysE=; b=hLr57IbcFDEkxujR RV4xDgWWjUWJW/QOg4wxkLZ6VoSwoviqv8xgDa5djCK+p6gXF1OkE6OjdZvIwbx/ LC9WEVcl/rUpKyXxGZcL77jNGn6tA7nnkc17jWNDNVYNCHg6AQjEMWasBmXE6JBX Xh1namUZk+MMv6qGa0JLAiXle883FGxXz9wTq2IxLnPzwyN93S9GP5ub4WAztBdX FpodmvhQhGHmcaFJnRWBevRgDg2ESHuxth+8ZgjD6L00lPwzUsf/BawYC18UQouX hcgVDU9xiP1+2r+dpkz7qNgLhwIc8eRh1IBXh7PJFDfcDUe9pNC6BK3aHqUwhoBc zKWUyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743735148; x=1744339948; 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=XdOoA6yP8KgHJ0ReAntJTjKigv+wvIvUfO0xtSYIysE=; b=sXAk91zsEKC7O1iWAnhFaRGSC/00zri6Gl2yYm0RXRV9TGxX8WG5dbM/FeAEiAwk4y IIjXJhOJVisyLutiezRqtKBrHNrtWYZpvh3SdBb4x+avPkSXPkTzk8zeR/3r5ZJUJ7oQ VCuhP7dqAomiKOaVl598Ls9vgTkh3tHR7HHtyWw0Q+RsVMS8Bi9X2iejaq7PpcCamx18 Bo/ADfPWRHWQuGe8aVTqZf6yCBf8radB48wleszSYAlrvuYuYM1NP3bxiii4DUwo/pR8 pfDPO3jlw6EkFVY7jO+dD+Xk0GFM9W0zoqJC5BFURP/Fotvi2F3W3Fgn0VG/+M14aot3 Tuig== X-Gm-Message-State: AOJu0YxdIQYrr2qAhNMYDAjh1VYs1FYLSWRKEIhVoksPMZ8kNaM1WoaA Lh7e34Umsr+tuqp6mp+ahbieGEfb8t+nFY66N2hil8TqeZFDHqJL0nH6PmJYeHaNg6MHkDkdT4/ WSoeY3ygB3mMacMDoCIjaZfM0gtb4xmAp8ynfOEns3GRo1hbm9bKRem9kqv2mJA== X-Gm-Gg: ASbGncuncQPrL1GUX8DpoMED6LxHVFy6uZ+bJIkbiwOkiLt9IT/6KfAv5kw4bWtjDnN It6OSnws8clZ29SeGr4GzC9b89DP9J/GqSOa/VI/ih7i12Do+NjS5kASXWO6oDbE0GIfhx3TKdg feuVp32b0Ea65UlJTpfrcusMvWWORekqnCRxd1/JhXxquRWjsUasb17S3zF6sve2nQQuGiWe5ER eNW+/lFEvJ4yM+9Z93hM3aumeQag8Sv9fLBvISHTkIVVwkpoApl7B+5tZoDDGOR9bRkN7npTSD/ 2AD6EDLH/8m+TJSSOcx4iC2kaliki//CdO+3dFkfdDtgXq1YE44N2Kmu8P0kCCGB X-Received: by 2002:a17:902:f64a:b0:223:50f0:b97 with SMTP id d9443c01a7336-22a8a0a6599mr18143595ad.52.1743735147493; Thu, 03 Apr 2025 19:52:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEtUkv5/xJSlUucYvbaDLJICnmK+NOC8JobHTZ6nDAUEynndyPIvbyALwSsxvnC67UHAiIaXg== X-Received: by 2002:a17:902:f64a:b0:223:50f0:b97 with SMTP id d9443c01a7336-22a8a0a6599mr18143205ad.52.1743735147003; Thu, 03 Apr 2025 19:52:27 -0700 (PDT) From: Brian Cain To: qemu-devel@nongnu.org Cc: brian.cain@oss.qualcomm.com, richard.henderson@linaro.org, philmd@linaro.org, matheus.bernardino@oss.qualcomm.com, ale@rev.ng, anjo@rev.ng, marco.liebel@oss.qualcomm.com, ltaylorsimpson@gmail.com, alex.bennee@linaro.org, quic_mburton@quicinc.com, sidneym@quicinc.com, Brian Cain Subject: [PATCH 4/6] target/hexagon: s/pkt_has_store/pkt_has_scalar_store Date: Thu, 3 Apr 2025 19:52:01 -0700 Message-Id: <20250404025203.335025-5-brian.cain@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250404025203.335025-1-brian.cain@oss.qualcomm.com> References: <20250404025203.335025-1-brian.cain@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: _xsFAn0nYvMi9CsZTcKFWk4Ibb2SZ19p X-Authority-Analysis: v=2.4 cv=IeOHWXqa c=1 sm=1 tr=0 ts=67ef496c cx=c_pps a=0uOsjrqzRL749jD1oC5vDA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=XR8D0OoHHMoA:10 a=COk6AnOGAAAA:8 a=EUspDBNiAAAA:8 a=NfTq8dMVL6FJjgmeXnEA:9 a=QEXdDO2ut3YA:10 a=mQ_c8vxmzFEMiUWkPHU9:22 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-GUID: _xsFAn0nYvMi9CsZTcKFWk4Ibb2SZ19p X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-04_01,2025-04-03_03,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 clxscore=1015 malwarescore=0 suspectscore=0 lowpriorityscore=0 impostorscore=0 bulkscore=0 mlxscore=0 priorityscore=1501 mlxlogscore=687 spamscore=0 phishscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2504040019 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=205.220.168.131; envelope-from=brian.cain@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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 @qualcomm.com) X-ZM-MESSAGEID: 1743735198026019100 From: Brian Cain To remove any confusion with HVX or other potential store instructions, we'll qualify this context var with "scalar". Signed-off-by: Brian Cain --- target/hexagon/idef-parser/README.rst | 2 +- target/hexagon/insn.h | 4 ++-- target/hexagon/macros.h | 8 ++++---- target/hexagon/decode.c | 4 ++-- target/hexagon/genptr.c | 3 ++- target/hexagon/idef-parser/parser-helpers.c | 4 ++-- target/hexagon/op_helper.c | 4 ++-- target/hexagon/translate.c | 9 +++++---- target/hexagon/gen_helper_funcs.py | 2 +- 9 files changed, 21 insertions(+), 19 deletions(-) diff --git a/target/hexagon/idef-parser/README.rst b/target/hexagon/idef-pa= rser/README.rst index 7199177ee3..235e3debee 100644 --- a/target/hexagon/idef-parser/README.rst +++ b/target/hexagon/idef-parser/README.rst @@ -637,7 +637,7 @@ tinycode for the Hexagon ``add`` instruction :: =20 ---- 00021094 - mov_i32 pkt_has_store_s1,$0x0 + mov_i32 pkt_has_scalar_store_s1,$0x0 add_i32 tmp0,r2,r2 mov_i32 loc2,tmp0 mov_i32 new_r1,loc2 diff --git a/target/hexagon/insn.h b/target/hexagon/insn.h index 24dcf7fe9f..5d59430da9 100644 --- a/target/hexagon/insn.h +++ b/target/hexagon/insn.h @@ -66,8 +66,8 @@ struct Packet { =20 bool pkt_has_dczeroa; =20 - bool pkt_has_store_s0; - bool pkt_has_store_s1; + bool pkt_has_scalar_store_s0; + bool pkt_has_scalar_store_s1; =20 bool pkt_has_hvx; Insn *vhist_insn; diff --git a/target/hexagon/macros.h b/target/hexagon/macros.h index ee3d4c88e7..b6e5c8aae2 100644 --- a/target/hexagon/macros.h +++ b/target/hexagon/macros.h @@ -82,7 +82,7 @@ */ #define CHECK_NOSHUF(VA, SIZE) \ do { \ - if (insn->slot =3D=3D 0 && ctx->pkt->pkt_has_store_s1) { \ + if (insn->slot =3D=3D 0 && ctx->pkt->pkt_has_scalar_store_s1) { \ probe_noshuf_load(VA, SIZE, ctx->mem_idx); \ process_store(ctx, 1); \ } \ @@ -93,11 +93,11 @@ TCGLabel *noshuf_label =3D gen_new_label(); \ tcg_gen_brcondi_tl(TCG_COND_EQ, PRED, 0, noshuf_label); \ GET_EA; \ - if (insn->slot =3D=3D 0 && ctx->pkt->pkt_has_store_s1) { \ + if (insn->slot =3D=3D 0 && ctx->pkt->pkt_has_scalar_store_s1) { \ probe_noshuf_load(EA, SIZE, ctx->mem_idx); \ } \ gen_set_label(noshuf_label); \ - if (insn->slot =3D=3D 0 && ctx->pkt->pkt_has_store_s1) { \ + if (insn->slot =3D=3D 0 && ctx->pkt->pkt_has_scalar_store_s1) { \ process_store(ctx, 1); \ } \ } while (0) @@ -524,7 +524,7 @@ static inline TCGv gen_read_ireg(TCGv result, TCGv val,= int shift) =20 #define fLOAD(NUM, SIZE, SIGN, EA, DST) \ do { \ - check_noshuf(env, pkt_has_store_s1, slot, EA, SIZE, GETPC()); \ + check_noshuf(env, pkt_has_scalar_store_s1, slot, EA, SIZE, GETPC()= ); \ DST =3D (size##SIZE##SIGN##_t)MEM_LOAD##SIZE(env, EA, GETPC()); \ } while (0) #endif diff --git a/target/hexagon/decode.c b/target/hexagon/decode.c index 23deba2426..b5ece60450 100644 --- a/target/hexagon/decode.c +++ b/target/hexagon/decode.c @@ -236,9 +236,9 @@ static void decode_set_insn_attr_fields(Packet *pkt) if (GET_ATTRIB(opcode, A_SCALAR_STORE) && !GET_ATTRIB(opcode, A_MEMSIZE_0B)) { if (pkt->insn[i].slot =3D=3D 0) { - pkt->pkt_has_store_s0 =3D true; + pkt->pkt_has_scalar_store_s0 =3D true; } else { - pkt->pkt_has_store_s1 =3D true; + pkt->pkt_has_scalar_store_s1 =3D true; } } } diff --git a/target/hexagon/genptr.c b/target/hexagon/genptr.c index 2c5e15cfcf..7c73772e40 100644 --- a/target/hexagon/genptr.c +++ b/target/hexagon/genptr.c @@ -395,7 +395,8 @@ static inline void gen_store_conditional8(DisasContext = *ctx, #ifndef CONFIG_HEXAGON_IDEF_PARSER static TCGv gen_slotval(DisasContext *ctx) { - int slotval =3D (ctx->pkt->pkt_has_store_s1 & 1) | (ctx->insn->slot <<= 1); + int slotval =3D + (ctx->pkt->pkt_has_scalar_store_s1 & 1) | (ctx->insn->slot << 1); return tcg_constant_tl(slotval); } #endif diff --git a/target/hexagon/idef-parser/parser-helpers.c b/target/hexagon/i= def-parser/parser-helpers.c index a7dcd85fe4..3316c230f8 100644 --- a/target/hexagon/idef-parser/parser-helpers.c +++ b/target/hexagon/idef-parser/parser-helpers.c @@ -1725,7 +1725,7 @@ void gen_cancel(Context *c, YYLTYPE *locp) =20 void gen_load_cancel(Context *c, YYLTYPE *locp) { - OUT(c, locp, "if (insn->slot =3D=3D 0 && pkt->pkt_has_store_s1) {\n"); + OUT(c, locp, "if (insn->slot =3D=3D 0 && pkt->pkt_has_scalar_store_s1)= {\n"); OUT(c, locp, "ctx->s1_store_processed =3D false;\n"); OUT(c, locp, "process_store(ctx, 1);\n"); OUT(c, locp, "}\n"); @@ -1750,7 +1750,7 @@ void gen_load(Context *c, YYLTYPE *locp, HexValue *wi= dth, =20 /* Lookup the effective address EA */ find_variable(c, locp, ea, ea); - OUT(c, locp, "if (insn->slot =3D=3D 0 && pkt->pkt_has_store_s1) {\n"); + OUT(c, locp, "if (insn->slot =3D=3D 0 && pkt->pkt_has_scalar_store_s1)= {\n"); OUT(c, locp, "probe_noshuf_load(", ea, ", ", width, ", ctx->mem_idx);\= n"); OUT(c, locp, "process_store(ctx, 1);\n"); OUT(c, locp, "}\n"); diff --git a/target/hexagon/op_helper.c b/target/hexagon/op_helper.c index 6da8db8ea5..6ff37680d9 100644 --- a/target/hexagon/op_helper.c +++ b/target/hexagon/op_helper.c @@ -463,11 +463,11 @@ void HELPER(probe_pkt_scalar_hvx_stores)(CPUHexagonSt= ate *env, int mask) * If the load is in slot 0 and there is a store in slot1 (that * wasn't cancelled), we have to do the store first. */ -static void check_noshuf(CPUHexagonState *env, bool pkt_has_store_s1, +static void check_noshuf(CPUHexagonState *env, bool pkt_has_scalar_store_s= 1, uint32_t slot, target_ulong vaddr, int size, uintptr_t ra) { - if (slot =3D=3D 0 && pkt_has_store_s1 && + if (slot =3D=3D 0 && pkt_has_scalar_store_s1 && ((env->slot_cancelled & (1 << 1)) =3D=3D 0)) { probe_read(env, vaddr, size, MMU_USER_IDX, ra); commit_store(env, 1, ra); diff --git a/target/hexagon/translate.c b/target/hexagon/translate.c index 5271c4e022..aca77dfdb1 100644 --- a/target/hexagon/translate.c +++ b/target/hexagon/translate.c @@ -705,11 +705,11 @@ static void process_store_log(DisasContext *ctx) * the memory accesses overlap. */ Packet *pkt =3D ctx->pkt; - if (pkt->pkt_has_store_s1) { + if (pkt->pkt_has_scalar_store_s1) { g_assert(!pkt->pkt_has_dczeroa); process_store(ctx, 1); } - if (pkt->pkt_has_store_s0) { + if (pkt->pkt_has_scalar_store_s0) { g_assert(!pkt->pkt_has_dczeroa); process_store(ctx, 0); } @@ -834,8 +834,9 @@ static void gen_commit_packet(DisasContext *ctx) * involved in committing the packet. */ Packet *pkt =3D ctx->pkt; - bool has_store_s0 =3D pkt->pkt_has_store_s0; - bool has_store_s1 =3D (pkt->pkt_has_store_s1 && !ctx->s1_store_process= ed); + bool has_store_s0 =3D pkt->pkt_has_scalar_store_s0; + bool has_store_s1 =3D + (pkt->pkt_has_scalar_store_s1 && !ctx->s1_store_processed); bool has_hvx_store =3D pkt_has_hvx_store(pkt); if (pkt->pkt_has_dczeroa) { /* diff --git a/target/hexagon/gen_helper_funcs.py b/target/hexagon/gen_helper= _funcs.py index c1f806ac4b..a9c0e27a80 100755 --- a/target/hexagon/gen_helper_funcs.py +++ b/target/hexagon/gen_helper_funcs.py @@ -69,7 +69,7 @@ def gen_helper_function(f, tag, tagregs, tagimms): if hex_common.need_slot(tag): if "A_LOAD" in hex_common.attribdict[tag]: f.write(hex_common.code_fmt(f"""\ - bool pkt_has_store_s1 =3D slotval & 0x1; + bool pkt_has_scalar_store_s1 =3D slotval & 0x1; """)) f.write(hex_common.code_fmt(f"""\ uint32_t slot =3D slotval >> 1; --=20 2.34.1