qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [RFC 3/6] tcg: Add tcg_gen_qemu_{ld,st}64_tl()


From: Andreas Färber
Subject: [Qemu-devel] [RFC 3/6] tcg: Add tcg_gen_qemu_{ld,st}64_tl()
Date: Sat, 10 Dec 2011 13:58:12 +0100

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 <address@hidden>
---
 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

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