From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NuUNB-0002pD-7V for qemu-devel@nongnu.org; Wed, 24 Mar 2010 13:28:05 -0400 Received: from [140.186.70.92] (port=43161 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NuUN9-0002mE-Hr for qemu-devel@nongnu.org; Wed, 24 Mar 2010 13:28:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NuUN8-00018u-Ae for qemu-devel@nongnu.org; Wed, 24 Mar 2010 13:28:03 -0400 Received: from mx20.gnu.org ([199.232.41.8]:42989) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NuUN8-00018q-90 for qemu-devel@nongnu.org; Wed, 24 Mar 2010 13:28:02 -0400 Received: from mail.codesourcery.com ([38.113.113.100]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NuUN7-0004wh-Hr for qemu-devel@nongnu.org; Wed, 24 Mar 2010 13:28:01 -0400 From: Paul Brook Subject: Re: [Qemu-devel] Re: Compile files only once: some planning Date: Wed, 24 Mar 2010 17:27:57 +0000 References: <201003241456.55779.paul@codesourcery.com> <4BAA3B53.5030606@redhat.com> In-Reply-To: <4BAA3B53.5030606@redhat.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201003241727.57800.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Blue Swirl , Paolo Bonzini , Richard Henderson > >>>> 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. > >> > >> What about adding a 512-bytes (or more) block or something like that at > >> the beginning of CPUState with a union, so you can put the per-target > >> stuff there? > > > > Is it really worth the hassle? Anything touching CPUState is probably > > going to be CPU specific anyway. > > qemu-timer.c, hw/dma.c is not and these are the first two files I looked > at. translate-all.c is the third, and it is except for a trivial cleanup. The use in hw/dma.c is incorrect. See previous discussion about how qemu_bh_schedule_idle needs to go away. I'm also unconvinced by your numbers. My i386-softmmu/ directory contains only 43 object files, most of are device emulation and don't touch CPU state at all. arm-softmmu/ contains a good number more, but that's mostly board init (which needs to know which CPU it's creating), and devices that are only used by one board so noone's bothered to move them into libhw. Paul