Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KbfQp-0003CR-Ec for qemu-devel@nongnu.org; Fri, 05 Sep 2008 13:49:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KbfQn-0003Bx-CH for qemu-devel@nongnu.org; Fri, 05 Sep 2008 13:49:14 -0400 Received: from [199.232.76.173] (port=46445 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KbfQn-0003Bq-7Q for qemu-devel@nongnu.org; Fri, 05 Sep 2008 13:49:13 -0400 Received: from hall.aurel32.net ([91.121.138.14]:34307) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KbfQm-0007Bi-HQ for qemu-devel@nongnu.org; Fri, 05 Sep 2008 13:49:12 -0400 Received: from junta-icatm144570-bada.red.retevision.es ([62.81.118.18] helo=volta.aurel32.net) by hall.aurel32.net with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1KbfQk-0007x2-FZ for qemu-devel@nongnu.org; Fri, 05 Sep 2008 19:49:10 +0200 Received: from aurel32 by volta.aurel32.net with local (Exim 4.69) (envelope-from ) id 1KbfQi-00083O-Q6 for qemu-devel@nongnu.org; Fri, 05 Sep 2008 19:49:08 +0200 Date: Fri, 5 Sep 2008 19:49:08 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 9/x] ppc: Convert op_add, op_addi to TCG Message-ID: <20080905174908.GG15758@volta.aurel32.net> References: <3D7FC18B-1027-4AB9-ACDE-E7B650F259F2@googlemail.com> <519F0BAB-FCDE-40D4-9255-48CB569909E5@googlemail.com> <20080904143931.GC11924@volta.aurel32.net> <9F25F767-0618-4970-88E0-83FD155753C4@googlemail.com> <20080904203619.GA1819@volta.aurel32.net> <3970D476-0CFB-4F89-B06C-90FD9030AF8F@googlemail.com> <20080905141847.GA22837@volta.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 Fri, Sep 05, 2008 at 07:17:10PM +0200, Andreas Färber wrote: > > Am 05.09.2008 um 16:18 schrieb Aurélien Jarno: > >>> --- a/target-ppc/translate.c >>> +++ b/target-ppc/translate.c >>> @@ -827,10 +827,14 @@ __GEN_INT_ARITH1_O_64(name##o, opc1, opc2, >>> opc3 | >>> 0x10, type) >>> #endif >>> >>> /* add add. addo addo. */ >>> +static always_inline void gen_op_add (void) >>> +{ >>> + tcg_gen_add_tl(cpu_T[0], cpu_T[0], cpu_T[1]); >>> +} >> >> At some point, we will have to change this kind of function, otherwise >> it will be really difficult to get rid of T0, T1 and T2. > > Right, same for subf. But for now, a function of this name is still > required here for the add instruction due to the GEN_INT_ARITH2 (or > similar) macro slightly below, which appears to set up these functions > as handlers for the family of instruction opcodes iiuc. To change those > macros, the whole family (or even more instructions) will need to be > converted first. > > For me, the use of global TCG variables should permit it to run on Mac > OS X Leopard with GCC 4.0.1 at some point, so even if it doesn't allow > optimizations right away, it has some mid-term benefits. For the other > occurrences of gen_op_add I already inlined it for future optimizations > but didn't spot opportunities to do that yet. > > I will be mostly offline starting this weekend but would likely continue > working on ppc. If anyone else plans to work on it, it would be nice to > coordinate that in advance to avoid conflicting patches. I plan to work on memory loads/stores during the week-end. Note that I'll be offline on Sunday. -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net