mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-03-10 00:46:27 +00:00
thumb32: Implement LSR (register)
This commit is contained in:
@@ -24,6 +24,19 @@ bool ThumbTranslatorVisitor::thumb32_LSL_reg(Reg m, Reg d, Reg s) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ThumbTranslatorVisitor::thumb32_LSR_reg(Reg m, Reg d, Reg s) {
|
||||
if (d == Reg::PC || m == Reg::PC || s == Reg::PC) {
|
||||
return UnpredictableInstruction();
|
||||
}
|
||||
|
||||
const auto shift_s = ir.LeastSignificantByte(ir.GetRegister(s));
|
||||
const auto apsr_c = ir.GetCFlag();
|
||||
const auto result_carry = ir.LogicalShiftRight(ir.GetRegister(m), shift_s, apsr_c);
|
||||
|
||||
ir.SetRegister(d, result_carry.result);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ThumbTranslatorVisitor::thumb32_SXTB(Reg d, SignExtendRotation rotate, Reg m) {
|
||||
if (d == Reg::PC || m == Reg::PC) {
|
||||
return UnpredictableInstruction();
|
||||
|
||||
@@ -183,6 +183,7 @@ struct ThumbTranslatorVisitor final {
|
||||
|
||||
// thumb32 data processing (register) instructions
|
||||
bool thumb32_LSL_reg(Reg m, Reg d, Reg s);
|
||||
bool thumb32_LSR_reg(Reg m, Reg d, Reg s);
|
||||
bool thumb32_SXTB(Reg d, SignExtendRotation rotate, Reg m);
|
||||
bool thumb32_SXTB16(Reg d, SignExtendRotation rotate, Reg m);
|
||||
bool thumb32_SXTAB(Reg n, Reg d, SignExtendRotation rotate, Reg m);
|
||||
|
||||
Reference in New Issue
Block a user