unexpected NOP encodings

Peter Bergner bergner@linux.ibm.com
Tue Jun 25 14:29:00 GMT 2019


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




More information about the Binutils mailing list