From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KCvX1-00023M-53 for qemu-devel@nongnu.org; Sun, 29 Jun 2008 07:57:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KCvWz-00021z-OR for qemu-devel@nongnu.org; Sun, 29 Jun 2008 07:57:22 -0400 Received: from [199.232.76.173] (port=38527 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KCvWz-00021W-Fv for qemu-devel@nongnu.org; Sun, 29 Jun 2008 07:57:21 -0400 Received: from brazzaville.magic.fr ([62.210.190.9]:39486) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KCvWz-0001CY-3Q for qemu-devel@nongnu.org; Sun, 29 Jun 2008 07:57:21 -0400 Received: from [192.168.0.2] (ppp-36.net-123.static.magiconline.fr [80.118.184.36]) by brazzaville.magic.fr (8.12.11.20060308/8.11.6) with ESMTP id m5TBvGht020921 for ; Sun, 29 Jun 2008 13:57:16 +0200 Subject: Re: [Qemu-devel] [4799] Add instruction counter. From: "J. Mayer" In-Reply-To: <761ea48b0806290258x5eac096aj377a011a6ca028d6@mail.gmail.com> References: <761ea48b0806290258x5eac096aj377a011a6ca028d6@mail.gmail.com> Content-Type: text/plain Date: Sun, 29 Jun 2008 13:57:15 +0200 Message-Id: <1214740636.30251.11.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 11:58 +0200, Laurent Desnogues wrote: > On Sun, Jun 29, 2008 at 3:03 AM, Paul Brook wrote: > > Revision: 4799 > > http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4799 > > Author: pbrook > > Date: 2008-06-29 01:03:05 +0000 (Sun, 29 Jun 2008) > > Some trivial comments: > - missing gen_icount.h file > - duplicate num_insns = 0; in > target_mips/translate.c/gen_intermediate_code_internal > - typo in vl.c/help "clock ticks per instructon" > - typo in qemu-doc.texi under icount: "cache heirachies" A few more comments, taking a quick look at the PowerPC target changes: +void ppc_translate_init(void) +{ + 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. - why isn't this variable / code shared with other targets (can see the exact same code in Alpha target...) ? - one detail: this function is more likely to be found in translate_init.c -- J. Mayer Never organized