PowerPC: ignore sticky options for .machine

Segher Boessenkool segher@kernel.crashing.org
Tue Jul 27 16:38:28 GMT 2021


On Tue, Jul 27, 2021 at 05:03:51PM +0200, Franz Sirl wrote:
> Am 2021-07-24 um 05:20 schrieb Alan Modra:
> >If you define "wants" as "just assemble this file!" then yes, I can
> >imagine plenty of cases where some dodgy source now assembles but
> >won't after this change.  The most likely is source containing
> >.machine directives other than the sticky ones that now assembles with
> >-many might not assemble after this change.  For example, a file
> >with ".machine power8" and following that a non-power8 instruction,
> >now will give an assembly error.  ".machine power8; .machine any" in
> >the source would work for both old and new assemblers.
> >
> >I guess it might be a good idea for -many on the command line to
> >override .machine.
> 
> Really? But then your change will be kind of useless again, or? When
> writing assembler code and explicitly using .machine, I would really
> prefer to get *exactly* what I selected. Getting an error for a mnemonic
> not valid for the CPU I selected is much better than an opcode that may 
> change with binutils releases, just because for example the opcode table 
> got cleaned up and re-ordered.

Code that previously only compiled because there was -many on the
command line will stop doing that, without the suggested change.  This
can be fixed by adding a ".machine any" line after every other
".machine", but how much of that will be needed?


Segher


More information about the Binutils mailing list