m68k : why is bra an alias for braw, not jra

Philippe De Muyter phdm@macqel.be
Tue Mar 21 11:01:00 GMT 2006


All,

In the m68k assembler, I wonder why `bra' and friends are alias for their
`bxxw' counterparts.

It seems to me that if someone needs a word-sized bra insn, (s)he will
use the braw variant.

And if one writes no size specification for a `bra' instruction the assembler
should be free to choose the most efficient way to generate it, i.e.
a `brab' if possible of even a `bral' if needed.

IIRC, that's also what the Motorola assembler did in Motorola's Unix System V.

It is also what `gcc/config/m68k/lb1sf68.asm' expects in gcc.  If you look
at this file, you'll see that it is full of `bra', `beq', `bge' etc., where
the intent is clearly to let the assembler decide.

I know that there exists a `jra' or `jbra' keyword, but that's not the
natural way of writing if you write assembler code using your Motorola
reference manual as base.

If no-one objects, I'll submit a patch

Philippe



More information about the Binutils mailing list