From: edgar.iglesias@gmail.com
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 04/10] microblaze: Improve srl
Date: Thu, 24 Oct 2013 23:08:51 +0200 [thread overview]
Message-ID: <1382648937-14769-5-git-send-email-edgar.iglesias@gmail.com> (raw)
In-Reply-To: <1382648937-14769-1-git-send-email-edgar.iglesias@gmail.com>
From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
write_carry only looks at bit zero, no need to mask out the others.
Meassured a 12% speed improvement in linux-user srl loops.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
---
target-microblaze/translate.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/target-microblaze/translate.c b/target-microblaze/translate.c
index 916db15..93aafac 100644
--- a/target-microblaze/translate.c
+++ b/target-microblaze/translate.c
@@ -780,13 +780,10 @@ static void dec_bit(DisasContext *dc)
case 0x1:
case 0x41:
/* srl. */
- t0 = tcg_temp_new();
LOG_DIS("srl r%d r%d\n", dc->rd, dc->ra);
- /* Update carry. */
- tcg_gen_andi_tl(t0, cpu_R[dc->ra], 1);
- write_carry(dc, t0);
- tcg_temp_free(t0);
+ /* Update carry. Note that write carry only looks at the LSB. */
+ write_carry(dc, cpu_R[dc->ra]);
if (dc->rd) {
if (op == 0x41)
tcg_gen_shri_tl(cpu_R[dc->rd], cpu_R[dc->ra], 1);
--
1.7.10.4
next prev parent reply other threads:[~2013-10-24 21:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-24 21:08 [Qemu-devel] [PATCH 00/10] MicroBlaze queue edgar.iglesias
2013-10-24 21:08 ` [Qemu-devel] [PATCH 01/10] microblaze: Clarify expected input of write_carry edgar.iglesias
2013-10-24 21:08 ` [Qemu-devel] [PATCH 02/10] microblaze: Make write_carryi input a boolean edgar.iglesias
2013-10-24 21:08 ` [Qemu-devel] [PATCH 03/10] microblaze: Simplify andn by using tcg_gen_andc edgar.iglesias
2013-10-24 21:08 ` edgar.iglesias [this message]
2013-10-24 21:08 ` [Qemu-devel] [PATCH 05/10] microblaze: Improve src edgar.iglesias
2013-10-24 21:08 ` [Qemu-devel] [PATCH 06/10] microblaze: Move the saving of the reservation addr into gen_load edgar.iglesias
2013-10-24 21:08 ` [Qemu-devel] [PATCH 07/10] microblaze: Turn res_addr into a tcg global edgar.iglesias
2013-10-24 21:08 ` [Qemu-devel] [PATCH 08/10] microblaze: At swx, check that the reserved word is unmodified edgar.iglesias
2013-10-24 21:08 ` [Qemu-devel] [PATCH 09/10] hw/microblaze: Indentation cleanups edgar.iglesias
2013-10-24 21:08 ` [Qemu-devel] [PATCH 10/10] hw/microblaze: Add support for loading initrd images edgar.iglesias
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=1382648937-14769-5-git-send-email-edgar.iglesias@gmail.com \
--to=edgar.iglesias@gmail.com \
--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).