Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KytIm-0008VX-EN for qemu-devel@nongnu.org; Sat, 08 Nov 2008 14:16:56 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KytIl-0008VJ-R7 for qemu-devel@nongnu.org; Sat, 08 Nov 2008 14:16:56 -0500 Received: from [199.232.76.173] (port=41204 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KytIl-0008VG-Nv for qemu-devel@nongnu.org; Sat, 08 Nov 2008 14:16:55 -0500 Received: from hall.aurel32.net ([88.191.82.174]:49179) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KytIl-0004VG-7H for qemu-devel@nongnu.org; Sat, 08 Nov 2008 14:16:55 -0500 Date: Sat, 8 Nov 2008 20:16:52 +0100 From: Aurelien Jarno Message-ID: <20081108191652.GB15084@volta.aurel32.net> References: <20081108191604.GA20748@volta.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20081108191604.GA20748@volta.aurel32.net> Subject: [Qemu-devel] [PATCH v2 01/11] target-mips: optimize gen_save_pc() 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 We obviously don't need to use a temporary variable to write PC. Signed-off-by: Aurelien Jarno --- target-mips/translate.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index 9a197ee..dcd8094 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -827,11 +827,7 @@ OP_CONDZ(ltz, TCG_COND_LT); 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) -- 1.5.6.5 -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net