extension: Simplify UXTB16

This commit is contained in:
MerryMage 2017-02-18 19:27:18 +00:00
parent 6edcfeba0b
commit 73d1cf36c3

View file

@ -141,9 +141,7 @@ bool ArmTranslatorVisitor::arm_UXTB16(Cond cond, Reg d, SignExtendRotation rotat
// UXTB16 <Rd>, <Rm>, <rotate> // UXTB16 <Rd>, <Rm>, <rotate>
if (ConditionPassed(cond)) { if (ConditionPassed(cond)) {
auto rotated = Rotate(ir, m, rotate); auto rotated = Rotate(ir, m, rotate);
auto lower_half = ir.ZeroExtendByteToWord(ir.LeastSignificantByte(rotated)); auto result = ir.And(rotated, ir.Imm32(0x00FF00FF));
auto upper_half = ir.And(rotated, ir.Imm32(0x00FF0000));
auto result = ir.Or(lower_half, upper_half);
ir.SetRegister(d, result); ir.SetRegister(d, result);
} }
return true; return true;