mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-05 22:18:16 +01:00
A32: Detect unpredictable LDM/STM instructions
This commit is contained in:
parent
cd1560c664
commit
668a43f815
5 changed files with 27 additions and 4 deletions
|
|
@ -768,6 +768,9 @@ bool ArmTranslatorVisitor::arm_LDM(Cond cond, bool W, Reg n, RegList list) {
|
|||
if (n == Reg::PC || Common::BitCount(list) < 1) {
|
||||
return UnpredictableInstruction();
|
||||
}
|
||||
if (W && Common::Bit(static_cast<size_t>(n), list)) {
|
||||
return UnpredictableInstruction();
|
||||
}
|
||||
|
||||
if (!ConditionPassed(cond)) {
|
||||
return true;
|
||||
|
|
@ -783,6 +786,9 @@ bool ArmTranslatorVisitor::arm_LDMDA(Cond cond, bool W, Reg n, RegList list) {
|
|||
if (n == Reg::PC || Common::BitCount(list) < 1) {
|
||||
return UnpredictableInstruction();
|
||||
}
|
||||
if (W && Common::Bit(static_cast<size_t>(n), list)) {
|
||||
return UnpredictableInstruction();
|
||||
}
|
||||
|
||||
if (!ConditionPassed(cond)) {
|
||||
return true;
|
||||
|
|
@ -798,6 +804,9 @@ bool ArmTranslatorVisitor::arm_LDMDB(Cond cond, bool W, Reg n, RegList list) {
|
|||
if (n == Reg::PC || Common::BitCount(list) < 1) {
|
||||
return UnpredictableInstruction();
|
||||
}
|
||||
if (W && Common::Bit(static_cast<size_t>(n), list)) {
|
||||
return UnpredictableInstruction();
|
||||
}
|
||||
|
||||
if (!ConditionPassed(cond)) {
|
||||
return true;
|
||||
|
|
@ -813,6 +822,9 @@ bool ArmTranslatorVisitor::arm_LDMIB(Cond cond, bool W, Reg n, RegList list) {
|
|||
if (n == Reg::PC || Common::BitCount(list) < 1) {
|
||||
return UnpredictableInstruction();
|
||||
}
|
||||
if (W && Common::Bit(static_cast<size_t>(n), list)) {
|
||||
return UnpredictableInstruction();
|
||||
}
|
||||
|
||||
if (!ConditionPassed(cond)) {
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue