a32/exception_generating: BPKT: Define unpredictable behaviour
Define unpredictable behaviour to be BKPT executes conditionally
This commit is contained in:
parent
a12854857b
commit
f0184c4b8d
1 changed files with 8 additions and 4 deletions
|
@ -11,13 +11,17 @@
|
|||
namespace Dynarmic::A32 {
|
||||
|
||||
bool ArmTranslatorVisitor::arm_BKPT(Cond cond, Imm12 /*imm12*/, Imm4 /*imm4*/) {
|
||||
if (cond != Cond::AL) {
|
||||
if (cond != Cond::AL && !options.define_unpredictable_behaviour) {
|
||||
return UnpredictableInstruction();
|
||||
}
|
||||
// UNPREDICTABLE: The instruction executes conditionally.
|
||||
|
||||
if (ConditionPassed(cond)) {
|
||||
ir.ExceptionRaised(Exception::Breakpoint);
|
||||
ir.SetTerm(IR::Term::CheckHalt{IR::Term::ReturnToDispatch{}});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ArmTranslatorVisitor::arm_SVC(Cond cond, Imm24 imm24) {
|
||||
|
|
Loading…
Reference in a new issue