qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: aurelien@aurel32.net
Subject: [Qemu-devel] [PATCH 0/2] tcg-i386: merge 64-bit, guest_base improvement
Date: Thu,  3 Jun 2010 17:35:16 -0700	[thread overview]
Message-ID: <1275611718-32630-1-git-send-email-rth@twiddle.net> (raw)
In-Reply-To: 1275524816-4187-1-git-send-email-rth@twiddle.net

This patch series is dependent on the "tcg cleanups, part 4"
patch series.

The first patch merges the 64-bit code generator with the cleaned-up
32-bit code generator.  I think the result is going to be easier to
maintain than the two generators separately.  I've spot-checked the
code for 32-bit at -O2; I think the compiler has done a good job
compiling away the 64-bit parts.

The second patch uses the segmentation registers to implement GUEST_BASE.
This is only a mild space-savings for 32-bit (3 bytes per guest access),
but for 64-bit it can be very helpful.  Consider the new -R option for
reserving an address-space:

Reserved 0x80000000 bytes of guest address space
host mmap_min_addr=0x1000
guest_base  0x7fff74be1000

The area the OS reserved for us often turns out to be in high memory.
Before this patch, we wind up emitting

  movq $large,%rax
  addq %addr,%rax

The reduction by using a segment register is 11 bytes (and 2 insns)
per guest access.



r~



Richard Henderson (2):
  tcg-i386: Merge 64-bit generation.
  tcg-i386: Use segment registers to implement GUEST_BASE.

 configure               |    2 +
 tcg/i386/tcg-target.c   | 1276 ++++++++++++++++++++++++++++++-----------
 tcg/i386/tcg-target.h   |   61 ++-
 tcg/x86_64/tcg-target.c | 1445 -----------------------------------------------
 tcg/x86_64/tcg-target.h |  101 ----
 5 files changed, 996 insertions(+), 1889 deletions(-)
 delete mode 100644 tcg/x86_64/tcg-target.c
 delete mode 100644 tcg/x86_64/tcg-target.h

  parent reply	other threads:[~2010-06-04  0:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-03  0:26 [Qemu-devel] [PATCH 0/2] tcg cleanups, part 4 Richard Henderson
2010-06-03  0:26 ` [Qemu-devel] [PATCH 1/2] tcg: Add TYPE parameter to tcg_out_mov Richard Henderson
2010-06-04 19:19   ` Blue Swirl
2010-06-04 19:34     ` Richard Henderson
2010-06-03  0:26 ` [Qemu-devel] [PATCH 2/2] tcg: Make some tcg-target.c routines static Richard Henderson
2010-06-03  9:23 ` [Qemu-devel] [PATCH 0/2] tcg cleanups, part 4 malc
2010-06-04  0:35 ` Richard Henderson [this message]
2010-06-04  0:35   ` [Qemu-devel] [PATCH 1/2] tcg-i386: Merge 64-bit generation Richard Henderson
2010-06-09 22:18     ` Aurelien Jarno
2010-06-04  0:35   ` [Qemu-devel] [PATCH 2/2] tcg-i386: Use segment registers to implement GUEST_BASE Richard Henderson
2010-06-04  6:35     ` Alexander Graf
2010-06-07 19:45       ` Richard Henderson
2010-06-09  9:42 ` [Qemu-devel] [PATCH 0/2] tcg cleanups, part 4 Aurelien Jarno

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=1275611718-32630-1-git-send-email-rth@twiddle.net \
    --to=rth@twiddle.net \
    --cc=aurelien@aurel32.net \
    --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).