Encapsule the conversion from/to i64.
This avoids a temporary and a tcg_gen_trunc_i64_tl()/ext_tl_i64().

Signed-off-by: Andreas Färber <andreas.faer...@web.de>
---
 tcg/tcg-op.h |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h
index d065e74..07c6d3e 100644
--- a/tcg/tcg-op.h
+++ b/tcg/tcg-op.h
@@ -3217,6 +3217,18 @@ static inline void tcg_gen_deposit_tl(TCGv ret, TCGv 
arg1, TCGv arg2,
 #endif
 }
 
+#if TARGET_LONG_BITS == 64
+static inline void tcg_gen_qemu_ld64_tl(TCGv ret, TCGv addr, int mem_index)
+{
+    tcg_gen_qemu_ld64(MAKE_TCGV_I64(GET_TCGV_TL(ret)), addr, mem_index);
+}
+
+static inline void tcg_gen_qemu_st64_tl(TCGv arg, TCGv addr, int mem_index)
+{
+    tcg_gen_qemu_st64(MAKE_TCGV_I64(GET_TCGV_TL(arg)), addr, mem_index);
+}
+#endif
+
 static inline TCGv tcg_const_tl(tcg_target_long val)
 {
 #if TARGET_LONG_BITS == 64
-- 
1.7.7


Reply via email to