Merge pull request #17906 from unknownbrackets/riscv-blocklink

riscv: Fix crash on clear icache
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2023-08-14 07:42:38 +02:00
commit 63b3b31feb
1 file changed
+1 -7
+1 -7
View File
@@ -428,15 +428,9 @@ void IRNativeJit::InvalidateCacheAt(u32 em_address, int length) {
std::vector<int> numbers = blocks_.FindInvalidatedBlockNumbers(em_address, length);
for (int block_num : numbers) {
auto block = blocks_.GetBlock(block_num);
if (em_address != 0 || length < 0x1FFFFFFF) {
backend_->InvalidateBlock(block, block_num);
}
backend_->InvalidateBlock(block, block_num);
block->Destroy(block->GetTargetOffset());
}
if (em_address == 0 && length >= 0x1FFFFFFF) {
backend_->ClearAllBlocks();
}
}
bool IRNativeJit::DescribeCodePtr(const u8 *ptr, std::string &name) {