summaryrefslogtreecommitdiff
path: root/target-mips
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-11 11:36:04 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-11 11:36:04 +0000
commit1eb75d4a3692aa7d794db07259095688c0bed2db (patch)
tree01e01d018cff3614567b1a1c1f63190b3b26bc80 /target-mips
parentadd69063e86c1dec66f285687c8bd923269c0c75 (diff)
downloadqemu-1eb75d4a3692aa7d794db07259095688c0bed2db.tar.gz
target-mips: optimize gen_save_pc()
We obviously don't need to use a temporary variable to write PC. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5675 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips')
-rw-r--r--target-mips/translate.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/target-mips/translate.c b/target-mips/translate.c
index 6ffc635b40..660b74a838 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)