mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-03-05 18:22:57 +00:00
A64: Optimization: Merge interpret blocks
This commit is contained in:
@@ -90,6 +90,11 @@ void Block::SetTerminal(Terminal term) {
|
||||
terminal = term;
|
||||
}
|
||||
|
||||
void Block::ReplaceTerminal(Terminal term) {
|
||||
ASSERT_MSG(HasTerminal(), "Terminal has not been set.");
|
||||
terminal = term;
|
||||
}
|
||||
|
||||
bool Block::HasTerminal() const {
|
||||
return terminal.which() != 0;
|
||||
}
|
||||
|
||||
@@ -111,6 +111,8 @@ public:
|
||||
Terminal GetTerminal() const;
|
||||
/// Sets the terminal instruction for this basic block.
|
||||
void SetTerminal(Terminal term);
|
||||
/// Replaces the terminal instruction for this basic block.
|
||||
void ReplaceTerminal(Terminal term);
|
||||
/// Determines whether or not this basic block has a terminal instruction.
|
||||
bool HasTerminal() const;
|
||||
|
||||
|
||||
@@ -20,11 +20,12 @@ struct Invalid {};
|
||||
|
||||
/**
|
||||
* This terminal instruction calls the interpreter, starting at `next`.
|
||||
* The interpreter must interpret exactly one instruction.
|
||||
* The interpreter must interpret exactly `num_instructions` instructions.
|
||||
*/
|
||||
struct Interpret {
|
||||
explicit Interpret(const LocationDescriptor& next_) : next(next_) {}
|
||||
LocationDescriptor next; ///< Location at which interpretation starts.
|
||||
size_t num_instructions = 1;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user