From nobody Tue Feb 10 10:04:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+90880+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90880+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1656515278; cv=none; d=zohomail.com; s=zohoarc; b=I0jxF38olYzb1bHbSVW791ptVxNEmb1UPj1HwHR8HGNxNtMM3IARq55kK8kckgv5/ACRazHeOBsE5kRvFBnFO5zS7U4VlxEpAYsbbWEr0r9XSi1JTk4vdWZ0r+MwO8uBMT1Dd75da3hFbr0XD60J3wp+8cz1LhkLDD6258p/2Fs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1656515278; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=vhM3/PhPsm8JPBmyFGUszHjf4/wyFbl+uwNDk5yeGdc=; b=OAJa60MgYA+fe0qiIqZwYBigh/8BlLerBhVOOtEw6hKiPJu1FN4oug6KDBTmTLxhT4d9WElCCo1FAz6zAwgDU6bp3bqhxk1JTB7VAKer3rwAmWWhAhY4zDsRO6pdtBA1A8wRWneQw97VPOAYulg1BTUouHEdgRhog2+K0fVe7YM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90880+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 16565152787046.415604286212783; Wed, 29 Jun 2022 08:07:58 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id iueKYY1788612xmQdLUMEGU2; Wed, 29 Jun 2022 08:07:57 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.12682.1656515276908957236 for ; Wed, 29 Jun 2022 08:07:57 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D5D071764; Wed, 29 Jun 2022 08:07:56 -0700 (PDT) X-Received: from pierre123.arm.com (unknown [10.57.42.208]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B16783F792; Wed, 29 Jun 2022 08:07:54 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Leif Lindholm , Ard Biesheuvel , Rebecca Cran , Michael D Kinney , Liming Gao , Edward Pickup Subject: [edk2-devel] [PATCH v1 2/7] ArmPkg/ArmDisassemblerLib: Replace RotateRight() Date: Wed, 29 Jun 2022 17:07:08 +0200 Message-Id: <20220629150713.2600465-3-Pierre.Gondois@arm.com> In-Reply-To: <20220629150713.2600465-1-Pierre.Gondois@arm.com> References: <20220629150713.2600465-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: 9QM2LWU9qeJly7yjDM91sH4cx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1656515277; bh=zg9JC+p2uF/8enjxqMPiLG86JOoNzit6R3GCvz/wKNU=; h=Cc:Date:From:Reply-To:Subject:To; b=dlzs8+tynFHTXx8hWqVY9RL9a3ms2gJIS5Rnk2kfvmMc2uXQeMryyE7dH7Ax2Q94mm/ 5lup5f5AvQSQlgu6IiwvZDpyIghEH0amFLQz5CPrJvdP+qPGB6QXbfdFWOwSASyJ5D/bv jbGLa5lgpHBu8aW5+K2wP2IG/duY5n3lAKo= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1656515280138100001 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois A local RotateRight() function is defined. The RRotU32() function available in the MdePkg/BaseLib does the same. Prefer the generic function and remove the local RotateRight(). Signed-off-by: Pierre Gondois --- ArmPkg/Library/ArmDisassemblerLib/ArmDisassembler.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/ArmPkg/Library/ArmDisassemblerLib/ArmDisassembler.c b/ArmPkg/L= ibrary/ArmDisassemblerLib/ArmDisassembler.c index 0e09062957b4..24a317a9c9f4 100644 --- a/ArmPkg/Library/ArmDisassemblerLib/ArmDisassembler.c +++ b/ArmPkg/Library/ArmDisassemblerLib/ArmDisassembler.c @@ -128,15 +128,6 @@ FieldMask ( return ""; } =20 -UINT32 -RotateRight ( - IN UINT32 Op, - IN UINT32 Shift - ) -{ - return (Op >> Shift) | (Op << (32 - Shift)); -} - /** Place a disassembly of **OpCodePtr into buffer, and update OpCodePtr to point to next instruction. @@ -409,7 +400,7 @@ DisassembleArmInstruction ( // A4.1.38 MSR{} CPSR_, # MSR{} CPSR_, if (Imm) { // MSR{} CPSR_, # - AsciiSPrint (Buf, Size, "MRS%a %a_%a, #0x%x", COND (OpCode), WriteBa= ck ? "SPSR" : "CPSR", FieldMask ((OpCode >> 16) & 0xf), RotateRight (OpCode= & 0xf, ((OpCode >> 8) & 0xf) *2)); + AsciiSPrint (Buf, Size, "MRS%a %a_%a, #0x%x", COND (OpCode), WriteBa= ck ? "SPSR" : "CPSR", FieldMask ((OpCode >> 16) & 0xf), RRotU32 (OpCode & 0= xf, ((OpCode >> 8) & 0xf) *2)); } else { // MSR{} CPSR_, AsciiSPrint (Buf, Size, "MRS%a %a_%a, %a", COND (OpCode), WriteBack = ? "SPSR" : "CPSR", gReg[Rd]); --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#90880): https://edk2.groups.io/g/devel/message/90880 Mute This Topic: https://groups.io/mt/92066826/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-