mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-06 22:48:25 +01:00
A64: Add ExceptionRaised IR instruction
The purpose of this instruction is to raise exceptions when certain decode-time issues happen, instead of asserting at translate time. This allows us to use the translator for code analysis without worrying about unnecessary asserts, but also provides flexibility for the library user to perform custom behaviour when one of these states are raised.
This commit is contained in:
parent
71a1851ee6
commit
0992987c98
7 changed files with 41 additions and 4 deletions
|
|
@ -17,17 +17,20 @@ bool TranslatorVisitor::InterpretThisInstruction() {
|
|||
}
|
||||
|
||||
bool TranslatorVisitor::UnpredictableInstruction() {
|
||||
ASSERT_MSG(false, "UNPREDICTABLE");
|
||||
ir.ExceptionRaised(Exception::UnpredictableInstruction);
|
||||
ir.SetTerm(IR::Term::CheckHalt{IR::Term::ReturnToDispatch{}});
|
||||
return false;
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::ReservedValue() {
|
||||
ASSERT_MSG(false, "RESERVEDVALUE");
|
||||
ir.ExceptionRaised(Exception::ReservedValue);
|
||||
ir.SetTerm(IR::Term::CheckHalt{IR::Term::ReturnToDispatch{}});
|
||||
return false;
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::UnallocatedEncoding() {
|
||||
ASSERT_MSG(false, "UNALLOCATEDENCODING");
|
||||
ir.ExceptionRaised(Exception::UnallocatedEncoding);
|
||||
ir.SetTerm(IR::Term::CheckHalt{IR::Term::ReturnToDispatch{}});
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue