PowerPC: ignore sticky options for .machine

Franz Sirl Franz.Sirl-kernel@lauterbach.com
Tue Jul 27 15:03:51 GMT 2021


Am 2021-07-24 um 05:20 schrieb Alan Modra:
> On Fri, Jul 23, 2021 at 03:39:21PM -0500, Segher Boessenkool wrote:
>> Can you think about any situation where the user *wants* to keep sticky
>> options?  And, if so, can the user write anything that will work as
>> wanted both on old and new binutils?
> 
> 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.

Franz


More information about the Binutils mailing list