From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, aliguori@amazon.com, aurelien@aurel32.net
Subject: [Qemu-devel] [PULL 1/8] tcg-ia64: Optimize small arguments to exit_tb
Date: Tue, 4 Mar 2014 11:01:00 -0800 [thread overview]
Message-ID: <1393959667-19125-2-git-send-email-rth@twiddle.net> (raw)
In-Reply-To: <1393959667-19125-1-git-send-email-rth@twiddle.net>
Saves one bundle for the common case of exit_tb 0.
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
tcg/ia64/tcg-target.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/tcg/ia64/tcg-target.c b/tcg/ia64/tcg-target.c
index 2d8e00c..7407011 100644
--- a/tcg/ia64/tcg-target.c
+++ b/tcg/ia64/tcg-target.c
@@ -950,15 +950,21 @@ static inline void tcg_out_callr(TCGContext *s, TCGReg addr)
static void tcg_out_exit_tb(TCGContext *s, tcg_target_long arg)
{
int64_t disp;
- uint64_t imm;
+ uint64_t imm, opc1;
- tcg_out_movi(s, TCG_TYPE_PTR, TCG_REG_R8, arg);
+ /* At least arg == 0 is a common operation. */
+ if (arg == sextract64(arg, 0, 22)) {
+ opc1 = tcg_opc_movi_a(TCG_REG_P0, TCG_REG_R8, arg);
+ } else {
+ tcg_out_movi(s, TCG_TYPE_PTR, TCG_REG_R8, arg);
+ opc1 = INSN_NOP_M;
+ }
disp = tb_ret_addr - s->code_ptr;
imm = (uint64_t)disp >> 4;
tcg_out_bundle(s, mLX,
- INSN_NOP_M,
+ opc1,
tcg_opc_l3 (imm),
tcg_opc_x3 (TCG_REG_P0, OPC_BRL_SPTK_MANY_X3, imm));
}
--
1.8.5.3
next prev parent reply other threads:[~2014-03-04 19:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-04 19:00 [Qemu-devel] [PULL 0/8] tcg-ia64 ldst updates Richard Henderson
2014-03-04 19:01 ` Richard Henderson [this message]
2014-03-04 19:01 ` [Qemu-devel] [PULL 2/8] tcg-ia64: Re-bundle the tlb load Richard Henderson
2014-03-04 19:01 ` [Qemu-devel] [PULL 3/8] tcg-ia64: Move bswap for store into " Richard Henderson
2014-03-04 19:01 ` [Qemu-devel] [PULL 4/8] tcg-ia64: Move tlb addend load into tlb read Richard Henderson
2014-03-04 19:01 ` [Qemu-devel] [PULL 5/8] tcg-ia64: Reduce code duplication in tcg_out_qemu_ld Richard Henderson
2014-03-04 19:01 ` [Qemu-devel] [PULL 6/8] tcg-ia64: Convert to new ldst helpers Richard Henderson
2014-03-04 19:01 ` [Qemu-devel] [PULL 7/8] tcg-ia64: Move part of softmmu slow path out of line Richard Henderson
2014-03-04 19:01 ` [Qemu-devel] [PULL 8/8] tcg-ia64: Convert to new ldst opcodes Richard Henderson
2014-03-06 22:10 ` [Qemu-devel] [PULL 0/8] tcg-ia64 ldst updates Aurelien Jarno
2014-03-26 17:04 ` Richard Henderson
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=1393959667-19125-2-git-send-email-rth@twiddle.net \
--to=rth@twiddle.net \
--cc=aliguori@amazon.com \
--cc=aurelien@aurel32.net \
--cc=peter.maydell@linaro.org \
--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).