|
From: | Andreas Färber |
Subject: | Re: [Qemu-devel] [PATCH 2/2] ppc: Convert op_andi to TCG |
Date: | Sun, 14 Sep 2008 14:02:38 +0200 |
Am 14.09.2008 um 13:53 schrieb Blue Swirl:
On 9/14/08, Andreas Färber <address@hidden> wrote:Am 14.09.2008 um 13:35 schrieb Blue Swirl:On 9/14/08, Andreas Färber <address@hidden> wrote:Replace op_andi_... with tcg_gen_andi_tl.GEN_HANDLER2(andi_, "andi.", 0x1C, 0xFF, 0xFF, 0x00000000, PPC_INTEGER){ 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.
Right, but this optimization would require to move from gpr to T0 after the suggested mov+andi+mov optimization and before this gen_set_Rc0 thing. That would still save one line, so feel free to modify my patch or apply another one on top.
Andreas
[Prev in Thread] | Current Thread | [Next in Thread] |