system: Raise exception for YIELD, WFE, WFI, SEV, SEVL

This commit is contained in:
MerryMage
2018-01-26 18:50:41 +00:00
parent c832cec96d
commit fd075d8d68
4 changed files with 23 additions and 12 deletions

View File

@@ -16,9 +16,7 @@ bool TranslatorVisitor::InterpretThisInstruction() {
}
bool TranslatorVisitor::UnpredictableInstruction() {
ir.ExceptionRaised(Exception::UnpredictableInstruction);
ir.SetTerm(IR::Term::CheckHalt{IR::Term::ReturnToDispatch{}});
return false;
return RaiseException(Exception::UnpredictableInstruction);
}
bool TranslatorVisitor::DecodeError() {
@@ -27,13 +25,15 @@ bool TranslatorVisitor::DecodeError() {
}
bool TranslatorVisitor::ReservedValue() {
ir.ExceptionRaised(Exception::ReservedValue);
ir.SetTerm(IR::Term::CheckHalt{IR::Term::ReturnToDispatch{}});
return false;
return RaiseException(Exception::ReservedValue);
}
bool TranslatorVisitor::UnallocatedEncoding() {
ir.ExceptionRaised(Exception::UnallocatedEncoding);
return RaiseException(Exception::UnallocatedEncoding);
}
bool TranslatorVisitor::RaiseException(Exception exception) {
ir.ExceptionRaised(exception);
ir.SetTerm(IR::Term::CheckHalt{IR::Term::ReturnToDispatch{}});
return false;
}