From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Li3nH-0002ZA-RC for qemu-devel@nongnu.org; Fri, 13 Mar 2009 05:35:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Li3nG-0002YT-OU for qemu-devel@nongnu.org; Fri, 13 Mar 2009 05:35:07 -0400 Received: from [199.232.76.173] (port=34651 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Li3nG-0002YH-Eh for qemu-devel@nongnu.org; Fri, 13 Mar 2009 05:35:06 -0400 Received: from savannah.gnu.org ([199.232.41.3]:54157 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Li3nG-0006LJ-6H for qemu-devel@nongnu.org; Fri, 13 Mar 2009 05:35:06 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Li3nF-0006wD-9K for qemu-devel@nongnu.org; Fri, 13 Mar 2009 09:35:05 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1Li3nE-0006vl-Eo for qemu-devel@nongnu.org; Fri, 13 Mar 2009 09:35:05 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Fri, 13 Mar 2009 09:35:04 +0000 Subject: [Qemu-devel] [6831] tcg: optimize tcg_gen_bswap16_i32 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 Revision: 6831 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6831 Author: aurel32 Date: 2009-03-13 09:35:03 +0000 (Fri, 13 Mar 2009) Log Message: ----------- tcg: optimize tcg_gen_bswap16_i32 Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/tcg/tcg-op.h Modified: trunk/tcg/tcg-op.h =================================================================== --- trunk/tcg/tcg-op.h 2009-03-13 09:34:56 UTC (rev 6830) +++ trunk/tcg/tcg-op.h 2009-03-13 09:35:03 UTC (rev 6831) @@ -1207,16 +1207,13 @@ #ifdef TCG_TARGET_HAS_bswap16_i32 tcg_gen_op2_i32(INDEX_op_bswap16_i32, ret, arg); #else - TCGv_i32 t0, t1; - t0 = tcg_temp_new_i32(); - t1 = tcg_temp_new_i32(); + TCGv_i32 t0 = tcg_temp_new_i32(); - tcg_gen_shri_i32(t0, arg, 8); - tcg_gen_andi_i32(t1, arg, 0x000000ff); - tcg_gen_shli_i32(t1, t1, 8); - tcg_gen_or_i32(ret, t0, t1); + tcg_gen_ext8u_i32(t0, arg); + tcg_gen_shli_i32(t0, t0, 8); + tcg_gen_shri_i32(ret, arg, 8); + tcg_gen_or_i32(ret, ret, t0); tcg_temp_free_i32(t0); - tcg_temp_free_i32(t1); #endif }