thumb32: Implement UXTH

This commit is contained in:
Lioncash 2021-02-10 16:07:17 -05:00
parent c0871d4c18
commit e12ee8d4d7
3 changed files with 14 additions and 1 deletions

View file

@ -36,4 +36,16 @@ bool ThumbTranslatorVisitor::thumb32_SXTAH(Reg n, Reg d, SignExtendRotation rota
return true;
}
bool ThumbTranslatorVisitor::thumb32_UXTH(Reg d, SignExtendRotation rotate, Reg m) {
if (d == Reg::PC || m == Reg::PC) {
return UnpredictableInstruction();
}
const auto rotated = Rotate(ir, m, rotate);
const auto result = ir.ZeroExtendHalfToWord(ir.LeastSignificantHalf(rotated));
ir.SetRegister(d, result);
return true;
}
} // namespace Dynarmic::A32