From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KCwhz-0007g8-0r for qemu-devel@nongnu.org; Sun, 29 Jun 2008 09:12:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KCwhw-0007fw-Ko for qemu-devel@nongnu.org; Sun, 29 Jun 2008 09:12:45 -0400 Received: from [199.232.76.173] (port=44061 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KCwhw-0007ft-Ee for qemu-devel@nongnu.org; Sun, 29 Jun 2008 09:12:44 -0400 Received: from honiara.magic.fr ([195.154.193.36]:38191) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KCwhw-0001cL-DB for qemu-devel@nongnu.org; Sun, 29 Jun 2008 09:12:44 -0400 Received: from [192.168.0.2] (ppp-36.net-123.static.magiconline.fr [80.118.184.36]) by honiara.magic.fr (8.13.1/8.13.1) with ESMTP id m5TDCbgY025103 for ; Sun, 29 Jun 2008 15:12:37 +0200 Subject: Re: [Qemu-devel] [4799] Add instruction counter. From: "J. Mayer" In-Reply-To: <200806291328.37945.paul@codesourcery.com> References: <761ea48b0806290258x5eac096aj377a011a6ca028d6@mail.gmail.com> <1214740636.30251.11.camel@localhost> <200806291328.37945.paul@codesourcery.com> Content-Type: text/plain Date: Sun, 29 Jun 2008 15:12:41 +0200 Message-Id: <1214745161.30251.15.camel@localhost> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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 On Sun, 2008-06-29 at 13:28 +0100, Paul Brook wrote: > > + 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. thanks > > - 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. OK, I see. -- J. Mayer Never organized