Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JsOib-0007PO-0r for qemu-devel@nongnu.org; Sat, 03 May 2008 16:52:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JsOia-0007P3-Fm for qemu-devel@nongnu.org; Sat, 03 May 2008 16:52:28 -0400 Received: from [199.232.76.173] (port=60922 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JsOia-0007Oy-B5 for qemu-devel@nongnu.org; Sat, 03 May 2008 16:52:28 -0400 Received: from savannah.gnu.org ([199.232.41.3] 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 1JsOia-00026s-6s for qemu-devel@nongnu.org; Sat, 03 May 2008 16:52:28 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1JsOiY-0001k6-U5 for qemu-devel@nongnu.org; Sat, 03 May 2008 20:52:27 +0000 Received: from blueswir1 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1JsOiY-0001jv-Lb for qemu-devel@nongnu.org; Sat, 03 May 2008 20:52:26 +0000 MIME-Version: 1.0 Errors-To: blueswir1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Blue Swirl Message-Id: Date: Sat, 03 May 2008 20:52:26 +0000 Subject: [Qemu-devel] [4312] Skip register moves when the target and the source are the same 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: 4312 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4312 Author: blueswir1 Date: 2008-05-03 20:52:26 +0000 (Sat, 03 May 2008) Log Message: ----------- Skip register moves when the target and the source are the same Modified Paths: -------------- trunk/tcg/tcg-op.h Modified: trunk/tcg/tcg-op.h =================================================================== --- trunk/tcg/tcg-op.h 2008-05-03 20:51:00 UTC (rev 4311) +++ trunk/tcg/tcg-op.h 2008-05-03 20:52:26 UTC (rev 4312) @@ -164,7 +164,8 @@ static inline void tcg_gen_mov_i32(TCGv ret, TCGv arg) { - tcg_gen_op2(INDEX_op_mov_i32, ret, arg); + if (ret != arg) + tcg_gen_op2(INDEX_op_mov_i32, ret, arg); } static inline void tcg_gen_movi_i32(TCGv ret, int32_t arg) @@ -495,8 +496,10 @@ static inline void tcg_gen_mov_i64(TCGv ret, TCGv arg) { - tcg_gen_mov_i32(ret, arg); - tcg_gen_mov_i32(TCGV_HIGH(ret), TCGV_HIGH(arg)); + if (ret != arg) { + tcg_gen_mov_i32(ret, arg); + tcg_gen_mov_i32(TCGV_HIGH(ret), TCGV_HIGH(arg)); + } } static inline void tcg_gen_movi_i64(TCGv ret, int64_t arg) @@ -719,7 +722,8 @@ static inline void tcg_gen_mov_i64(TCGv ret, TCGv arg) { - tcg_gen_op2(INDEX_op_mov_i64, ret, arg); + if (ret != arg) + tcg_gen_op2(INDEX_op_mov_i64, ret, arg); } static inline void tcg_gen_movi_i64(TCGv ret, int64_t arg)