e2k: Fix performance regression.

Signed-off-by: Denis Drakhnya <numas13@gmail.com>
This commit is contained in:
Denis Drakhnia 2021-03-16 23:20:25 +02:00 committed by Denis Drakhnia
parent c03d91b7c0
commit 5301939d1f
1 changed files with 3 additions and 7 deletions

View File

@ -8,22 +8,18 @@
static int e2k_probe_access(CPUE2KState *env, target_ulong addr, int size,
MMUAccessType access_type, int mmu_idx)
{
target_ulong addr_end = addr + size;
int flags;
void *ignore;
flags = probe_access_flags(env, addr, access_type, mmu_idx,
true, &ignore, 0);
if (flags & TLB_INVALID_MASK) {
return 0;
} else if ((addr & ~TARGET_PAGE_MASK) != (addr_end & ~TARGET_PAGE_MASK)) {
flags = probe_access_flags(env, addr_end, access_type, mmu_idx,
if ((addr & (size - 1)) && !(flags & TLB_INVALID_MASK)) {
flags = probe_access_flags(env, addr + size, access_type, mmu_idx,
true, &ignore, 0);
return !(flags & TLB_INVALID_MASK);
}
return 1;
return !(flags & TLB_INVALID_MASK);
}
int HELPER(probe_read_access)(CPUE2KState *env, target_ulong addr,