From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KsFRs-0001in-5I for qemu-devel@nongnu.org; Tue, 21 Oct 2008 07:30:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KsFRr-0001iX-Rl for qemu-devel@nongnu.org; Tue, 21 Oct 2008 07:30:51 -0400 Received: from [199.232.76.173] (port=59392 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KsFRr-0001iR-3o for qemu-devel@nongnu.org; Tue, 21 Oct 2008 07:30:51 -0400 Received: from savannah.gnu.org ([199.232.41.3]:52709 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KsFRp-0000Y4-Rh for qemu-devel@nongnu.org; Tue, 21 Oct 2008 07:30:50 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KsFRm-0003yA-7P for qemu-devel@nongnu.org; Tue, 21 Oct 2008 11:30:46 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KsFRl-0003y6-Su for qemu-devel@nongnu.org; Tue, 21 Oct 2008 11:30:46 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Tue, 21 Oct 2008 11:30:45 +0000 Subject: [Qemu-devel] [5504] TCG: add tcg_const_local_tl() Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 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