qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [4176] Use a common constant for temp_buf size
Date: Tue, 08 Apr 2008 19:29:55 +0000	[thread overview]
Message-ID: <E1JjJVz-00040u-6l@cvs.savannah.gnu.org> (raw)

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

                 reply	other threads:[~2008-04-08 19:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1JjJVz-00040u-6l@cvs.savannah.gnu.org \
    --to=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).