[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/4] move PPC insn flags to cpu.h
From: |
Nathan Froyd |
Subject: |
Re: [Qemu-devel] [PATCH 1/4] move PPC insn flags to cpu.h |
Date: |
Sat, 28 Mar 2009 16:07:52 -0700 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
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