From nobody Sun Nov 24 00:50:20 2024 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=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1728539381; cv=none; d=zohomail.com; s=zohoarc; b=ZKrVeXaghV7/GhvgeG6Ocrlcgx4aycCMdJLCu7rpUgCTCWpN2deYqWI4X2x1lyA/la4I9p+AIsZVFEOnXBH0T/IFije+YUYWNHvakv9LdJfLBXjZt6c//Xh+EOFUIeiO4U1jKzFd4oIAimIdrka11sjMBeRqVVcaw+Xe3IRACv4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728539381; h=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=VO2fhRpGW50XoxgcN3PSNxc45sbhCKrRXjeIou0fU0c=; b=Mwh1HDyrPUE19QzdEjCJsGOVB98zBX6AfA1ocBkYvBIYryFrTK1UC3dSRoRO8YeIlBbcWasxuBsZ7z8Teo2a9//wGbKcPsV7SuBQdiiGoGZvKc60DMC6xL8ZjH2lGU3GVdvMJV4ym6VWW1qklB5+xAVmGD1AaIYt/hrEWH/tD2M= 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 1728539381853710.9481730459099; Wed, 9 Oct 2024 22:49:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sym1v-0006OM-1f; Thu, 10 Oct 2024 01:48:07 -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 1sym1s-0006F0-3O; Thu, 10 Oct 2024 01:48:04 -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 1sym1q-0005b7-DY; Thu, 10 Oct 2024 01:48:03 -0400 Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49A4U5Eo009220; Thu, 10 Oct 2024 05:47:59 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4267xk07uw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Oct 2024 05:47:59 +0000 (GMT) Received: from m0353725.ppops.net (m0353725.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 49A5lxQU030472; Thu, 10 Oct 2024 05:47:59 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4267xk07ut-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Oct 2024 05:47:59 +0000 (GMT) Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 49A32pZF022835; Thu, 10 Oct 2024 05:47:58 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 423jg15m7t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Oct 2024 05:47:58 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 49A5luR446203352 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 10 Oct 2024 05:47:56 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B5CC620043; Thu, 10 Oct 2024 05:47:56 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BCFA720040; Thu, 10 Oct 2024 05:47:55 +0000 (GMT) Received: from ltcrain34-lp1.aus.stglabs.ibm.com (unknown [9.3.101.40]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 10 Oct 2024 05:47:55 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=pp1; bh=VO2fhRpGW50Xo xgcN3PSNxc45sbhCKrRXjeIou0fU0c=; b=cW7URSS9S/SyJbY2+km/LbPtg6yPZ 1a0Hfq7Nbaq+8XCpW1x1gOPLvRpR4u53jpp6eBd7rNscdigvMdmaMlYQxyQVGt+f 3yZ1P+aqIMoKdxCDMy17AnwEvb6k3xn3eAGYbyPASNqF91qeRTPEd6Ua6Ch+Tuc9 xrjbNAPQ4xcOBLATB7X7sU2NzuYtv8WDVLM27RxBYee2666IFPaRYK2NCe/zAN8g zqa+I/1R5qqMVvQUu5LKttww6s1UpqWrfAizS30KD/pooafF1daMaJ/7J0AqBaYI EzuMyayPjUTbL0f5NDdPUUt9tLOMdyDyBnCZ6GHFUBR3JeitgH4N5mPPA== From: Harsh Prateek Bora To: qemu-ppc@nongnu.org, qemu-devel@nongnu.org Cc: npiggin@gmail.com, balaton@eik.bme.hu, danielhb413@gmail.com Subject: [PATCH v4 8/9] target/ppc: combine multiple ail checks into one Date: Thu, 10 Oct 2024 11:17:39 +0530 Message-ID: <20241010054740.1106997-9-harshpb@linux.ibm.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241010054740.1106997-1-harshpb@linux.ibm.com> References: <20241010054740.1106997-1-harshpb@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: yg1g6nMXtvTVqEML8RNomViXmmMF0wWQ X-Proofpoint-ORIG-GUID: HZEvnTjulCldfBVP4czeS2j9mN3vn01k X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-10_02,2024-10-09_02,2024-09-30_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 suspectscore=0 spamscore=0 mlxlogscore=635 impostorscore=0 adultscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 priorityscore=1501 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410100036 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=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, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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 @ibm.com) X-ZM-MESSAGEID: 1728539382435116600 Content-Type: text/plain; charset="utf-8" ppc_excp_apply_ail has multiple if-checks for ail which is un-necessary. Combine them as appropriate. Reviewed-by: Nicholas Piggin Signed-off-by: Harsh Prateek Bora --- target/ppc/excp_helper.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 4eeeedff5b..a8bd537a18 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -324,10 +324,7 @@ static void ppc_excp_apply_ail(PowerPCCPU *cpu, int ex= cp, target_ulong msr, } =20 ail =3D (env->spr[SPR_LPCR] & LPCR_AIL) >> LPCR_AIL_SHIFT; - if (ail =3D=3D 0) { - return; - } - if (ail =3D=3D 1) { + if (ail =3D=3D 0 || ail =3D=3D 1) { /* AIL=3D1 is reserved, treat it like AIL=3D0 */ return; } @@ -351,10 +348,7 @@ static void ppc_excp_apply_ail(PowerPCCPU *cpu, int ex= cp, target_ulong msr, } else { ail =3D (env->spr[SPR_LPCR] & LPCR_AIL) >> LPCR_AIL_SHIFT; } - if (ail =3D=3D 0) { - return; - } - if (ail =3D=3D 1 || ail =3D=3D 2) { + if (ail =3D=3D 0 || ail =3D=3D 1 || ail =3D=3D 2) { /* AIL=3D1 and AIL=3D2 are reserved, treat them like AIL=3D0 */ return; } --=20 2.45.2