From b38dd191bde53d365ca3740d163c76733a67f94a Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 2 May 2018 08:12:38 -0400 Subject: [PATCH] disassembler_arm: Remove rotation helper function in favor of Common::RotateRight Mildly reduces the amount of duplicated behavior --- src/frontend/A32/disassembler/disassembler_arm.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/frontend/A32/disassembler/disassembler_arm.cpp b/src/frontend/A32/disassembler/disassembler_arm.cpp index dbd34f9d..5bf44432 100644 --- a/src/frontend/A32/disassembler/disassembler_arm.cpp +++ b/src/frontend/A32/disassembler/disassembler_arm.cpp @@ -23,14 +23,8 @@ class DisassemblerVisitor { public: using instruction_return_type = std::string; - u32 rotr(u32 x, int shift) { - shift &= 31; - if (!shift) return x; - return (x >> shift) | (x << (32 - shift)); - } - u32 ArmExpandImm(int rotate, Imm8 imm8) { - return rotr(static_cast(imm8), rotate*2); + return Common::RotateRight(static_cast(imm8), rotate*2); } std::string ShiftStr(ShiftType shift, Imm5 imm5) {