A32: Implement BKPT
This commit is contained in:
parent
f023bbb893
commit
865a30eb0d
2 changed files with 12 additions and 2 deletions
|
@ -24,6 +24,8 @@ enum class Exception {
|
||||||
/// An unpredictable instruction is to be executed. Implementation-defined behaviour should now happen.
|
/// An unpredictable instruction is to be executed. Implementation-defined behaviour should now happen.
|
||||||
/// This behaviour is up to the user of this library to define.
|
/// This behaviour is up to the user of this library to define.
|
||||||
UnpredictableInstruction,
|
UnpredictableInstruction,
|
||||||
|
/// A BKPT instruction was executed.
|
||||||
|
Breakpoint,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// These function pointers may be inserted into compiled code.
|
/// These function pointers may be inserted into compiled code.
|
||||||
|
|
|
@ -6,10 +6,18 @@
|
||||||
|
|
||||||
#include "translate_arm.h"
|
#include "translate_arm.h"
|
||||||
|
|
||||||
|
#include "dynarmic/A32/config.h"
|
||||||
|
|
||||||
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*/) {
|
||||||
return InterpretThisInstruction();
|
if (cond != Cond::AL) {
|
||||||
|
return UnpredictableInstruction();
|
||||||
|
}
|
||||||
|
|
||||||
|
ir.ExceptionRaised(Exception::Breakpoint);
|
||||||
|
ir.SetTerm(IR::Term::CheckHalt{IR::Term::ReturnToDispatch{}});
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ArmTranslatorVisitor::arm_SVC(Cond cond, Imm24 imm24) {
|
bool ArmTranslatorVisitor::arm_SVC(Cond cond, Imm24 imm24) {
|
||||||
|
|
Loading…
Reference in a new issue