[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 20/20] tcg-ia64: Optimize small arguments to exit_tb
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 20/20] tcg-ia64: Optimize small arguments to exit_tb |
Date: |
Thu, 31 Oct 2013 13:22:09 -0700 |
Saves one bundle for the common case of exit_tb 0.
Signed-off-by: Richard Henderson <address@hidden>
---
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 a9dd153..6483fa0 100644
--- a/tcg/ia64/tcg-target.c
+++ b/tcg/ia64/tcg-target.c
@@ -960,15 +960,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.3.1
- [Qemu-devel] [PATCH 10/20] tcg-ia64: Introduce tcg_opc_mov_a, (continued)
- [Qemu-devel] [PATCH 10/20] tcg-ia64: Introduce tcg_opc_mov_a, Richard Henderson, 2013/10/31
- [Qemu-devel] [PATCH 11/20] tcg-ia64: Introduce tcg_opc_movi_a, Richard Henderson, 2013/10/31
- [Qemu-devel] [PATCH 13/20] tcg-ia64: Introduce tcg_opc_bswap64_i, Richard Henderson, 2013/10/31
- [Qemu-devel] [PATCH 12/20] tcg-ia64: Introduce tcg_opc_ext_i, Richard Henderson, 2013/10/31
- [Qemu-devel] [PATCH 14/20] tcg-ia64: Re-bundle the tlb load, Richard Henderson, 2013/10/31
- [Qemu-devel] [PATCH 15/20] tcg-ia64: Move bswap for store into tlb load, Richard Henderson, 2013/10/31
- [Qemu-devel] [PATCH 16/20] tcg-ia64: Move tlb addend load into tlb read, Richard Henderson, 2013/10/31
- [Qemu-devel] [PATCH 17/20] tcg-ia64: Reduce code duplication in tcg_out_qemu_ld, Richard Henderson, 2013/10/31
- [Qemu-devel] [PATCH 18/20] tcg-ia64: Convert to new ldst helpers, Richard Henderson, 2013/10/31
- [Qemu-devel] [PATCH 19/20] tcg-ia64: Move part of softmmu slow path out of line, Richard Henderson, 2013/10/31
- [Qemu-devel] [PATCH 20/20] tcg-ia64: Optimize small arguments to exit_tb,
Richard Henderson <=