From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NuUsd-00078S-6b for qemu-devel@nongnu.org; Wed, 24 Mar 2010 14:00:35 -0400 Received: from [140.186.70.92] (port=33797 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NuUsZ-000775-7b for qemu-devel@nongnu.org; Wed, 24 Mar 2010 14:00:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NuUsX-00057x-LX for qemu-devel@nongnu.org; Wed, 24 Mar 2010 14:00:31 -0400 Received: from mail-pz0-f194.google.com ([209.85.222.194]:51798) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NuUsX-00057X-GS for qemu-devel@nongnu.org; Wed, 24 Mar 2010 14:00:29 -0400 Received: by pzk32 with SMTP id 32so1141579pzk.4 for ; Wed, 24 Mar 2010 11:00:28 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4BA9F52C.6070309@twiddle.net> References: <4BA9DFAA.3070107@redhat.com> <4BA9F52C.6070309@twiddle.net> Date: Wed, 24 Mar 2010 20:00:28 +0200 Message-ID: Subject: Re: [Qemu-devel] Re: Compile files only once: some planning From: Blue Swirl Content-Type: text/plain; charset=UTF-8 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Paolo Bonzini , qemu-devel On 3/24/10, Richard Henderson wrote: > On 03/24/2010 02:47 AM, Paolo Bonzini wrote: > > > 1) make CPUState define only common fields. Include CPUState at the > > beginning of each per-target CPUXYZState. > > > > Irritatingly, the common fields contain quite big TLBs. And the > offsets from the start of env affect the compactness of the code > generated from TCG. We really really want the general registers > to come first to make sure that those offsets fit the host's > reg+offset addressing mode. One trick is to define a fixed offset (about half CPUState size) and make env point to CPUState + offset. Then the negative part of the offset space can be used efficiently. But this just doubles the space that can be accessed fast, so it's not a big win.