mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
irjit: For debug, return the best block at addr.
Invalidation may result in multiple matching blocks, prefer any that is currently valid.
This commit is contained in:
parent
463b2a90c7
commit
cc8e9a93c3
1 changed files with 6 additions and 2 deletions
|
@ -405,14 +405,18 @@ int IRBlockCache::GetBlockNumberFromStartAddress(u32 em_address, bool realBlocks
|
|||
return -1;
|
||||
|
||||
const std::vector<int> &blocksInPage = iter->second;
|
||||
int best = -1;
|
||||
for (int i : blocksInPage) {
|
||||
uint32_t start, size;
|
||||
blocks_[i].GetRange(start, size);
|
||||
if (start == em_address) {
|
||||
return i;
|
||||
best = i;
|
||||
if (blocks_[i].IsValid()) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
return best;
|
||||
}
|
||||
|
||||
bool IRBlock::HasOriginalFirstOp() const {
|
||||
|
|
Loading…
Add table
Reference in a new issue