This is the mail archive of the
mailing list for the GCC project.
Re: m68k - Dropping the Motorola syntax
Per Bothner <email@example.com> writes:
> Bernardo Innocenti wrote:
> > Of course I meant to remove the least used one, which is...
> > err... mumble mumble... the MIT syntax :-)
> The MIT syntax is the one that GNU tools originally supported.
> I thought by now gas supports both syntaxes, but are both still
> being maintained?
gas does support both syntaxes. They are handled by a single YACC
parser. The last patch of even minor significance was in January,
1998. The difference between Motorola and MIT syntax is only in the
addressing forms. For the m68k, those haven't changed since the
What gcc emits doesn't really matter as far as the assembler is
concerned. You can freely mix MIT and Motorola syntax, even within a
single instruction, as they can be distinguished without ambiguity.
I see these lines in gcc/config/m68k/m68kelf.h:
/* These are necessary for -fpic/-fPIC to work correctly. */
#define MOTOROLA /* Use MOTOROLA syntax. */
This suggests that gcc started using Motorola syntax everywhere in
order to support PIC code.
Using Motorola syntax is necessary from the gcc point of view, because
for some reason gcc appears to only emit @PLTPC, etc., if MOTOROLA is
defined. gas will accept the special relocs using either syntax. For
that matter, I suspect that many of the USE_GAS defines in the gcc
m68k backend have not been needed for quite some time.