From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [6307] target-mips: optimize some gpr accesses
Date: Wed, 14 Jan 2009 19:40:46 +0000 [thread overview]
Message-ID: <E1LNBba-0000xr-IO@cvs.savannah.gnu.org> (raw)
Revision: 6307
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6307
Author: aurel32
Date: 2009-01-14 19:40:46 +0000 (Wed, 14 Jan 2009)
Log Message:
-----------
target-mips: optimize some gpr accesses
Optimize gpr accesses when it is known at translation time that gpr != 0.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Modified Paths:
--------------
trunk/target-mips/translate.c
Modified: trunk/target-mips/translate.c
===================================================================
--- trunk/target-mips/translate.c 2009-01-14 19:40:36 UTC (rev 6306)
+++ trunk/target-mips/translate.c 2009-01-14 19:40:46 UTC (rev 6307)
@@ -988,9 +988,8 @@
} else if (offset == 0) {
gen_load_gpr(t0, base);
} else {
- gen_load_gpr(t0, base);
- tcg_gen_movi_tl(t1, offset);
- gen_op_addr_add(ctx, t0, t1);
+ tcg_gen_movi_tl(t0, offset);
+ gen_op_addr_add(ctx, t0, cpu_gpr[base]);
}
/* Don't do NOP if destination is zero: we must perform the actual
memory access. */
@@ -1151,12 +1150,8 @@
} else if (offset == 0) {
gen_load_gpr(t0, base);
} else {
- TCGv t1 = tcg_temp_local_new();
-
- gen_load_gpr(t0, base);
- tcg_gen_movi_tl(t1, offset);
- gen_op_addr_add(ctx, t0, t1);
- tcg_temp_free(t1);
+ tcg_gen_movi_tl(t0, offset);
+ gen_op_addr_add(ctx, t0, cpu_gpr[base]);
}
/* Don't do NOP if destination is zero: we must perform the actual
memory access. */
@@ -7259,9 +7254,8 @@
} else if (index == 0) {
gen_load_gpr(t0, base);
} else {
- gen_load_gpr(t0, base);
- gen_load_gpr(t1, index);
- gen_op_addr_add(ctx, t0, t1);
+ gen_load_gpr(t0, index);
+ gen_op_addr_add(ctx, t0, cpu_gpr[base]);
}
/* Don't do NOP if destination is zero: we must perform the actual
memory access. */
reply other threads:[~2009-01-14 19:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1LNBba-0000xr-IO@cvs.savannah.gnu.org \
--to=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).