From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JL99Q-0005bG-K8 for qemu-devel@nongnu.org; Fri, 01 Feb 2008 22:34:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JL99O-0005Xh-Rm for qemu-devel@nongnu.org; Fri, 01 Feb 2008 22:34:43 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JL99O-0005XO-JI for qemu-devel@nongnu.org; Fri, 01 Feb 2008 22:34:42 -0500 Received: from mail.codesourcery.com ([65.74.133.4]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JL99O-00073I-69 for qemu-devel@nongnu.org; Fri, 01 Feb 2008 22:34:42 -0500 From: Paul Brook Subject: Re: [Qemu-devel] TCG Date: Sat, 2 Feb 2008 03:34:08 +0000 References: <47A31AE8.1010402@bellard.org> In-Reply-To: <47A31AE8.1010402@bellard.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802020334.10618.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 > I made minimal modifications in each target so that they can still work > by using TCG and legacy "dyngen" micro operations. More work will be > needed to convert each target to TCG, but it can be done progressively. > Only the x86 and x86_64 targets have been significantly modified to use > TCG. When playing with this a bit with the ARM target I found it very easy to get variables, immediate values and register indexes mixed up. e.g. using gen_add_i32 instead of gen_add_i32, or gen_mov_i32(foo, rn) instead of gen_ld_i32(foo, cpu_env, offsetof(CPUState, regs[rn]). Would you object to a patch that changed then gen_* functions in tgc_op to use an opaque type for variables? For performance reasons we probably want to keep it as an in in production builds, but for debugging it's nice to be able to catch the types of error mentioned above. IMHO it also helps to improve the clarity of the code. The changes should be mostly mechanical. Paul