mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 12:00:17 +02:00
OpcodeDispatcher: Optimize the case of all flags invalidated
When flags are invalidated but we're going to insert a new flag we end up in a situation where we loaded the prior value from memory, claimed unknown cache status (they were all invalid!), and then did an insert.
This commit is contained in:
1 parent
3d1bbe505d
commit
4feb059f51
1 file changed
+4
-1
@@ -1195,7 +1195,7 @@ private:
|
||||
flagsOp = SelectionFlag::Nothing;
|
||||
|
||||
if (IsNZCV(BitOffset))
|
||||
SetNZCV(InsertNZCV(GetNZCV(), BitOffset, Value));
|
||||
SetNZCV(InsertNZCV(PossiblySetNZCVBits ? GetNZCV() : nullptr, BitOffset, Value));
|
||||
else
|
||||
_StoreFlag(Value, BitOffset);
|
||||
}
|
||||
@@ -1362,6 +1362,9 @@ private:
|
||||
*/
|
||||
void InvalidateDeferredFlags() {
|
||||
CurrentDeferredFlags.Type = FlagsGenerationType::TYPE_NONE;
|
||||
|
||||
// No NZCV bits will be set, they are all invalid.
|
||||
PossiblySetNZCVBits = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user