* [Qemu-devel] [4176] Use a common constant for temp_buf size
@ 2008-04-08 19:29 Blue Swirl
0 siblings, 0 replies; only message in thread
From: Blue Swirl @ 2008-04-08 19:29 UTC (permalink / raw)
To: qemu-devel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-08 19:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-08 19:29 [Qemu-devel] [4176] Use a common constant for temp_buf size Blue Swirl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).