From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JzuEO-0004V6-L1 for qemu-devel@nongnu.org; Sat, 24 May 2008 09:56:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JzuEN-0004TF-78 for qemu-devel@nongnu.org; Sat, 24 May 2008 09:56:20 -0400 Received: from [199.232.76.173] (port=49490 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JzuEN-0004T8-2E for qemu-devel@nongnu.org; Sat, 24 May 2008 09:56:19 -0400 Received: from savannah.gnu.org ([199.232.41.3]:48977 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JzuEM-0008QO-NR for qemu-devel@nongnu.org; Sat, 24 May 2008 09:56:18 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1JzuEK-0007RB-2i for qemu-devel@nongnu.org; Sat, 24 May 2008 13:56:16 +0000 Received: from pbrook by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1JzuEJ-0007R5-Rm for qemu-devel@nongnu.org; Sat, 24 May 2008 13:56:16 +0000 MIME-Version: 1.0 Errors-To: pbrook Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Paul Brook Message-Id: Date: Sat, 24 May 2008 13:56:15 +0000 Subject: [Qemu-devel] [4555] Dynamically allocate tbs. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 4555 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4555 Author: pbrook Date: 2008-05-24 13:56:15 +0000 (Sat, 24 May 2008) Log Message: ----------- Dynamically allocate tbs. Avoids branch range problems on RISC hosts. Modified Paths: -------------- trunk/exec.c Modified: trunk/exec.c =================================================================== --- trunk/exec.c 2008-05-24 05:36:16 UTC (rev 4554) +++ trunk/exec.c 2008-05-24 13:56:15 UTC (rev 4555) @@ -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 @@ 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();