qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [5504] TCG: add tcg_const_local_tl()
@ 2008-10-21 11:30 Aurelien Jarno
  0 siblings, 0 replies; only message in thread
From: Aurelien Jarno @ 2008-10-21 11:30 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-21 11:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-21 11:30 [Qemu-devel] [5504] TCG: add tcg_const_local_tl() Aurelien Jarno

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).