qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/7] Further tcg ldst improvements
@ 2013-08-27 21:46 Richard Henderson
  2013-08-27 21:46 ` [Qemu-devel] [PATCH 1/7] exec: Reorganize the GETRA/GETPC macros Richard Henderson
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Richard Henderson @ 2013-08-27 21:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: aurelien

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-08-29 17:43 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-27 21:46 [Qemu-devel] [PATCH 0/7] Further tcg ldst improvements Richard Henderson
2013-08-27 21:46 ` [Qemu-devel] [PATCH 1/7] exec: Reorganize the GETRA/GETPC macros Richard Henderson
2013-08-27 21:46 ` [Qemu-devel] [PATCH 2/7] tcg-i386: Don't perform GETPC adjustment in TCG code Richard Henderson
2013-08-27 21:46 ` [Qemu-devel] [PATCH 3/7] exec: Rename USUFFIX to LSUFFIX Richard Henderson
2013-08-27 21:46 ` [Qemu-devel] [PATCH 4/7] target: Include softmmu_exec.h where forgotten Richard Henderson
2013-08-27 21:46 ` [Qemu-devel] [PATCH 5/7] exec: Split softmmu_defs.h Richard Henderson
2013-08-27 21:46 ` [Qemu-devel] [PATCH 6/7] tcg: Introduce zero and sign-extended versions of load helpers Richard Henderson
2013-08-27 21:46 ` [Qemu-devel] [PATCH 7/7] tcg-i386: Perform tail call to qemu_ret_ld*_mmu Richard Henderson
2013-08-28 16:34   ` Richard Henderson
2013-08-29 15:31   ` Paolo Bonzini
2013-08-29 16:08     ` Richard Henderson
2013-08-29 16:36       ` Paolo Bonzini
2013-08-29 17:06   ` Aurelien Jarno
2013-08-29 17:43     ` Richard Henderson

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).