qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <andreas.faerber@web.de>
To: qemu-devel@nongnu.org
Cc: "Andreas Färber" <andreas.faerber@web.de>
Subject: [Qemu-devel] [RFC 3/6] tcg: Add tcg_gen_qemu_{ld,st}64_tl()
Date: Sat, 10 Dec 2011 13:58:12 +0100	[thread overview]
Message-ID: <1323521895-26693-4-git-send-email-andreas.faerber@web.de> (raw)
In-Reply-To: <1323521895-26693-1-git-send-email-andreas.faerber@web.de>

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.faerber@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

  parent reply	other threads:[~2011-12-10 12:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-10 12:58 [Qemu-devel] [RFC 0/6] target-i386: TCGv cleanups Andreas Färber
2011-12-10 12:58 ` [Qemu-devel] [PATCH 1/6] target-i386: Fix sloppy uses of i32/i64 functions Andreas Färber
2011-12-10 12:58 ` [Qemu-devel] [PATCH 2/6] target-i386: Cleanup movd xmm, ea Andreas Färber
2011-12-10 12:58 ` Andreas Färber [this message]
2011-12-10 12:58 ` [Qemu-devel] [RFC 4/6] target-i386: Use tcg_gen_{ld,st}64_tl() Andreas Färber
2011-12-10 12:58 ` [Qemu-devel] [RFC 5/6] target-i386: Cleanup pinsrq Andreas Färber
2011-12-10 12:58 ` [Qemu-devel] [RFC 6/6] target-i386: Cleanup pextrq Andreas Färber
2011-12-11 23:42 ` [Qemu-devel] [RFC 0/6] target-i386: TCGv cleanups Paul Brook
2011-12-12  9:50   ` Andreas Färber
2011-12-12 14:56     ` Paul Brook
2011-12-12 15:34       ` Andreas Färber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1323521895-26693-4-git-send-email-andreas.faerber@web.de \
    --to=andreas.faerber@web.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).