Patchwork [6/9] tcg: Use not_i32 to implement not_i64.

login
register
mail settings
Submitter Richard Henderson
Date March 19, 2010, 7:44 p.m.
Message ID <209fb741e276d4659c100d752082b3a08b91c268.1269029457.git.rth@twiddle.net>
Download mbox | patch
Permalink /patch/48183/
State New
Headers show

Comments

Richard Henderson - March 19, 2010, 7:44 p.m.
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 tcg/tcg-op.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Patch

diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h
index 085a328..dc81f3e 100644
--- a/tcg/tcg-op.h
+++ b/tcg/tcg-op.h
@@ -1653,6 +1653,9 @@  static inline void tcg_gen_not_i64(TCGv_i64 ret, TCGv_i64 arg)
 {
 #ifdef TCG_TARGET_HAS_not_i64
     tcg_gen_op2_i64(INDEX_op_not_i64, ret, arg);
+#elif defined(TCG_TARGET_HAS_not_i32) && TCG_TARGET_REG_BITS == 32
+    tcg_gen_not_i32(TCGV_LOW(ret), TCGV_LOW(arg));
+    tcg_gen_not_i32(TCGV_HIGH(ret), TCGV_HIGH(arg));
 #else
     tcg_gen_xori_i64(ret, arg, -1);
 #endif