qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 0/7] Further tcg ldst improvements


From: Richard Henderson
Subject: [Qemu-devel] [PATCH 0/7] Further tcg ldst improvements
Date: Tue, 27 Aug 2013 14:46:24 -0700

This is the follow-on that Aurelien and I discussed in thread for the
PULL of the previous patch set.

The bulk of the patch set is rearranging things so that we can elide the
move+extend instruction following the call to the load helper function.
With the value properly extended for the register, and the register
constrained to be the function return value, we can tail call to the helper.

The ARM patches I posted previously contain a variant of this idea,
locallized to the ARM backend.  But with Aurelian suggesting that the
tail call idea be used on x86 as well, ignoring the effect on the cpu's
call-return prediction stack, it's worthwhile to make the generic helpers
do the job.

Tested on x86_64 and i686.  There is a universal decrease in TB code size.
In scanning a few dumps, I did not see a TB that was complicated enough
that the fast path was penalized by constraining the qemu_ld output register.

If this is the way we want to go with this, I'll revise my patch sets for
the other tcg backends based on this.


r~


Richard Henderson (7):
  exec: Reorganize the GETRA/GETPC macros
  tcg-i386: Don't perform GETPC adjustment in TCG code
  exec: Rename USUFFIX to LSUFFIX
  target: Include softmmu_exec.h where forgotten
  exec: Split softmmu_defs.h
  tcg: Introduce zero and sign-extended versions of load helpers
  tcg-i386: Perform tail call to qemu_ret_ld*_mmu

 include/exec/exec-all.h         |  92 +++++++++++++------------
 include/exec/softmmu_defs.h     |  49 --------------
 include/exec/softmmu_exec.h     |   3 +-
 include/exec/softmmu_template.h |  88 ++++++++++++++++++------
 target-lm32/op_helper.c         |   2 +
 target-moxie/helper.c           |   1 +
 target-ppc/mmu_helper.c         |   2 +
 target-unicore32/op_helper.c    |   2 +
 target-xtensa/op_helper.c       |   1 +
 tcg/aarch64/tcg-target.c        |   2 -
 tcg/arm/tcg-target.c            |   2 -
 tcg/hppa/tcg-target.c           |   2 -
 tcg/i386/tcg-target.c           | 146 +++++++++++++++-------------------------
 tcg/ia64/tcg-target.c           |   3 -
 tcg/mips/tcg-target.c           |   3 -
 tcg/ppc/tcg-target.c            |   2 -
 tcg/ppc64/tcg-target.c          |   3 -
 tcg/s390/tcg-target.c           |   3 -
 tcg/sparc/tcg-target.c          |   2 -
 tcg/tcg.h                       |  52 ++++++++++++++
 20 files changed, 227 insertions(+), 233 deletions(-)
 delete mode 100644 include/exec/softmmu_defs.h

-- 
1.8.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]