From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JjJW4-000763-5h for qemu-devel@nongnu.org; Tue, 08 Apr 2008 15:30:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JjJW2-00075r-PC for qemu-devel@nongnu.org; Tue, 08 Apr 2008 15:29:58 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JjJW2-00075o-Jt for qemu-devel@nongnu.org; Tue, 08 Apr 2008 15:29:58 -0400 Received: from savannah.gnu.org ([199.232.41.3] 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 1JjJW2-0007LS-8u for qemu-devel@nongnu.org; Tue, 08 Apr 2008 15:29:58 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1JjJVz-00040y-GG for qemu-devel@nongnu.org; Tue, 08 Apr 2008 19:29:55 +0000 Received: from blueswir1 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1JjJVz-00040u-6l for qemu-devel@nongnu.org; Tue, 08 Apr 2008 19:29:55 +0000 MIME-Version: 1.0 Errors-To: blueswir1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Blue Swirl Message-Id: Date: Tue, 08 Apr 2008 19:29:55 +0000 Subject: [Qemu-devel] [4176] Use a common constant for temp_buf size 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: 4176 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4176 Author: blueswir1 Date: 2008-04-08 19:29:54 +0000 (Tue, 08 Apr 2008) Log Message: ----------- Use a common constant for temp_buf size Modified Paths: -------------- trunk/cpu-defs.h trunk/translate-all.c Modified: trunk/cpu-defs.h =================================================================== --- trunk/cpu-defs.h 2008-04-08 18:37:39 UTC (rev 4175) +++ trunk/cpu-defs.h 2008-04-08 19:29:54 UTC (rev 4176) @@ -132,6 +132,7 @@ sizeof(target_phys_addr_t))]; } CPUTLBEntry; +#define CPU_TEMP_BUF_NLONGS 128 #define CPU_COMMON \ struct TranslationBlock *current_tb; /* currently executing TB */ \ /* soft mmu support */ \ @@ -145,7 +146,8 @@ /* The meaning of the MMU modes is defined in the target code. */ \ CPUTLBEntry tlb_table[NB_MMU_MODES][CPU_TLB_SIZE]; \ struct TranslationBlock *tb_jmp_cache[TB_JMP_CACHE_SIZE]; \ - long temp_buf[128]; /* buffer for temporaries in the code generator */ \ + /* buffer for temporaries in the code generator */ \ + long temp_buf[CPU_TEMP_BUF_NLONGS]; \ \ /* from this point: preserved by CPU reset */ \ /* ice debug support */ \ Modified: trunk/translate-all.c =================================================================== --- trunk/translate-all.c 2008-04-08 18:37:39 UTC (rev 4175) +++ trunk/translate-all.c 2008-04-08 19:29:54 UTC (rev 4176) @@ -85,7 +85,7 @@ { tcg_context_init(&tcg_ctx); tcg_set_frame(&tcg_ctx, TCG_AREG0, offsetof(CPUState, temp_buf), - 128 * sizeof(long)); + CPU_TEMP_BUF_NLONGS * sizeof(long)); } /* return non zero if the very first instruction is invalid so that