From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KCw1w-00015r-Uy for qemu-devel@nongnu.org; Sun, 29 Jun 2008 08:29:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KCw1v-00015P-KF for qemu-devel@nongnu.org; Sun, 29 Jun 2008 08:29:20 -0400 Received: from [199.232.76.173] (port=41280 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KCw1v-00015K-BL for qemu-devel@nongnu.org; Sun, 29 Jun 2008 08:29:19 -0400 Received: from mail.codesourcery.com ([65.74.133.4]:57225) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KCw1v-0004ni-39 for qemu-devel@nongnu.org; Sun, 29 Jun 2008 08:29:19 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [4799] Add instruction counter. Date: Sun, 29 Jun 2008 13:28:35 +0100 References: <761ea48b0806290258x5eac096aj377a011a6ca028d6@mail.gmail.com> <1214740636.30251.11.camel@localhost> In-Reply-To: <1214740636.30251.11.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200806291328.37945.paul@codesourcery.com> 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 Cc: "J. Mayer" > + int done_init = 0; > + if (done_init) > + return; > + cpu_env = tcg_global_reg_new(TCG_TYPE_PTR, TCG_AREG0, "env"); > + done_init = 1; > +} > > - done_init is on the stack, thus will never be 1. Fixed. > - why isn't this variable / code shared with other targets (can see the > exact same code in Alpha target...) ? Maybe. Most targets have many globals and cpu_env is the only one that's really target independent. alpha and ppc are only the same because they still haven't been converted to TCG. Paul