Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kzwao-0003vG-4m for qemu-devel@nongnu.org; Tue, 11 Nov 2008 11:59:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kzwam-0003t8-Mq for qemu-devel@nongnu.org; Tue, 11 Nov 2008 11:59:53 -0500 Received: from [199.232.76.173] (port=43710 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kzwam-0003sy-0V for qemu-devel@nongnu.org; Tue, 11 Nov 2008 11:59:52 -0500 Received: from fmmailgate03.web.de ([217.72.192.234]:59733) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kzwak-0000SB-Nw for qemu-devel@nongnu.org; Tue, 11 Nov 2008 11:59:51 -0500 Message-Id: <052CCCAD-129F-4D0F-975A-DC70FA6FE57D@web.de> From: =?ISO-8859-1?Q?Andreas_F=E4rber?= In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Subject: Re: [Qemu-devel] [5675] target-mips: optimize gen_save_pc() Date: Tue, 11 Nov 2008 17:59:41 +0100 References: Sender: andreas.faerber@web.de 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 Cc: =?ISO-8859-1?Q?Aur=E9lien_Jarno?= Am 11.11.2008 um 12:36 schrieb Aurelien Jarno: > Revision: 5675 > http://svn.sv.gnu.org/viewvc/? > view=rev&root=qemu&revision=5675 > Author: aurel32 > Date: 2008-11-11 11:36:04 +0000 (Tue, 11 Nov 2008) > > Log Message: > ----------- > target-mips: optimize gen_save_pc() > > We obviously don't need to use a temporary variable to write PC. We probably don't need an inline helper for that either, while we're at it? Andreas > Modified: trunk/target-mips/translate.c > =================================================================== > --- trunk/target-mips/translate.c 2008-11-11 11:34:39 UTC (rev 5674) > +++ trunk/target-mips/translate.c 2008-11-11 11:36:04 UTC (rev 5675) > @@ -827,11 +827,7 @@ > > static inline void gen_save_pc(target_ulong pc) > { > - TCGv r_tmp = tcg_temp_new(TCG_TYPE_TL); > - > - tcg_gen_movi_tl(r_tmp, pc); > - tcg_gen_mov_tl(cpu_PC, r_tmp); > - tcg_temp_free(r_tmp); > + tcg_gen_movi_tl(cpu_PC, pc); > } > > static inline void save_cpu_state (DisasContext *ctx, int do_save_pc) >