From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LnhdD-0003F1-Cx for qemu-devel@nongnu.org; Sat, 28 Mar 2009 19:08:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lnhd8-000339-JD for qemu-devel@nongnu.org; Sat, 28 Mar 2009 19:08:02 -0400 Received: from [199.232.76.173] (port=58676 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lnhd8-00032t-Ay for qemu-devel@nongnu.org; Sat, 28 Mar 2009 19:07:58 -0400 Received: from mx20.gnu.org ([199.232.41.8]:10856) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lnhd7-0006wi-U8 for qemu-devel@nongnu.org; Sat, 28 Mar 2009 19:07:58 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lnhd2-0007qm-Tv for qemu-devel@nongnu.org; Sat, 28 Mar 2009 19:07:53 -0400 Date: Sat, 28 Mar 2009 16:07:52 -0700 From: Nathan Froyd Subject: Re: [Qemu-devel] [PATCH 1/4] move PPC insn flags to cpu.h Message-ID: <20090328230751.GJ7336@codesourcery.com> References: <1238275817-9758-1-git-send-email-froydnj@codesourcery.com> <1238275817-9758-2-git-send-email-froydnj@codesourcery.com> <20090328225805.GM20944@hall.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090328225805.GM20944@hall.aurel32.net> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Sat, Mar 28, 2009 at 11:58:05PM +0100, Aurelien Jarno wrote: > On Sat, Mar 28, 2009 at 02:30:14PM -0700, Nathan Froyd wrote: > > It makes more sense to put the flags in the header file than in the > > middle of translate.c. > > If those definition are not used outside of translate.c, it makes no > sense to move them out to a header file included at multiple places. > > OTOH, I agree that having them in the middle of translate.c is a bit > strange. Maybe we should move them at the top of the file along with > other definitions? In that case, GEN_HANDLER* and EXTRACT_HELPER are > also good candidates for the move. Whether they are placed at the top of translate.c or in cpu.h makes no difference for this patch. I have an implementation of linux-user signal handling for PPC32 that I'd like to submit soon, though. It requires knowing what capabilities the CPU supports so it can figure out what registers to save while setting up the signal frame. (Saving the floating point registers makes no difference modulo speed, but the save areas for the Altivec and SPE registers overlap.) So in the interest of not having to move them twice, I'm lobbying for placing them in cpu.h. I think many of the GEN_HANDLER macros are localized enough that they should remain where they are...my kingdom for a MACROLET. -Nathan