qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [5504] TCG: add tcg_const_local_tl()
Date: Tue, 21 Oct 2008 11:30:45 +0000	[thread overview]
Message-ID: <E1KsFRl-0003y6-Su@cvs.savannah.gnu.org> (raw)

Revision: 5504
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5504
Author:   aurel32
Date:     2008-10-21 11:30:45 +0000 (Tue, 21 Oct 2008)

Log Message:
-----------
TCG: add tcg_const_local_tl()

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

Modified Paths:
--------------
    trunk/tcg/tcg-op.h
    trunk/tcg/tcg.c
    trunk/tcg/tcg.h

Modified: trunk/tcg/tcg-op.h
===================================================================
--- trunk/tcg/tcg-op.h	2008-10-21 11:29:55 UTC (rev 5503)
+++ trunk/tcg/tcg-op.h	2008-10-21 11:30:45 UTC (rev 5504)
@@ -1774,6 +1774,7 @@
 #define tcg_gen_nor_tl tcg_gen_nor_i64
 #define tcg_gen_orc_tl tcg_gen_orc_i64
 #define tcg_const_tl tcg_const_i64
+#define tcg_const_local_tl tcg_const_local_i64
 #else
 #define TCG_TYPE_TL TCG_TYPE_I32
 #define tcg_gen_movi_tl tcg_gen_movi_i32
@@ -1831,6 +1832,7 @@
 #define tcg_gen_nor_tl tcg_gen_nor_i32
 #define tcg_gen_orc_tl tcg_gen_orc_i32
 #define tcg_const_tl tcg_const_i32
+#define tcg_const_local_tl tcg_const_local_i32
 #endif
 
 #if TCG_TARGET_REG_BITS == 32

Modified: trunk/tcg/tcg.c
===================================================================
--- trunk/tcg/tcg.c	2008-10-21 11:29:55 UTC (rev 5503)
+++ trunk/tcg/tcg.c	2008-10-21 11:30:45 UTC (rev 5504)
@@ -475,6 +475,22 @@
     return t0;
 }
 
+TCGv tcg_const_local_i32(int32_t val)
+{
+    TCGv t0;
+    t0 = tcg_temp_local_new(TCG_TYPE_I32);
+    tcg_gen_movi_i32(t0, val);
+    return t0;
+}
+
+TCGv tcg_const_local_i64(int64_t val)
+{
+    TCGv t0;
+    t0 = tcg_temp_local_new(TCG_TYPE_I64);
+    tcg_gen_movi_i64(t0, val);
+    return t0;
+}
+
 void tcg_register_helper(void *func, const char *name)
 {
     TCGContext *s = &tcg_ctx;

Modified: trunk/tcg/tcg.h
===================================================================
--- trunk/tcg/tcg.h	2008-10-21 11:29:55 UTC (rev 5503)
+++ trunk/tcg/tcg.h	2008-10-21 11:30:45 UTC (rev 5504)
@@ -385,6 +385,8 @@
 void dump_ops(const uint16_t *opc_buf, const TCGArg *opparam_buf);
 TCGv tcg_const_i32(int32_t val);
 TCGv tcg_const_i64(int64_t val);
+TCGv tcg_const_local_i32(int32_t val);
+TCGv tcg_const_local_i64(int64_t val);
 
 #if TCG_TARGET_REG_BITS == 32
 #define tcg_const_ptr tcg_const_i32

                 reply	other threads:[~2008-10-21 11:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=E1KsFRl-0003y6-Su@cvs.savannah.gnu.org \
    --to=aurelien@aurel32.net \
    --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).