aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2012-04-10 02:48:17 +0400
committerBlue Swirl <blauwirbel@gmail.com>2012-04-14 15:25:36 +0000
commit1e7855a558085d6acd0aba4e3278b594d05df1ec (patch)
treebd5c5b312a9a86518336bdec9e7f51a3b7d52289 /exec.c
parent2050396801ca0c8359364d61eaadece951006057 (diff)
exec: provide tb_invalidate_phys_addr function
Allow TB invalidation by its physical address, extract implementation from the breakpoint_invalidate function. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/exec.c b/exec.c
index 63a0d2f4cb..68b8a6a2ba 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 */