qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [4312] Skip register moves when the target and the source are the same
@ 2008-05-03 20:52 Blue Swirl
  0 siblings, 0 replies; only message in thread
From: Blue Swirl @ 2008-05-03 20:52 UTC (permalink / raw)
  To: qemu-devel

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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-03 20:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-03 20:52 [Qemu-devel] [4312] Skip register moves when the target and the source are the same Blue Swirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).