Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KagQ0-0008S9-2U for qemu-devel@nongnu.org; Tue, 02 Sep 2008 20:40:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KagPy-0008Rx-Ol for qemu-devel@nongnu.org; Tue, 02 Sep 2008 20:40:19 -0400 Received: from [199.232.76.173] (port=43917 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KagPy-0008Ru-H4 for qemu-devel@nongnu.org; Tue, 02 Sep 2008 20:40:18 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:58512) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KagPx-0003ew-L9 for qemu-devel@nongnu.org; Tue, 02 Sep 2008 20:40:18 -0400 Message-Id: From: =?ISO-8859-1?Q?Andreas_F=E4rber?= In-Reply-To: <20080902232051.GS4681@volta.aurel32.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v926) Subject: Re: [Qemu-devel] [PATCH 5/x] ppc: Convert op_load_gpr_{T0, T1, T2} to TCG Date: Wed, 3 Sep 2008 02:39:52 +0200 References: <1F0A98C0-A1DE-4548-8A4D-9E15EDC72686@web.de> <5CA2F35D-6016-4FE5-8289-EB8758A2D3A4@web.de> <5FBA68BE-2F96-41D9-B032-BCA4A96557A7@web.de> <16A6085C-BD53-4AB5-8E39-0CA993CE12FF@web.de> <8E69B597-ADAC-4E4B-A675-45FEDDAF65BF@web.de> <20080902232051.GS4681@volta.aurel32.net> Sender: andreas.faerber@web.de Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: qemu-devel@nongnu.org Am 03.09.2008 um 01:20 schrieb Aurelien Jarno: > On Wed, Sep 03, 2008 at 12:22:48AM +0200, Andreas F=E4rber wrote: >> + static const char* const gprnames[32] =3D { >> + "r0", >> + "r1", >> + "r2", >> + "r3", >> + "r4", >> + "r5", >> + "r6", >> + "r7", >> + "r8", >> + "r9", >> + "r10", >> + "r11", >> + "r12", >> + "r13", >> + "r14", >> + "r15", >> + "r16", >> + "r17", >> + "r18", >> + "r19", >> + "r20", >> + "r21", >> + "r22", >> + "r23", >> + "r24", >> + "r25", >> + "r26", >> + "r27", >> + "r28", >> + "r29", >> + "r30", >> + "r31" >> + }; >> + > > You may want to use a sprintf() function instead (see other targets). I based this on SH4. Will check the others. > >> + for (i =3D 0; i < 32; i++) { >> + cpu_gpr[i] =3D tcg_global_mem_new(TCG_TYPE_TL, TCG_AREG0, >> + offsetof(CPUState, gpr[i]), >> + gprnames[i]); > > This is most probably wrong given the definition of ppc_gpr_t in =20 > cpu.h: > - 64 bits on 64-bit targets > - 32 bits on 32-bit targets and 32-bit hosts > - *64 bits* on 32-bit targets and 64-bit hosts > > I think it is a bit weird, and I think the best is to modify cpu.h in > order to have ppc_gpr_t matching the target bitness. This might be related to the 64-on-32 issue I just posted about. I =20 don't remember seeing code that makes use of this sophisticated =20 definition though, for non-ppc64 it apparently uses a set of 32-bit =20 gpr and gprh variables. Let's not change ppc_gpr_t for now. > Care to also replace the ops in the same > patch? The related dyngen ops can't be removed yet due to SPE, in case that's =20= what you meant? > It's actually a general request, would nice to have a few more > instructions switched in a patch, to avoid spending to much time in > handling patches. The op_moven before was only separate because it was the first to =20 translate a ~ operation to TCG. This one is actually the largest patch in the series so far... Since =20 it's my first stab at (this side of) TCG and since translate.c has =20 several thousand lines of code, I appreciate early feedback on whether =20= I have to revert my branch and redo a commit/patch. I don't really =20 care if you apply it right away, the review is the more important part =20= and reviewing small chunks is easier, no? I'll rebase tomorrow and start pushing to repo.or.cz, that should make =20= testing and applying patches easier. Andreas