qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [4312] Skip register moves when the target and the source a


From: Blue Swirl
Subject: [Qemu-devel] [4312] Skip register moves when the target and the source are the same
Date: Sat, 03 May 2008 20:52:26 +0000

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)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]