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: unexpected NOP encodings


On 6/24/19 10:36 PM, Alan Modra wrote:
> +  /* Any selection of opcodes based on ppc_cpu after gas has finished
> +     parsing the file is invalid.  md_apply_fix and ppc_handle_align
> +     must select opcodes based on the machine in force at the point
> +     where the fixup or alignment frag was created, not the machine in
> +     force at the end of file.  */
> +  ppc_cpu = 0;

I think the use of ppc_cpu in md_assemble() is problematical as well.
If we chose an opcode due to -many rather than a -m<cpu>/.machine value,
then the current ppc_cpu value in effect may have nothing to do with the
current insn, and yet we use ppc_cpu when calling ppc_optional_operand_value
(not used at the moment, but could be in the future) as well as when inserting
operands and the dialect is used for some operands.  I think we should be
using opcode->flags rather than ppc_cpu in md_assemble().  Do you agree?

Peter



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