From 73d1cf36c39a5b6fa1fb311962c1f2b4612e8d9d Mon Sep 17 00:00:00 2001 From: MerryMage Date: Sat, 18 Feb 2017 19:27:18 +0000 Subject: [PATCH] extension: Simplify UXTB16 --- src/frontend/translate/translate_arm/extension.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/frontend/translate/translate_arm/extension.cpp b/src/frontend/translate/translate_arm/extension.cpp index 2e1f0cac..81ec7ae5 100644 --- a/src/frontend/translate/translate_arm/extension.cpp +++ b/src/frontend/translate/translate_arm/extension.cpp @@ -141,9 +141,7 @@ bool ArmTranslatorVisitor::arm_UXTB16(Cond cond, Reg d, SignExtendRotation rotat // UXTB16 , , if (ConditionPassed(cond)) { auto rotated = Rotate(ir, m, rotate); - auto lower_half = ir.ZeroExtendByteToWord(ir.LeastSignificantByte(rotated)); - auto upper_half = ir.And(rotated, ir.Imm32(0x00FF0000)); - auto result = ir.Or(lower_half, upper_half); + auto result = ir.And(rotated, ir.Imm32(0x00FF00FF)); ir.SetRegister(d, result); } return true;