mirror of
https://github.com/azahar-emu/dynarmic
synced 2025-11-15 19:40:00 +01:00
a32/exception_generating: BPKT: Define unpredictable behaviour
Define unpredictable behaviour to be BKPT executes conditionally
This commit is contained in:
parent
a12854857b
commit
f0184c4b8d
@ -11,13 +11,17 @@
|
|||||||
namespace Dynarmic::A32 {
|
namespace Dynarmic::A32 {
|
||||||
|
|
||||||
bool ArmTranslatorVisitor::arm_BKPT(Cond cond, Imm12 /*imm12*/, Imm4 /*imm4*/) {
|
bool ArmTranslatorVisitor::arm_BKPT(Cond cond, Imm12 /*imm12*/, Imm4 /*imm4*/) {
|
||||||
if (cond != Cond::AL) {
|
if (cond != Cond::AL && !options.define_unpredictable_behaviour) {
|
||||||
return UnpredictableInstruction();
|
return UnpredictableInstruction();
|
||||||
}
|
}
|
||||||
|
// UNPREDICTABLE: The instruction executes conditionally.
|
||||||
|
|
||||||
|
if (ConditionPassed(cond)) {
|
||||||
ir.ExceptionRaised(Exception::Breakpoint);
|
ir.ExceptionRaised(Exception::Breakpoint);
|
||||||
ir.SetTerm(IR::Term::CheckHalt{IR::Term::ReturnToDispatch{}});
|
ir.SetTerm(IR::Term::CheckHalt{IR::Term::ReturnToDispatch{}});
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ArmTranslatorVisitor::arm_SVC(Cond cond, Imm24 imm24) {
|
bool ArmTranslatorVisitor::arm_SVC(Cond cond, Imm24 imm24) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user