From: Pierre Gondois <pierre.gond...@arm.com> 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 <pierre.gond...@arm.com> --- ArmPkg/Library/ArmDisassemblerLib/ArmDisassembler.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/ArmPkg/Library/ArmDisassemblerLib/ArmDisassembler.c b/ArmPkg/Library/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 ""; } -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{<cond>} CPSR_<fields>, #<immediate> MSR{<cond>} CPSR_<fields>, <Rm> if (Imm) { // MSR{<cond>} CPSR_<fields>, #<immediate> - AsciiSPrint (Buf, Size, "MRS%a %a_%a, #0x%x", COND (OpCode), WriteBack ? "SPSR" : "CPSR", FieldMask ((OpCode >> 16) & 0xf), RotateRight (OpCode & 0xf, ((OpCode >> 8) & 0xf) *2)); + AsciiSPrint (Buf, Size, "MRS%a %a_%a, #0x%x", COND (OpCode), WriteBack ? "SPSR" : "CPSR", FieldMask ((OpCode >> 16) & 0xf), RRotU32 (OpCode & 0xf, ((OpCode >> 8) & 0xf) *2)); } else { // MSR{<cond>} CPSR_<fields>, <Rm> AsciiSPrint (Buf, Size, "MRS%a %a_%a, %a", COND (OpCode), WriteBack ? "SPSR" : "CPSR", gReg[Rd]); -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- 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/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-