TCG: fix breakage by previous patch
authorBlue Swirl <blauwirbel@gmail.com>
Sat, 30 Jul 2011 18:53:27 +0000 (18:53 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 30 Jul 2011 18:54:23 +0000 (18:54 +0000)
Fix incorrect logic and typos in previous commit
1bfd07bdfe56cea43dbe258dcb161e46b0ee29b7.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tcg/optimize.c

index 6a0a4ddb33103c8d7c7be35c3b4aa5777f3f3b96..a3bfa5e71de969b5d52f3541e7976d417d48cc50 100644 (file)
@@ -318,7 +318,8 @@ static TCGArg do_constant_folding_2(int op, TCGArg x, TCGArg y)
 #if defined(TCG_TARGET_HAS_not_i32) || defined(TCG_TARGET_HAS_not_i64)
 #ifdef TCG_TARGET_HAS_not_i32
     case INDEX_op_not_i32:
-#else
+#endif
+#ifdef TCG_TARGET_HAS_not_i64
     case INDEX_op_not_i64:
 #endif
         return ~x;
@@ -327,7 +328,8 @@ static TCGArg do_constant_folding_2(int op, TCGArg x, TCGArg y)
 #if defined(TCG_TARGET_HAS_ext8s_i32) || defined(TCG_TARGET_HAS_ext8s_i64)
 #ifdef TCG_TARGET_HAS_ext8s_i32
     case INDEX_op_ext8s_i32:
-#else
+#endif
+#ifdef TCG_TARGET_HAS_ext8s_i64
     case INDEX_op_ext8s_i64:
 #endif
         return (int8_t)x;
@@ -336,7 +338,8 @@ static TCGArg do_constant_folding_2(int op, TCGArg x, TCGArg y)
 #if defined(TCG_TARGET_HAS_ext16s_i32) || defined(TCG_TARGET_HAS_ext16s_i64)
 #ifdef TCG_TARGET_HAS_ext16s_i32
     case INDEX_op_ext16s_i32:
-#else
+#endif
+#ifdef TCG_TARGET_HAS_ext16s_i64
     case INDEX_op_ext16s_i64:
 #endif
         return (int16_t)x;
@@ -345,7 +348,8 @@ static TCGArg do_constant_folding_2(int op, TCGArg x, TCGArg y)
 #if defined(TCG_TARGET_HAS_ext8u_i32) || defined(TCG_TARGET_HAS_ext8u_i64)
 #ifdef TCG_TARGET_HAS_ext8u_i32
     case INDEX_op_ext8u_i32:
-#else
+#endif
+#ifdef TCG_TARGET_HAS_ext8u_i64
     case INDEX_op_ext8u_i64:
 #endif
         return (uint8_t)x;
@@ -354,19 +358,20 @@ static TCGArg do_constant_folding_2(int op, TCGArg x, TCGArg y)
 #if defined(TCG_TARGET_HAS_ext16u_i32) || defined(TCG_TARGET_HAS_ext16u_i64)
 #ifdef TCG_TARGET_HAS_ext16u_i32
     case INDEX_op_ext16u_i32:
-#else
+#endif
+#ifdef TCG_TARGET_HAS_ext16u_i64
     case INDEX_op_ext16u_i64:
 #endif
         return (uint16_t)x;
 #endif
 
 #if TCG_TARGET_REG_BITS == 64
-#ifdef TCG_TARGET_HAS_ext32s_i32
+#ifdef TCG_TARGET_HAS_ext32s_i64
     case INDEX_op_ext32s_i64:
         return (int32_t)x;
 #endif
 
-#ifdef TCG_TARGET_HAS_ext32u_i32
+#ifdef TCG_TARGET_HAS_ext32u_i64
     case INDEX_op_ext32u_i64:
         return (uint32_t)x;
 #endif