mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 17:23:40 +01:00
softjit: Cleanup, add other arch types to regcache.
This commit is contained in:
1 parent
c1882fa1c0
commit
4703b6cb56
2 files changed
+17
-16
No files matched your search
@@ -645,9 +645,12 @@ void PixelRegCache::Reset(bool validate) {
|
||||
regs.clear();
|
||||
}
|
||||
|
||||
void PixelRegCache::Add(PixelRegCache::Reg r, PixelRegCache::Purpose p) {
|
||||
RegStatus *status = FindReg(r, (p & FLAG_GEN) != 0);
|
||||
_assert_msg_(status == nullptr, "softjit Add() reg duplicate (%04X)", p);
|
||||
void PixelRegCache::Add(Reg r, Purpose p) {
|
||||
for (auto ® : regs) {
|
||||
if (reg.reg == r && (reg.purpose & FLAG_GEN) == (p & FLAG_GEN)) {
|
||||
_assert_msg_(false, "softjit Add() reg duplicate (%04X)", p);
|
||||
}
|
||||
}
|
||||
_assert_msg_(r != REG_INVALID_VALUE, "softjit Add() invalid reg (%04X)", p);
|
||||
|
||||
RegStatus newStatus;
|
||||
@@ -696,7 +699,7 @@ void PixelRegCache::Unlock(Reg &r, Purpose p) {
|
||||
_assert_msg_(false, "softjit Unlock() reg that isn't there (%04X)", p);
|
||||
}
|
||||
|
||||
bool PixelRegCache::Has(PixelRegCache::Purpose p) {
|
||||
bool PixelRegCache::Has(Purpose p) {
|
||||
for (auto ® : regs) {
|
||||
if (reg.purpose == p) {
|
||||
return true;
|
||||
@@ -824,14 +827,4 @@ PixelRegCache::RegStatus *PixelRegCache::FindReg(Reg r, Purpose p) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
PixelRegCache::RegStatus *PixelRegCache::FindReg(Reg r, bool isGen) {
|
||||
for (auto ® : regs) {
|
||||
if (reg.reg == r && (reg.purpose & FLAG_GEN) == (isGen ? FLAG_GEN : 0)) {
|
||||
return ®
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
};
|
||||
Reference in new issue
Block a user