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] PowerPC VLE changes


On Mon, Mar 27, 2017 at 03:32:23PM +0100, Andrew Jenner wrote:
> Hi Alexander,
> 
> On 24/03/2017 15:32, Александр Федотов wrote:
> >I have question in continuation of
> >https://sourceware.org/ml/binutils/2016-07/msg00342.html
> >
> >Why do you need to have "e_cmpwi" etc in vle_opcodes table ? It seems
> >they are just alias names because of the same opcodes and objdump
> >never show them.
> >Why don't to use powerpc_macros instead ?

It is the other way around.  If there is something in the macro table
that could go in the main opcode table then it should be moved there.

Mnemonic lookup in the main opcode table happens first.  Macro lookup
is later.  So putting something in the macro table unnecessarily, just
slows does the assembler a litte.  The macro table should really only
be used where some manipulation of arguments is needed.

Hmm, looking at the macros, that means e_rotlwi and e_clrlwi probably
ought to be moved since the macros just provide a default argument to
the underlying machine insn rather than some arithmetic manipulation.
Fixing this isn't at all important though, so don't see these comments
as a request for someone to tidy the VLE support.  Note that moving
those insns to the main table would also allow the disassembler to
produce e_rotlwi or e_clrlwi rather than e_rlwinm, depending on
whether you place them before e_rlwinm or after.  I recognize that
some people (more hardware oriented) would prefer to see rlwinm rather
than rotlwi (likely prefered by those more software oriented).  I've
just been working on a patch that will add -Mraw to the powerpc
disassembler to maybe satisfy both camps.

-- 
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]