This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [RFA] PowerPC VLE port - opcodes update
- From: Peter Bergner <bergner at vnet dot ibm dot com>
- To: Alan Modra <amodra at gmail dot com>
- Cc: "Maciej W. Rozycki" <macro at codesourcery dot com>, James Lemke <jwlemke at codesourcery dot com>, binutils at sourceware dot org, Catherine Moore <clm at codesourcery dot com>
- Date: Tue, 4 Sep 2012 09:35:19 -0500
- Subject: Re: [RFA] PowerPC VLE port - opcodes update
- References: <500EC1E0.4080302@codesourcery.com> <20120830233850.48bbaabbda1d827eb51d692e@vnet.ibm.com> <alpine.DEB.1.10.1208311106410.12630@tp.orcam.me.uk> <20120902043705.GL3159@bubble.grove.modra.org>
On Sun, 2 Sep 2012 14:07:05 +0930 Alan Modra wrote:
> On Fri, Aug 31, 2012 at 11:52:53AM +0100, Maciej W. Rozycki wrote:
> > The logic to interpret the PPCVLE
> > (PPC_OPCODE_VLE) flag should IMHO be changed such that in the VLE mode
> > (-mvle) it does not enable any instruction such marked unconditionally.
>
> Agreed.
Agreed here too, now that Maciej described how VLE works.
> > So for example EVADDW would only be enabled whevener -mvle and -mspe are
> > used both at the same time, likewise VADDUBS would only work with -mvle
> > and -maltivec and with a lone -mvle neither of these instructions would be
> > enabled. The disassembler would work accordingly -- choosing the right
> > instruction to dump based on the architecture selected or inferred from
> > ELF object flags and the VLE section attribute.
>
> Yes, and of course you can use other -m<cpu>/-M<cpu> options to select
> the underlying flags.
I can see two ways to accomplish this. The first method would be to remove
the PPCVLE flag from all of the instructions that are possibly valid VLE
instructions, and rather place the PPCVLE flag in the deprecated field
of those instructions that will never be valid VLE instructions. Then the
normal -mspe, -maltivec, -etc. options can enable the instructions you want.
This has one drawback, in that as people add new instructions, we may not
know or remember to add or not add PPCVLE to the deprecated field, so you
may get new instructions enabled when we shouldn't.
That leads me to the second option, and that is to copy all of the VLE
instructions in powerpc_opcodes into vle_opcodes and just use the -mvle
option to choose between the two structures. This should allow the
code to be cleaned up a bit, as we'll never have to look through both
tables like the code does now.
I think Alan probably has the final say on how this should be fixed though.
Peter