From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60237) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGlGQ-00049b-Nk for qemu-devel@nongnu.org; Wed, 26 Sep 2012 02:38:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGlGM-0004WU-5t for qemu-devel@nongnu.org; Wed, 26 Sep 2012 02:38:30 -0400 Received: from hall.aurel32.net ([88.191.126.93]:33897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGlGL-0004WP-Vn for qemu-devel@nongnu.org; Wed, 26 Sep 2012 02:38:26 -0400 Date: Wed, 26 Sep 2012 08:38:19 +0200 From: Aurelien Jarno Message-ID: <20120926063819.GL23819@ohm.aurel32.net> References: <1348613859-17321-1-git-send-email-aurelien@aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH] target-xtensa: de-optimize EXTUI List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Filippov Cc: qemu-devel@nongnu.org On Wed, Sep 26, 2012 at 03:05:18AM +0400, Max Filippov wrote: > On Wed, Sep 26, 2012 at 2:57 AM, Aurelien Jarno wrote: > > Now that and with 0xff, 0xffff and 0xffffffff is optimized in > > tcg/tcg-op.h, there is no need to do it in target-xtensa/translate.c. > > > > Cc: Max Filippov > > Signed-off-by: Aurelien Jarno > > --- > > target-xtensa/translate.c | 15 +-------------- > > 1 file changed, 1 insertion(+), 14 deletions(-) > > > > diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c > > index ba3ffcb..c1358ee 100644 > > --- a/target-xtensa/translate.c > > +++ b/target-xtensa/translate.c > > @@ -1835,20 +1835,7 @@ static void disas_xtensa_insn(DisasContext *dc) > > } else { > > tcg_gen_mov_i32(tmp, cpu_R[RRR_T]); > > } > > I guess shri above may be de-optimized as well. > In any case Acked-by: Max Filippov Good catch, I looked for some patterns in the targets code, and didn't see this one. I'll send an updated patch. > > - > > - switch (maskimm) { > > - case 0xff: > > - tcg_gen_ext8u_i32(cpu_R[RRR_R], tmp); > > - break; > > - > > - case 0xffff: > > - tcg_gen_ext16u_i32(cpu_R[RRR_R], tmp); > > - break; > > - > > - default: > > - tcg_gen_andi_i32(cpu_R[RRR_R], tmp, maskimm); > > - break; > > - } > > + tcg_gen_andi_i32(cpu_R[RRR_R], tmp, maskimm); > > tcg_temp_free(tmp); > > } > > break; > > -- > > 1.7.10.4 > > > > > > -- > Thanks. > -- Max > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net