qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 0/2] tcg-i386: merge 64-bit, guest_base improvement


From: Richard Henderson
Subject: [Qemu-devel] [PATCH 0/2] tcg-i386: merge 64-bit, guest_base improvement
Date: Thu, 3 Jun 2010 17:35:16 -0700

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




reply via email to

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