From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 466BEC61DBD for ; Fri, 28 Aug 2026 06:11:07 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wzpm4-0000VV-NA; Fri, 28 Aug 2026 02:09:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wzpm2-0000Gr-5S for qemu-devel@nongnu.org; Fri, 28 Aug 2026 02:09:10 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wzpm0-00012H-7Y for qemu-devel@nongnu.org; Fri, 28 Aug 2026 02:09:09 -0400 Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67S23E1B516168; Fri, 28 Aug 2026 06:09:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=ngyCMWL695+ni8747 RL9fjw+SVrsLvrj8lv3PulTzqE=; b=QmyGvOSRWs2NF1IIm2ctqYWcZuzLjNXit z2EDZWW8qgkEN2afZfpq/PVRcnxDy/SqzZ4pWbv7K9nViH6YGV0HPsIJXZgZQxec IGUpBvfZ3DhVBT2+aQHWYQdfdKlb8k1z9e7J7B2y7vXXKXynAbsUWhpR5RtG74eh NEWkm0u/0sxHD04BlvAYWVNdQWHqbudkBG6lB0UHe9laIxOCuoJGNPTo+/OyYpZb EW0V4DsZdaVEdoY3lr1lA6eAWTSo8svzzmUFOc8hE561i5xabvzUOZeXBWE36fCA CJq+ZvYAKHZujwUqxkMxLla4q0QRtYL+dQCyYNaJ7eU/UVl5ulvzQ== Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4g716jadu7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Aug 2026 06:09:06 +0000 (GMT) Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.18.1.7/8.18.1.7) with ESMTP id 67S5uGam005921; Fri, 28 Aug 2026 06:09:05 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 4g7p3qmve6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Aug 2026 06:09:05 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 67S691NT40239388 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 Aug 2026 06:09:01 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8E2122004E; Fri, 28 Aug 2026 06:09:01 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6467720040; Fri, 28 Aug 2026 06:08:59 +0000 (GMT) Received: from Mac.com (unknown [9.124.217.17]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Fri, 28 Aug 2026 06:08:59 +0000 (GMT) From: Harsh Prateek Bora To: qemu-devel@nongnu.org Cc: Chinmay Rath , Glenn Miles , Richard Henderson , Amit Machhiwal , Aniket Sahu Subject: [PULL 36/41] target/ppc: Use PPC2_ISA207 instead of PPC2_LSQ_ISA207 Date: Fri, 28 Aug 2026 11:37:11 +0530 Message-ID: <20260828060716.91672-37-harshpb@linux.ibm.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260828060716.91672-1-harshpb@linux.ibm.com> References: <20260828060716.91672-1-harshpb@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Spam-Info: AW1haW4tMjYwODI4MDA1MCBTYWx0ZWRfX+0rwYhWENntm aYjBfwj4hBnA0yQzfqiO/NexHp4Xw0dUfiDg1ajLtOTw2V6gbutWTWF9CyayAaSAhh8uCnd7zI9 tLfCFcsvN+EG+zsAwskOBimkSLJ7twc= X-Proofpoint-GUID: N4ctub7-gkF0zQo7-plLHH-6YdF14d3A X-Proofpoint-ORIG-GUID: N4ctub7-gkF0zQo7-plLHH-6YdF14d3A X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODI4MDA1MCBTYWx0ZWRfX/OxSdQqSxziH Y3oxVcGxAzsrJkY6BZyO3K2uYW2fa4SfeEFGMbWqkDTYGYWLuzdi7o+T+KdE13WvQuRBxdzYC13 x8oaUrC0typtIcQrGHJOtzYnPOG3xu//a1Y/M/jPITxIjuRU5qw3K0tDDQX8cRAu6HWzyX/368o St/HboH4PS4fx3iSdLprxYXBILdllbf7akrWsXgi8xeQi4pmcjgWg85XHmt9dcPb+wxCWWuD9tc weAoB+6IEpQd9Pn/KSH+8p6EML+w/K2w8y3SSmNcROJVhB7byKizpS6gxnCrjKFX4hxLJIPX6S4 h0st2B1DWg669+kCxgeoP5Bzh9XsWkzbZBlolSw+Bxw+WWnOIvRQr6rzkCktaASx1c0WrQreWIw th2sz0skpY8w7BtHX2DdDKNd31sioUAivWzCR7H+Wi3V6oc3/7Up6rxucjFPIHdTUEUSc+COUt4 /5NNYX9ld18ha3LA0Tg== X-Authority-Analysis: v=2.4 cv=H7brBeYi c=1 sm=1 tr=0 ts=6a912602 cx=c_pps a=bLidbwmWQ0KltjZqbj+ezA==:117 a=bLidbwmWQ0KltjZqbj+ezA==:17 a=Sv0fKeRqtYgA:10 a=f7IdgyKtn90A:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=Y2IxJ9c9Rs8Kov3niI8_:22 a=VwQbUJbxAAAA:8 a=VnNF1IyMAAAA:8 a=KKAkSRfTAAAA:8 a=yylYlIOdViePNs7JewoA:9 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-28_01,2026-08-27_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 impostorscore=0 spamscore=0 bulkscore=0 adultscore=0 priorityscore=1501 clxscore=1015 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608280050 Received-SPF: pass client-ip=148.163.158.5; envelope-from=harshpb@linux.ibm.com; helo=mx0b-001b2d01.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_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Chinmay Rath PPC2_LSQ_ISA207 is only ever set in the CPUPPCState's insns_flags2 alongside PPC2_ISA207. Checks made by PPC2_LSQ_ISA207 could be replaced with PPC2_ISA207, hence rendering it useless and apt for removal. This patch does the same. Reviewed-by: Glenn Miles Reviewed-by: Richard Henderson Reviewed-by: Amit Machhiwal Signed-off-by: Chinmay Rath Tested-by: Aniket Sahu Link: https://lore.kernel.org/qemu-devel/20260827133010.278889-33-rathc@linux.ibm.com Signed-off-by: Harsh Prateek Bora --- target/ppc/cpu.h | 3 --- target/ppc/cpu_init.h | 2 +- linux-user/ppc/elfload.c | 2 +- target/ppc/cpu_init.c | 3 +-- target/ppc/translate/fixedpoint-impl.c.inc | 4 ++-- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index df1e943d8d..b3cd8d85df 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -2577,8 +2577,6 @@ enum { PPC2_FP_CVT_ISA206 = 0x0000000000000400ULL, /* ISA 2.06B floating point test instructions */ PPC2_FP_TST_ISA206 = 0x0000000000000800ULL, - /* ISA 2.07 load/store quadword */ - PPC2_LSQ_ISA207 = 0x0000000000002000ULL, /* ISA 2.07 Altivec */ PPC2_ALTIVEC_207 = 0x0000000000004000ULL, /* PowerISA 2.07 Book3s specification */ @@ -2608,7 +2606,6 @@ enum { PPC2_ISA205 | PPC2_ISA207 | PPC2_PERM_ISA206 | \ PPC2_DIVE_ISA206 | PPC2_ATOMIC_ISA206 | \ PPC2_FP_CVT_ISA206 | PPC2_FP_TST_ISA206 | \ - PPC2_LSQ_ISA207 | \ PPC2_ALTIVEC_207 | PPC2_ISA207S | PPC2_DFP | \ PPC2_FP_CVT_S64 | PPC2_TM | PPC2_PM_ISA206 | \ PPC2_ISA300 | PPC2_ISA310 | PPC2_MEM_LWSYNC | \ diff --git a/target/ppc/cpu_init.h b/target/ppc/cpu_init.h index 7dd587908e..6961007926 100644 --- a/target/ppc/cpu_init.h +++ b/target/ppc/cpu_init.h @@ -18,7 +18,7 @@ (PPC2_VSX | PPC2_ISA207 | PPC2_DFP | PPC2_DBRX | \ PPC2_PERM_ISA206 | PPC2_DIVE_ISA206 | PPC2_ATOMIC_ISA206 | \ PPC2_FP_CVT_ISA206 | PPC2_FP_TST_ISA206 | \ - PPC2_LSQ_ISA207 | PPC2_ALTIVEC_207 | PPC2_ISA205 | \ + PPC2_ALTIVEC_207 | PPC2_ISA205 | \ PPC2_ISA207S | PPC2_FP_CVT_S64 | PPC2_ISA300 | PPC2_PRCNTL | \ PPC2_MEM_LWSYNC | PPC2_BCDA_ISA206) diff --git a/linux-user/ppc/elfload.c b/linux-user/ppc/elfload.c index 5c6065e08a..76ab9f43de 100644 --- a/linux-user/ppc/elfload.c +++ b/linux-user/ppc/elfload.c @@ -116,7 +116,7 @@ abi_ulong get_elf_hwcap2(CPUState *cs) do { if (cpu->env.insns_flags2 & flag) { features |= feature; } } while (0) GET_FEATURE(PPC_ISEL, QEMU_PPC_FEATURE2_HAS_ISEL); - GET_FEATURE2((PPC2_ISA207 | PPC2_LSQ_ISA207 | PPC2_ALTIVEC_207 | + GET_FEATURE2((PPC2_ISA207 | PPC2_ALTIVEC_207 | PPC2_ISA207S), (QEMU_PPC_FEATURE2_ARCH_2_07 | QEMU_PPC_FEATURE2_VEC_CRYPTO | QEMU_PPC_FEATURE2_HAS_TAR)); GET_FEATURE2(PPC2_ISA300, QEMU_PPC_FEATURE2_ARCH_3_00 | diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index c250f805a7..4cc8b93dca 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -6349,8 +6349,7 @@ POWERPC_FAMILY(POWER8)(ObjectClass *oc, const void *data) pcc->insns_flags2 = PPC2_VSX | PPC2_ISA207 | PPC2_DFP | PPC2_DBRX | PPC2_PERM_ISA206 | PPC2_DIVE_ISA206 | PPC2_ATOMIC_ISA206 | PPC2_FP_CVT_ISA206 | - PPC2_FP_TST_ISA206 | - PPC2_LSQ_ISA207 | PPC2_ALTIVEC_207 | + PPC2_FP_TST_ISA206 | PPC2_ALTIVEC_207 | PPC2_ISA205 | PPC2_ISA207S | PPC2_FP_CVT_S64 | PPC2_TM | PPC2_PM_ISA206 | PPC2_MEM_LWSYNC | PPC2_BCDA_ISA206; diff --git a/target/ppc/translate/fixedpoint-impl.c.inc b/target/ppc/translate/fixedpoint-impl.c.inc index 0e1960a272..c3d8bbf267 100644 --- a/target/ppc/translate/fixedpoint-impl.c.inc +++ b/target/ppc/translate/fixedpoint-impl.c.inc @@ -124,7 +124,7 @@ static bool do_ldst_quad(DisasContext *ctx, arg_D *a, bool store, bool prefixed) REQUIRE_INSNS_FLAGS(ctx, 64BX); - if (!prefixed && !(ctx->insns_flags2 & PPC2_LSQ_ISA207)) { + if (!prefixed && !(ctx->insns_flags2 & PPC2_ISA207)) { /* lq and stq were privileged prior to V. 2.07 */ REQUIRE_SV(ctx); @@ -288,7 +288,7 @@ TRANS64(STDCX, do_store_cond, MO_UQ); static bool trans_STQCX(DisasContext *ctx, arg_STQCX *a) { REQUIRE_64BIT(ctx); - REQUIRE_INSNS_FLAGS2(ctx, LSQ_ISA207); + REQUIRE_INSNS_FLAGS2(ctx, ISA207); #if defined(TARGET_PPC64) TCGLabel *lfail = gen_new_label(); TCGv ea = do_ea_calc(ctx, a->ra, cpu_gpr[a->rb]); -- 2.52.0