From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O0PFH-0005n4-0c for qemu-devel@nongnu.org; Fri, 09 Apr 2010 21:12:23 -0400 Received: from [140.186.70.92] (port=38846 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O0PFF-0005mM-9Y for qemu-devel@nongnu.org; Fri, 09 Apr 2010 21:12:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O0PFD-0005ER-LZ for qemu-devel@nongnu.org; Fri, 09 Apr 2010 21:12:21 -0400 Received: from hall.aurel32.net ([88.191.82.174]:50484) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O0PFD-0005EI-BI for qemu-devel@nongnu.org; Fri, 09 Apr 2010 21:12:19 -0400 Date: Sat, 10 Apr 2010 03:05:37 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 06/13] target-alpha: Use setcond for int comparisons. Message-ID: <20100410010537.GY21042@volta.aurel32.net> References: <0f0bca19e91dc77b9114042e12626b3bd087dc0b.1270680209.git.rth@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <0f0bca19e91dc77b9114042e12626b3bd087dc0b.1270680209.git.rth@twiddle.net> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org On Tue, Mar 16, 2010 at 01:04:34PM -0700, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > target-alpha/translate.c | 43 ++++++++++++++++++++++--------------------- > 1 files changed, 22 insertions(+), 21 deletions(-) Thanks, applied. > diff --git a/target-alpha/translate.c b/target-alpha/translate.c > index dff03ef..adeff0a 100644 > --- a/target-alpha/translate.c > +++ b/target-alpha/translate.c > @@ -1290,33 +1290,34 @@ MVIOP2(pkwb) > MVIOP2(unpkbl) > MVIOP2(unpkbw) > > -static inline void gen_cmp(TCGCond cond, int ra, int rb, int rc, int islit, > - uint8_t lit) > +static void gen_cmp(TCGCond cond, int ra, int rb, int rc, > + int islit, uint8_t lit) > { > - int l1, l2; > - TCGv tmp; > + TCGv va, vb; > > - if (unlikely(rc == 31)) > + if (unlikely(rc == 31)) { > return; > + } > > - l1 = gen_new_label(); > - l2 = gen_new_label(); > + if (ra == 31) { > + va = tcg_const_i64(0); > + } else { > + va = cpu_ir[ra]; > + } > + if (islit) { > + vb = tcg_const_i64(lit); > + } else { > + vb = cpu_ir[rb]; > + } > > - if (ra != 31) { > - tmp = tcg_temp_new(); > - tcg_gen_mov_i64(tmp, cpu_ir[ra]); > - } else > - tmp = tcg_const_i64(0); > - if (islit) > - tcg_gen_brcondi_i64(cond, tmp, lit, l1); > - else > - tcg_gen_brcond_i64(cond, tmp, cpu_ir[rb], l1); > + tcg_gen_setcond_i64(cond, cpu_ir[rc], va, vb); > > - tcg_gen_movi_i64(cpu_ir[rc], 0); > - tcg_gen_br(l2); > - gen_set_label(l1); > - tcg_gen_movi_i64(cpu_ir[rc], 1); > - gen_set_label(l2); > + if (ra == 31) { > + tcg_temp_free(va); > + } > + if (islit) { > + tcg_temp_free(vb); > + } > } > > static void gen_rx(int ra, int set) > -- > 1.6.6.1 > > > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net