register constant check optimization + disable branch likely's for now
This commit is contained in:
@@ -14,17 +14,41 @@ struct Registers {
|
||||
[[nodiscard]] bool IsRegConstant(const u32 index) const {
|
||||
if (index == 0)
|
||||
return true;
|
||||
return gprIsConstant[index];
|
||||
return regIsConstant & (1 << index);
|
||||
}
|
||||
|
||||
[[nodiscard]] bool IsRegConstant(const u32 first, const u32 second) const {
|
||||
return IsRegConstant(first) && IsRegConstant(second);
|
||||
}
|
||||
|
||||
bool GetLOConstant() {
|
||||
return regIsConstant & (1ull << 32);
|
||||
}
|
||||
|
||||
bool GetHIConstant() {
|
||||
return regIsConstant & (1ull << 33);
|
||||
}
|
||||
|
||||
void SetLOConstant() {
|
||||
regIsConstant |= (1ull << 32);
|
||||
}
|
||||
|
||||
void SetHIConstant() {
|
||||
regIsConstant |= (1ull << 33);
|
||||
}
|
||||
|
||||
void UnsetLOConstant() {
|
||||
regIsConstant &= ~(1ull << 32);
|
||||
}
|
||||
|
||||
void UnsetHIConstant() {
|
||||
regIsConstant &= ~(1ull << 33);
|
||||
}
|
||||
|
||||
JIT *jit = nullptr;
|
||||
|
||||
std::array<bool, 32> gprIsConstant{};
|
||||
bool loIsConstant = false, hiIsConstant = false;
|
||||
uint64_t regIsConstant = 0;
|
||||
|
||||
Cop0 cop0;
|
||||
Cop1 cop1;
|
||||
s64 oldPC{}, pc{}, nextPC{};
|
||||
|
||||
Reference in New Issue
Block a user