Skip to contentSkip to conversation

Fix tcg after commit 6800

PATCH Applied Laurent Desnogues 2 participants 2 messages Mar 10, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix tcg after commit 6800

Hello,

the introduction of TCGV_EQUAL and not op is slightly broken. The definition of DEBUG_TCGV shows that.

Laurent

tcg-op.h +1 -1
Index: tcg/tcg-op.h
===================================================================
@@ -1435,7 +1435,7 @@
 static inline void tcg_gen_not_i64(TCGv_i64 ret, TCGv_i64 arg)
 {
 #ifdef TCG_TARGET_HAS_not_i64
-    tcg_gen_op2_i32(INDEX_op_not_i64, ret, arg);
+    tcg_gen_op2_i64(INDEX_op_not_i64, ret, arg);
 #else
     tcg_gen_xori_i64(ret, arg, -1);
 #endif
tcg.h +3 -2
Index: tcg/tcg.h
===================================================================
@@ -153,8 +153,6 @@
 #define MAKE_TCGV_I64(x) (x)
 #define GET_TCGV_I32(t) (t)
 #define GET_TCGV_I64(t) (t)
-#define TCGV_EQUAL_I32(a, b) (GET_TCGV_I32(a) == GET_TCGV_I32(b))
-#define TCGV_EQUAL_I64(a, b) (GET_TCGV_I64(a) == GET_TCGV_I64(b))
 
 #if TCG_TARGET_REG_BITS == 32
 #define TCGV_LOW(t) (t)
@@ -163,6 +161,9 @@
 
 #endif /* DEBUG_TCGV */
 
+#define TCGV_EQUAL_I32(a, b) (GET_TCGV_I32(a) == GET_TCGV_I32(b))
+#define TCGV_EQUAL_I64(a, b) (GET_TCGV_I64(a) == GET_TCGV_I64(b))
+
 /* Dummy definition to avoid compiler warnings.  */
 #define TCGV_UNUSED_I32(x) x = MAKE_TCGV_I32(-1)
 #define TCGV_UNUSED_I64(x) x = MAKE_TCGV_I64(-1)