diff --git a/exec-all.h b/exec-all.h index fccce88459c58f50c2263ecfeea7873e92d249f8..6bcc07538f283497000e7ac9e155a0f54e3c41cc 100644 --- a/exec-all.h +++ b/exec-all.h @@ -102,6 +102,7 @@ void tlb_flush(CPUArchState *env, int flush_global); void tlb_set_page(CPUArchState *env, target_ulong vaddr, target_phys_addr_t paddr, int prot, int mmu_idx, target_ulong size); +void tb_invalidate_phys_addr(target_phys_addr_t addr); #endif #define CODE_GEN_ALIGN 16 /* must be >= of the size of a icache line */ diff --git a/exec.c b/exec.c index 63a0d2f4cb38173c8da9d3df53a3cd9ab6eae9ec..68b8a6a2ba75f42177cca3c7fab74ff8ee5272b5 100644 --- a/exec.c +++ b/exec.c @@ -1463,13 +1463,11 @@ static void breakpoint_invalidate(CPUArchState *env, target_ulong pc) tb_invalidate_phys_page_range(pc, pc + 1, 0); } #else -static void breakpoint_invalidate(CPUArchState *env, target_ulong pc) +void tb_invalidate_phys_addr(target_phys_addr_t addr) { - target_phys_addr_t addr; ram_addr_t ram_addr; MemoryRegionSection *section; - addr = cpu_get_phys_page_debug(env, pc); section = phys_page_find(addr >> TARGET_PAGE_BITS); if (!(memory_region_is_ram(section->mr) || (section->mr->rom_device && section->mr->readable))) { @@ -1479,6 +1477,11 @@ static void breakpoint_invalidate(CPUArchState *env, target_ulong pc) + section_addr(section, addr); tb_invalidate_phys_page_range(ram_addr, ram_addr + 1, 0); } + +static void breakpoint_invalidate(CPUArchState *env, target_ulong pc) +{ + tb_invalidate_phys_addr(cpu_get_phys_page_debug(env, pc)); +} #endif #endif /* TARGET_HAS_ICE */