[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Binutils 2.18 + GCC 4.2.3



Andreas Schwab wrote:
Use .balign instead.  The semantics of .align differ with the target.

Of course ! I forgot that !

First, the documentation:
http://sourceware.org/binutils/docs-2.18/as/Align.html

In short:
.balign takes the absolute number of bytes of alignment
.p2align takes the power of 2 of the alignment

Example:
.p2align 3
is the same as
.balign 8

The previous directives are specific to the GNU assembler.
The .align directive behaves like the native assembler of the target. On some targets it is the same as .p2align, on others it is the same as .balign

Looking at the gas sources:
By default .align behaves like .p2align
It is overridden in gas/config/tc-m68k.c
#if defined (TE_SUN3) || defined (OBJ_ELF)
  {"align", s_align_bytes, 0},
#endif

So on m68k-linux, .align behaves like .balign (because it defines OBJ_ELF). And on m68k-atari-mint, it behaves like .p2align because it is not overridden.

Does anyone know an "align" instruction on a native Atari assembler ?
How does it behave ? We should make the gas behavior coherent.

--
Vincent Rivière