This is the mail archive of the binutils@sources.redhat.com 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]

Re: powerpc64-linux infrastructure 5 of 6


Geoff Keating <geoffk@geoffk.org> writes:

  > Put relocs in the opcode table.
  
  This seems like a bad design.  The opcode table is shared between
  multiple ABIs and object file formats, and there's no reason to think
  that the reloc for an instruction in aix-xcoff would be the same as
  the one in powerpc SVR4. For instance,
  
     /* The D field in a D form instruction.  This is a displacement off
        a register, and implies that the next operand is a register in
        parentheses.  */
   #define D CR + 1
  -  { 16, 0, 0, 0, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED },
  +  { 16, 0, 0, 0, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED,
  +    BFD_RELOC_PPC_TOC16 },
  
  seems specific to the AIX and powerpc64 ABIs.
  
Yes, that field is only used for AIX / XCOFF.
It replaces an ugly chunk of ad-hoc code in tc-ppc.c.

Why do you think it is bad design?

-- 
Torbjörn


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