mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-06 06:28:13 +01:00
microinstruction: Make use_count private (#53)
Makes the operation a part of the direct interface.
This commit is contained in:
parent
3621a925b2
commit
de1f831d79
6 changed files with 31 additions and 32 deletions
|
|
@ -217,7 +217,11 @@ bool Inst::MayHaveSideEffects() const {
|
|||
WritesToFPSCR() ||
|
||||
AltersExclusiveState() ||
|
||||
IsMemoryWrite();
|
||||
}
|
||||
|
||||
void Inst::DecrementRemainingUses() {
|
||||
ASSERT_MSG(HasUses(), "Microinstruction doesn't have any remaining uses");
|
||||
use_count--;
|
||||
}
|
||||
|
||||
Inst* Inst::GetAssociatedPseudoOperation(Opcode opcode) {
|
||||
|
|
|
|||
|
|
@ -73,7 +73,10 @@ public:
|
|||
/// Determines whether or not this instruction may have side-effects.
|
||||
bool MayHaveSideEffects() const;
|
||||
|
||||
size_t UseCount() const { return use_count; }
|
||||
bool HasUses() const { return use_count > 0; }
|
||||
void DecrementRemainingUses();
|
||||
|
||||
/// Gets a pseudo-operation associated with this instruction.
|
||||
Inst* GetAssociatedPseudoOperation(Opcode opcode);
|
||||
|
||||
|
|
@ -91,13 +94,12 @@ public:
|
|||
|
||||
void ReplaceUsesWith(Value& replacement);
|
||||
|
||||
size_t use_count = 0;
|
||||
|
||||
private:
|
||||
void Use(Value& value);
|
||||
void UndoUse(Value& value);
|
||||
|
||||
Opcode op;
|
||||
size_t use_count = 0;
|
||||
std::array<Value, 3> args;
|
||||
|
||||
Inst* carry_inst = nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue