mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-11 08:39:28 +01:00
x86jit: Add some helpers to check state.
This commit is contained in:
1 parent
de566be2ce
commit
27148d3712
2 files changed
+23
No files matched your search
@@ -111,6 +111,18 @@ void FPURegCache::MapRegsV(const u8 *r, VectorSize sz, int flags) {
|
||||
}
|
||||
}
|
||||
|
||||
bool FPURegCache::IsMappedVS(u8 *r, VectorSize vsz) {
|
||||
const int n = GetNumVectorElements(vsz);
|
||||
if (!IsMappedVS(r[0]))
|
||||
return false;
|
||||
X64Reg xr = VSX(r[0]);
|
||||
for (int i = 0; i < n; ++i) {
|
||||
if (!IsMappedVS(r[i]) || VSX(r[i]) != xr)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void FPURegCache::MapRegsVS(const u8 *r, VectorSize vsz, int flags) {
|
||||
const int n = GetNumVectorElements(vsz);
|
||||
if (!TryMapRegsVS(r, vsz, flags)) {
|
||||
|
||||
@@ -162,6 +162,17 @@ public:
|
||||
void ReleaseSpillLock(int mipsrega);
|
||||
void ReleaseSpillLocks();
|
||||
|
||||
bool IsMapped(int r) {
|
||||
return R(r).IsSimpleReg();
|
||||
}
|
||||
bool IsMappedV(int v) {
|
||||
return vregs[v].lane == 0 && V(v).IsSimpleReg();
|
||||
}
|
||||
bool IsMappedVS(int v) {
|
||||
return vregs[v].lane != 0 && VS(v).IsSimpleReg();
|
||||
}
|
||||
bool IsMappedVS(u8 *r, VectorSize vsz);
|
||||
|
||||
void MapRegV(int vreg, int flags);
|
||||
void MapRegsV(int vec, VectorSize vsz, int flags);
|
||||
void MapRegsV(const u8 *v, VectorSize vsz, int flags);
|
||||
|
||||
Reference in new issue
Block a user