This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Enable power7 disassembling


On Sat, Mar 07, 2009 at 12:00:20AM -0600, Peter Bergner wrote:
> I think this "default" cpu flags was probably an oversight and that
> we should combine the power4, power5, etc. "if" tests into the chain
> of "if else if..." sequence.

Agreed.  As you note, the default chosen is a little odd too.

> It also seems like ppc-dis.c:powerpc_init_dialect() and tc-ppc.c:parse_cpu()
> are basically doing the same thing and that they could be combined.  It also
> looks like tc-ppc.c:parse_cpu() has a more complete listing of cpus than
> ppc-dis.c:powerpc_init_dialect()'s limited list.
> 
> Alan, does this look like something that should be cleaned up, or do we just
> leave well enough alone?

I think it's a good idea.  A slightly modified parse_cpu named
parse_powerpc_cpu or somesuch could live in ppc-dis.c and thus be
available to gas in libopcodes.  Then modify powerpc_init_dialect to
step through the comma separated -M args in disassembler_options,
calling parse_powerpc_cpu on each one.  Much nicer.

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]