mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-03-05 18:22:57 +00:00
thumb32: Implement UXTB
This commit is contained in:
@@ -205,7 +205,7 @@ INST(thumb32_UXTB16, "UXTB16", "11111010001111111111dd
|
||||
INST(thumb32_UXTAB16, "UXTAB16", "111110100011nnnn1111dddd10rrmmmm")
|
||||
INST(thumb32_SXTB, "SXTB", "11111010010011111111dddd10rrmmmm")
|
||||
INST(thumb32_SXTAB, "SXTAB", "111110100100nnnn1111dddd10rrmmmm")
|
||||
//INST(thumb32_UXTB, "UXTB", "11111010010111111111----1-------")
|
||||
INST(thumb32_UXTB, "UXTB", "11111010010111111111dddd10rrmmmm")
|
||||
//INST(thumb32_UXTAB, "UXTAB", "111110100101----1111----1-------")
|
||||
|
||||
// Parallel Addition and Subtraction (signed)
|
||||
|
||||
@@ -90,6 +90,18 @@ bool ThumbTranslatorVisitor::thumb32_SXTAH(Reg n, Reg d, SignExtendRotation rota
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ThumbTranslatorVisitor::thumb32_UXTB(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.ZeroExtendByteToWord(ir.LeastSignificantByte(rotated));
|
||||
|
||||
ir.SetRegister(d, result);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ThumbTranslatorVisitor::thumb32_UXTB16(Reg d, SignExtendRotation rotate, Reg m) {
|
||||
if (d == Reg::PC || m == Reg::PC) {
|
||||
return UnpredictableInstruction();
|
||||
|
||||
@@ -128,6 +128,7 @@ struct ThumbTranslatorVisitor final {
|
||||
bool thumb32_SXTAB16(Reg n, Reg d, SignExtendRotation rotate, Reg m);
|
||||
bool thumb32_SXTH(Reg d, SignExtendRotation rotate, Reg m);
|
||||
bool thumb32_SXTAH(Reg n, Reg d, SignExtendRotation rotate, Reg m);
|
||||
bool thumb32_UXTB(Reg d, SignExtendRotation rotate, Reg m);
|
||||
bool thumb32_UXTB16(Reg d, SignExtendRotation rotate, Reg m);
|
||||
bool thumb32_UXTAB16(Reg n, Reg d, SignExtendRotation rotate, Reg m);
|
||||
bool thumb32_UXTH(Reg d, SignExtendRotation rotate, Reg m);
|
||||
|
||||
Reference in New Issue
Block a user