Merge pull request #17906 from unknownbrackets/riscv-blocklink

riscv: Fix crash on clear icache
This commit is contained in:
Henrik Rydgård 2023-08-14 07:42:38 +02:00 committed by GitHub
commit 63b3b31feb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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) {