]> git.proxmox.com Git - qemu.git/blobdiff - exec.c
jump simplification
[qemu.git] / exec.c
diff --git a/exec.c b/exec.c
index 7f62e7173a9ce452573becb3758aff1a1519d4d7..0aaa8358c9977290cf618265d3b79efa118d8a01 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -84,7 +84,7 @@
 #define TARGET_PHYS_ADDR_SPACE_BITS 32
 #endif
 
-TranslationBlock tbs[CODE_GEN_MAX_BLOCKS];
+TranslationBlock *tbs;
 TranslationBlock *tb_phys_hash[CODE_GEN_PHYS_HASH_SIZE];
 int nb_tbs;
 /* any access to the tbs or the page table must use this lock */
@@ -335,6 +335,7 @@ void cpu_exec_init(CPUState *env)
 
     if (!code_gen_ptr) {
         cpu_gen_init();
+        tbs = qemu_malloc(CODE_GEN_MAX_BLOCKS * sizeof(TranslationBlock));
         code_gen_ptr = code_gen_buffer;
         page_init();
         io_mem_init();
@@ -1744,9 +1745,6 @@ int tlb_set_page_exec(CPUState *env, target_ulong vaddr,
             te->addr_read = -1;
         }
 
-        if (te->addr_code != -1) {
-            tlb_flush_jmp_cache(env, te->addr_code);
-        }
         if (prot & PAGE_EXEC) {
             te->addr_code = address;
         } else {
@@ -2143,8 +2141,8 @@ ram_addr_t qemu_ram_alloc(ram_addr_t size)
 {
     ram_addr_t addr;
     if ((phys_ram_alloc_offset + size) > phys_ram_size) {
-        fprintf(stderr, "Not enough memory (requested_size = %lu, max memory = %ld)\n",
-                size, phys_ram_size);
+        fprintf(stderr, "Not enough memory (requested_size = %" PRIu64 ", max memory = %" PRIu64 "\n",
+                (uint64_t)size, (uint64_t)phys_ram_size);
         abort();
     }
     addr = phys_ram_alloc_offset;