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: m68k --register-prefix-optional and labels like registers


Nick Clifton <nickc@redhat.com> writes:

> > Why is the default value of the option --register-prefix-optional is
> > not the same for all m68k targets ?
> 
> This must be historical.  The description of the
> --register-prefix-optional switch in gas/doc/c-m68k.texi mentions that
> register prefixing was needed for the sun3, amongst other targets, so
> presumably the sources evolved from this basis.

The m68k clearly requires register prefixes.  Otherwise there are
ambiguities with label names.  Unfortunately a large historical body
of existing assembler code and asm statements assumed that register
prefixes were not required.  We could not make gas require register
prefixes without breaking that existing code.  So we invented
--register-prefix-optional to permit new code to use register prefixes
without breaking old code.

New code should always use register prefixes.  New code should never
use --register-prefix-optional.  We were able to make that transition
for COFF: basically, we forced everybody to rewrite their assembler
code when converting from a.out to COFF, or, later, ELF.  And people
could use --register-prefix-optional during the transition.

I would say that the bug here is that gas does not implement
--no-register-prefix-optional.  But since register prefixes are only
optional by default for a.out, and since nobody should use a.out any
more, it's hard for me to see this as a serious problem.

Ian


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