From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KaBHc-0003I3-Ie for qemu-devel@nongnu.org; Mon, 01 Sep 2008 11:25:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KaBHb-0003Hr-5b for qemu-devel@nongnu.org; Mon, 01 Sep 2008 11:25:36 -0400 Received: from [199.232.76.173] (port=60664 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KaBHb-0003Ho-13 for qemu-devel@nongnu.org; Mon, 01 Sep 2008 11:25:35 -0400 Received: from hall.aurel32.net ([91.121.138.14]:41223) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KaBHb-0000aq-4N for qemu-devel@nongnu.org; Mon, 01 Sep 2008 11:25:35 -0400 Received: from anguille.univ-lyon1.fr ([134.214.4.207]) by hall.aurel32.net with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1KaBHU-0005dI-Ge for qemu-devel@nongnu.org; Mon, 01 Sep 2008 17:25:28 +0200 Message-ID: <48BC0963.2010802@aurel32.net> Date: Mon, 01 Sep 2008 17:25:23 +0200 From: Aurelien Jarno MIME-Version: 1.0 Subject: Re: [Qemu-devel] [5120] SH4: Convert remaining non-fp ops to TCG References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Blue Swirl a écrit : > On 9/1/08, Aurelien Jarno wrote: >> -void OPPROTO op_cmp_str_T0_T1(void) >> -{ >> - cond_t((T0 & 0x000000ff) == (T1 & 0x000000ff) || >> - (T0 & 0x0000ff00) == (T1 & 0x0000ff00) || >> - (T0 & 0x00ff0000) == (T1 & 0x00ff0000) || >> - (T0 & 0xff000000) == (T1 & 0xff000000)); >> - RETURN(); >> -} > > The above version uses both T0 and T1, but the version below only cpu_T[0]. Yes, I have found my mistake when doing the cpu_T[] removal pass (r5122) and noted that I have to fix that in this patch, but then I forget and committed the patch as is. Anyway the implementation in r5122 is correct. >> + int label1 = gen_new_label(); >> + int label2 = gen_new_label(); >> + tcg_gen_xor_i32(cpu_T[0], cpu_gregs[REG(B7_4)], cpu_gregs[REG(B11_8)]); >> + tcg_gen_andi_i32(cpu_T[0], cpu_T[0], 0xff000000); >> + tcg_gen_brcondi_i32(TCG_COND_EQ, cpu_T[0], 0, label1); >> + tcg_gen_andi_i32(cpu_T[0], cpu_T[0], 0x00ff0000); >> + tcg_gen_brcondi_i32(TCG_COND_EQ, cpu_T[0], 0, label1); >> + tcg_gen_andi_i32(cpu_T[0], cpu_T[0], 0x0000ff00); >> + tcg_gen_brcondi_i32(TCG_COND_EQ, cpu_T[0], 0, label1); >> + tcg_gen_andi_i32(cpu_T[0], cpu_T[0], 0x000000ff); >> + tcg_gen_brcondi_i32(TCG_COND_EQ, cpu_T[0], 0, label1); >> + tcg_gen_andi_i32(cpu_sr, cpu_sr, ~SR_T); >> + tcg_gen_br(label2); >> + gen_set_label(label1); >> + tcg_gen_ori_i32(cpu_sr, cpu_sr, SR_T); >> + gen_set_label(label2); > -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net