From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JvYP2-0003nJ-80 for qemu-devel@nongnu.org; Mon, 12 May 2008 09:49:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JvYP0-0003n7-Jv for qemu-devel@nongnu.org; Mon, 12 May 2008 09:49:19 -0400 Received: from [199.232.76.173] (port=56632 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JvYP0-0003n4-Gu for qemu-devel@nongnu.org; Mon, 12 May 2008 09:49:18 -0400 Received: from savannah.gnu.org ([199.232.41.3]:41580 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 1JvYOz-0001HX-To for qemu-devel@nongnu.org; Mon, 12 May 2008 09:49:18 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1JvYOy-0001qF-MQ for qemu-devel@nongnu.org; Mon, 12 May 2008 13:49:16 +0000 Received: from bellard by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1JvYOy-0001q9-0n for qemu-devel@nongnu.org; Mon, 12 May 2008 13:49:16 +0000 MIME-Version: 1.0 Errors-To: bellard Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Fabrice Bellard Message-Id: Date: Mon, 12 May 2008 13:49:16 +0000 Subject: [Qemu-devel] [4438] temporary hack to handle register shortage with dyngen for qemu_st64 () 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: 4438 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4438 Author: bellard Date: 2008-05-12 13:49:14 +0000 (Mon, 12 May 2008) Log Message: ----------- temporary hack to handle register shortage with dyngen for qemu_st64() Modified Paths: -------------- trunk/tcg/tcg.c trunk/tcg/tcg.h Modified: trunk/tcg/tcg.c =================================================================== --- trunk/tcg/tcg.c 2008-05-12 12:23:31 UTC (rev 4437) +++ trunk/tcg/tcg.c 2008-05-12 13:49:14 UTC (rev 4438) @@ -308,6 +308,45 @@ return MAKE_TCGV(idx); } +#if TCG_TARGET_REG_BITS == 32 +/* temporary hack to avoid register shortage for tcg_qemu_st64() */ +TCGv tcg_global_reg2_new_hack(TCGType type, int reg1, int reg2, + const char *name) +{ + TCGContext *s = &tcg_ctx; + TCGTemp *ts; + int idx; + char buf[64]; + + if (type != TCG_TYPE_I64) + tcg_abort(); + idx = s->nb_globals; + tcg_temp_alloc(s, s->nb_globals + 2); + ts = &s->temps[s->nb_globals]; + ts->base_type = type; + ts->type = TCG_TYPE_I32; + ts->fixed_reg = 1; + ts->reg = reg1; + ts->val_type = TEMP_VAL_REG; + pstrcpy(buf, sizeof(buf), name); + pstrcat(buf, sizeof(buf), "_0"); + ts->name = strdup(buf); + + ts++; + ts->base_type = type; + ts->type = TCG_TYPE_I32; + ts->fixed_reg = 1; + ts->reg = reg2; + ts->val_type = TEMP_VAL_REG; + pstrcpy(buf, sizeof(buf), name); + pstrcat(buf, sizeof(buf), "_1"); + ts->name = strdup(buf); + + s->nb_globals += 2; + return MAKE_TCGV(idx); +} +#endif + TCGv tcg_global_mem_new(TCGType type, int reg, tcg_target_long offset, const char *name) { Modified: trunk/tcg/tcg.h =================================================================== --- trunk/tcg/tcg.h 2008-05-12 12:23:31 UTC (rev 4437) +++ trunk/tcg/tcg.h 2008-05-12 13:49:14 UTC (rev 4438) @@ -267,6 +267,8 @@ tcg_target_long start, tcg_target_long size); void tcg_set_macro_func(TCGContext *s, TCGMacroFunc *func); TCGv tcg_global_reg_new(TCGType type, int reg, const char *name); +TCGv tcg_global_reg2_new_hack(TCGType type, int reg1, int reg2, + const char *name); TCGv tcg_global_mem_new(TCGType type, int reg, tcg_target_long offset, const char *name); TCGv tcg_temp_new(TCGType type);