From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K4Azi-00084B-Mb for qemu-devel@nongnu.org; Thu, 05 Jun 2008 04:38:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K4Azh-00083z-2w for qemu-devel@nongnu.org; Thu, 05 Jun 2008 04:38:50 -0400 Received: from [199.232.76.173] (port=51979 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K4Azg-00083w-UT for qemu-devel@nongnu.org; Thu, 05 Jun 2008 04:38:48 -0400 Received: from savannah.gnu.org ([199.232.41.3]:39805 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 1K4Azg-0005oj-J6 for qemu-devel@nongnu.org; Thu, 05 Jun 2008 04:38:48 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1K4Azd-0000M2-PQ for qemu-devel@nongnu.org; Thu, 05 Jun 2008 08:38:45 +0000 Received: from ths by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1K4Azd-0000Ly-FB for qemu-devel@nongnu.org; Thu, 05 Jun 2008 08:38:45 +0000 MIME-Version: 1.0 Errors-To: ths Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Thiemo Seufer Message-Id: Date: Thu, 05 Jun 2008 08:38:45 +0000 Subject: [Qemu-devel] [4670] Free constant temporaries. 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: 4670 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4670 Author: ths Date: 2008-06-05 08:38:44 +0000 (Thu, 05 Jun 2008) Log Message: ----------- Free constant temporaries. Modified Paths: -------------- trunk/target-mips/translate.c Modified: trunk/target-mips/translate.c =================================================================== --- trunk/target-mips/translate.c 2008-06-04 18:29:25 UTC (rev 4669) +++ trunk/target-mips/translate.c 2008-06-05 08:38:44 UTC (rev 4670) @@ -425,6 +425,24 @@ /* global register indices */ static TCGv cpu_env, current_tc_gprs, current_tc_hi, cpu_T[2]; +static inline void tcg_gen_helper_0_1i(void *func, TCGv arg) +{ + TCGv t = tcg_const_i32(arg); + + tcg_gen_helper_0_1(func, t); + tcg_temp_free(t); +} + +static inline void tcg_gen_helper_0_2ii(void *func, TCGv arg1, TCGv arg2) +{ + TCGv t1 = tcg_const_i32(arg1); + TCGv t2 = tcg_const_i32(arg2); + + tcg_gen_helper_0_2(func, t1, t2); + tcg_temp_free(t1); + tcg_temp_free(t2); +} + typedef struct DisasContext { struct TranslationBlock *tb; target_ulong pc, saved_pc; @@ -797,7 +815,7 @@ generate_exception_err (DisasContext *ctx, int excp, int err) { save_cpu_state(ctx, 1); - tcg_gen_helper_0_2(do_raise_exception_err, tcg_const_i32(excp), tcg_const_i32(err)); + tcg_gen_helper_0_2ii(do_raise_exception_err, excp, err); tcg_gen_helper_0_0(do_interrupt_restart); tcg_gen_exit_tb(0); } @@ -806,7 +824,7 @@ generate_exception (DisasContext *ctx, int excp) { save_cpu_state(ctx, 1); - tcg_gen_helper_0_1(do_raise_exception, tcg_const_i32(excp)); + tcg_gen_helper_0_1i(do_raise_exception, excp); tcg_gen_helper_0_0(do_interrupt_restart); tcg_gen_exit_tb(0); }