From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KeqKI-0001Cq-5t for qemu-devel@nongnu.org; Sun, 14 Sep 2008 08:03:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KeqKG-0001BH-BJ for qemu-devel@nongnu.org; Sun, 14 Sep 2008 08:03:37 -0400 Received: from [199.232.76.173] (port=51871 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KeqKF-0001Ay-NZ for qemu-devel@nongnu.org; Sun, 14 Sep 2008 08:03:36 -0400 Received: from mail.codesourcery.com ([65.74.133.4]:33554) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KeqKF-0008TD-2U for qemu-devel@nongnu.org; Sun, 14 Sep 2008 08:03:35 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH 2/2] ppc: Convert op_andi to TCG Date: Sun, 14 Sep 2008 13:03:26 +0100 References: <0485E6FE-5D41-4E23-88F7-514FA3A25C4C@web.de> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809141303.27871.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 Cc: Blue Swirl , Andreas =?utf-8?q?F=C3=A4rber?= , Aurelien Jarno > > > > tcg_gen_mov_tl(cpu_T[0], cpu_gpr[rS(ctx->opcode)]); > > > > - gen_op_andi_T0(UIMM(ctx->opcode)); > > > > + tcg_gen_andi_tl(cpu_T[0], cpu_T[0], UIMM(ctx->opcode)); > > > > tcg_gen_mov_tl(cpu_gpr[rA(ctx->opcode)], cpu_T[0]); > > > > gen_set_Rc0(ctx); > > > > } > > > > > > Small comment: this would be more optimally: > > > tcg_gen_andi_tl(cpu_gpr[rA(ctx->opcode)], > > > cpu_gpr[rS(ctx->opcode)], UIMM(ctx->opcode)); > > > > > > The same applies to andis. > > > > Careful there, iirc this cannot be done before gen_set_Rc0 is converted! > > I didn't mean to remove gen_set_Rc0, the comment only applied to the > mov+andi+mov sequence. set_Rc0 relies on T0 being set correctly be the preceding sequence. Paul