mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-04 05:34:42 +01:00
system: Raise exception for YIELD, WFE, WFI, SEV, SEVL
This commit is contained in:
parent
c832cec96d
commit
fd075d8d68
4 changed files with 23 additions and 12 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ struct TranslatorVisitor final {
|
|||
bool DecodeError();
|
||||
bool ReservedValue();
|
||||
bool UnallocatedEncoding();
|
||||
bool RaiseException(Exception exception);
|
||||
|
||||
struct BitMasks {
|
||||
u64 wmask, tmask;
|
||||
|
|
|
|||
|
|
@ -17,23 +17,23 @@ bool TranslatorVisitor::NOP() {
|
|||
}
|
||||
|
||||
bool TranslatorVisitor::YIELD() {
|
||||
return true;
|
||||
return RaiseException(Exception::Yield);
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::WFE() {
|
||||
return true;
|
||||
return RaiseException(Exception::WaitForEvent);
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::WFI() {
|
||||
return true;
|
||||
return RaiseException(Exception::WaitForInterrupt);
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::SEV() {
|
||||
return true;
|
||||
return RaiseException(Exception::SendEvent);
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::SEVL() {
|
||||
return true;
|
||||
return RaiseException(Exception::SendEventLocal);
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::CLREX(Imm<4> /*CRm*/) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue