From: Andreas Schwab <schwab@linux-m68k.org>
To: Vince Weaver <vince@csl.cornell.edu>
Cc: qemu-devel@nongnu.org, Aurelien Jarno <aurelien@aurel32.net>
Subject: [Qemu-devel] Re: [PATCH] Fix extlh instruction on Alpha
Date: Thu, 17 Sep 2009 18:35:32 +0200 [thread overview]
Message-ID: <m23a6lcywb.fsf@igel.home> (raw)
In-Reply-To: <20090917120406.J54069@stanley.csl.cornell.edu> (Vince Weaver's message of "Thu, 17 Sep 2009 12:07:23 -0400 (EDT)")
Vince Weaver <vince@csl.cornell.edu> writes:
> tcg_gen_andi_i64(tmp1, cpu_ir[rb], 7);
> tcg_gen_shli_i64(tmp1, tmp1, 3);
> - tmp2 = tcg_const_i64(64);
> - tcg_gen_sub_i64(tmp1, tmp2, tmp1);
> - tcg_temp_free(tmp2);
> + tcg_gen_andi_i64(tmp1, tmp1, 0x3f);
> + tcg_gen_neg_i64(tmp1, tmp1);
> + tcg_gen_addi_i64(tmp1, tmp1, 64);
This wastes an operation. If you switch andi and neg you don't need to
add 64.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2009-09-17 16:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-09 16:08 [Qemu-devel] [PATCH] Fix extlh instruction on Alpha Vince Weaver
2009-09-16 19:52 ` Aurelien Jarno
2009-09-16 20:45 ` Vince Weaver
2009-09-16 20:56 ` Aurelien Jarno
2009-09-17 16:07 ` Vince Weaver
2009-09-17 16:25 ` Laurent Desnogues
2009-09-17 16:35 ` Andreas Schwab [this message]
2009-09-17 17:19 ` Aurelien Jarno
2009-09-16 21:14 ` [Qemu-devel] " Andreas Schwab
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=m23a6lcywb.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
--cc=vince@csl.cornell.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.