Merge branch 'master' into mem_map_ex_cse

This commit is contained in:
Chris Eagle
2015-08-29 21:22:33 -07:00
10 changed files with 179 additions and 14 deletions

View File

@@ -33,16 +33,16 @@
// Unicorn engine
MemoryRegion *memory_map(struct uc_struct *uc, ram_addr_t begin, size_t size, uint32_t perms)
{
uc->ram = g_new(MemoryRegion, 1);
MemoryRegion *ram = g_new(MemoryRegion, 1);
memory_region_init_ram(uc, uc->ram, NULL, "pc.ram", size, perms, &error_abort);
memory_region_init_ram(uc, ram, NULL, "pc.ram", size, perms, &error_abort);
memory_region_add_subregion(get_system_memory(uc), begin, uc->ram);
memory_region_add_subregion(get_system_memory(uc), begin, ram);
if (uc->current_cpu)
tlb_flush(uc->current_cpu, 1);
return uc->ram;
return ram;
}
void memory_unmap(struct uc_struct *uc, MemoryRegion *mr)