Commit fab94c0e989b5a270fe90d553bd665c91fc15f8c

Authored by pbrook
1 parent 64e3257c

Dynamically allocate tbs. Avoids branch range problems on RISC hosts.



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4555 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 2 additions and 1 deletions
@@ -84,7 +84,7 @@ @@ -84,7 +84,7 @@
84 #define TARGET_PHYS_ADDR_SPACE_BITS 32 84 #define TARGET_PHYS_ADDR_SPACE_BITS 32
85 #endif 85 #endif
86 86
87 -TranslationBlock tbs[CODE_GEN_MAX_BLOCKS]; 87 +TranslationBlock *tbs;
88 TranslationBlock *tb_phys_hash[CODE_GEN_PHYS_HASH_SIZE]; 88 TranslationBlock *tb_phys_hash[CODE_GEN_PHYS_HASH_SIZE];
89 int nb_tbs; 89 int nb_tbs;
90 /* any access to the tbs or the page table must use this lock */ 90 /* any access to the tbs or the page table must use this lock */
@@ -335,6 +335,7 @@ void cpu_exec_init(CPUState *env) @@ -335,6 +335,7 @@ void cpu_exec_init(CPUState *env)
335 335
336 if (!code_gen_ptr) { 336 if (!code_gen_ptr) {
337 cpu_gen_init(); 337 cpu_gen_init();
  338 + tbs = qemu_malloc(CODE_GEN_MAX_BLOCKS * sizeof(TranslationBlock));
338 code_gen_ptr = code_gen_buffer; 339 code_gen_ptr = code_gen_buffer;
339 page_init(); 340 page_init();
340 io_mem_init(); 341 io_mem_init();