m68k - Dropping the Motorola syntax

Jamie Lokier jamie@shareable.org
Thu Aug 21 03:46:00 GMT 2003


Bernardo Innocenti wrote:
> GCC's output syntax is just a protocol between the compiler and the
> assembler.

No, it also appears in C extended asm statements.  I'm not quite sure
whether this can ever happen with the m68k syntaxes, but consider this
C source:

	int global_magic_pointer __asm__("a0");

	// Later...
	__asm__ ("move.l (a0)+,%0" : "=rm" (tmp) : : "a0");

If the %0 is emitted with the wrong syntax, the asm statement would no
longer compile and assemble even if GAS supports both syntaxes --
unless GAS supports mixing syntaxes within a single statement.

-- Jamie



More information about the Gcc mailing list