mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2025-12-31 03:37:42 +01:00
A64: Add hook_hint_instructions option
This commit is contained in:
parent
396116ee61
commit
717bd2fbb2
3 changed files with 30 additions and 6 deletions
|
|
@ -37,22 +37,37 @@ bool TranslatorVisitor::NOP() {
|
|||
}
|
||||
|
||||
bool TranslatorVisitor::YIELD() {
|
||||
if (!options.hook_hint_instructions) {
|
||||
return true;
|
||||
}
|
||||
return RaiseException(Exception::Yield);
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::WFE() {
|
||||
if (!options.hook_hint_instructions) {
|
||||
return true;
|
||||
}
|
||||
return RaiseException(Exception::WaitForEvent);
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::WFI() {
|
||||
if (!options.hook_hint_instructions) {
|
||||
return true;
|
||||
}
|
||||
return RaiseException(Exception::WaitForInterrupt);
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::SEV() {
|
||||
if (!options.hook_hint_instructions) {
|
||||
return true;
|
||||
}
|
||||
return RaiseException(Exception::SendEvent);
|
||||
}
|
||||
|
||||
bool TranslatorVisitor::SEVL() {
|
||||
if (!options.hook_hint_instructions) {
|
||||
return true;
|
||||
}
|
||||
return RaiseException(Exception::SendEventLocal);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,11 @@ struct TranslationOptions {
|
|||
/// If this is false, the ExceptionRaised IR instruction is emitted.
|
||||
/// If this is true, we define some behaviour for some instructions.
|
||||
bool define_unpredictable_behaviour = false;
|
||||
|
||||
/// This changes what IR we emit when we translate a hint instruction.
|
||||
/// If this is false, we treat the instruction as a NOP.
|
||||
/// If this is true, we emit an ExceptionRaised instruction.
|
||||
bool hook_hint_instructions = true;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue