qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Gwenole Beauchesne" <gwenole.beauchesne@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH, RFC] More than 2G of memory on 64-bit hosts
Date: Fri, 29 Jun 2007 16:26:10 +0200	[thread overview]
Message-ID: <e4e472910706290726r72d77244n2b81c9a18f990d1f@mail.gmail.com> (raw)
In-Reply-To: <cd8ecdef0706251903v6b15eb44r6045452fe271bd13@mail.gmail.com>

Hi,

2007/6/26, Karl Magdsick <kmagnum@gmail.com>:

> With proper support from the compiler, it's theoretically possible on
> x86-64 systems to use 32-bit pointers in long mode (16 general purpose
> 64-bit registers).  (There's an instruction prefix that will cause the
> CPU to perform 32-bit pointer calculations in the 64-bit address
> space.) I'm not aware of any systems that use this, however.

IIRC, there used to be an ILP32 programming model in long mode for
older AMD64 prototypes, i.e. with access to full 64-bit registers.
However, nobody was interested in it at that time so this was dropped.

There is still however, as you mention, an override prefix to do
32-bit pointer calculation (0x67). Please note documents around the
Intel Core processor mention a 5 cycle penalty when you use this
prefix. This doesn't seem to be a penalty for AMD processors though.
In practise, the impact on the generated code performance of my JIT
was measurably marginal (well, I only tested against my Core 2 and
Athlon 64 CPUs).

BTW, before I switched to using the address override prefix, I used to
implement a so-called 33-bit addressing mode in BasiliskII. That is,
the emulated address space is doubled to cope with the excess bits
during calculation. A shared segment is shm_open()'ed and then
mmap()'ed to BASE and BASE+(1L<<32).
-- 
Gwenolé

  parent reply	other threads:[~2007-06-29 14:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-25 20:16 [Qemu-devel] [PATCH, RFC] More than 2G of memory on 64-bit hosts Blue Swirl
2007-06-25 20:26 ` Michal Schulz
2007-06-25 20:52   ` Blue Swirl
2007-06-25 21:08     ` Michal Schulz
2007-06-26  2:03     ` Karl Magdsick
2007-06-26  8:00       ` Thiemo Seufer
2007-06-26 13:54       ` Paul Brook
2007-06-27 10:26         ` Blue Swirl
2007-06-27 10:32           ` Julian Seward
2007-06-27 11:10             ` Thiemo Seufer
2007-06-27 11:20               ` Julian Seward
2007-06-27 12:18                 ` Marius Groeger
2007-06-27 12:32                   ` Thiemo Seufer
2007-07-06 19:20           ` Rob Landley
2007-06-29 14:26       ` Gwenole Beauchesne [this message]
2007-06-25 20:28 ` Thiemo Seufer
2007-06-25 20:53   ` Blue Swirl

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=e4e472910706290726r72d77244n2b81c9a18f990d1f@mail.gmail.com \
    --to=gwenole.beauchesne@gmail.com \
    --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).