[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
M68k gas bug
From: |
Pauli |
Subject: |
M68k gas bug |
Date: |
Mon, 25 Jun 2001 13:37:53 +1000 |
I've located a problem in the branch relaxation code for the m68k
target. A jbra instruction which jumps to the next location through
an intervening ".align 2" directive will genearte an eight bit branch
(not a sixteen bit one) which causes fatal errors later on.
The command line I used to generate the problem is:
$ m68k-elf-as -m5307 z.s -o z.o -v
GNU assembler version 2.11 (m68k-elf) using BFD version 2.11
z.s: Assembler messages:
z.s:4: Error: short branch with zero offset: use :w
z.s:4: Error: invalid byte branch offset
$
This is running on an x86 machine with Red Hat 7.
Gas configured via "../configure --target=m68k-elf"
The problem also occurs if -m68000 is used instead of -m5307 but not
if -m68020 is passed.
The input file (z.s) which exhibits the problem:
----------8<-------------
jbra .L2
.align 2
.L2:
rts
---------->8-------------
Without the ".align 2" things seem to work okay. Unfortunately, gcc
seems to produce plenty of jbras to the next instruction with an
intermediate ".align 2" directive when no optimisation (-O0) is used).
Gas from binutils-2.10 does *not* exhibit this problem but there does
appear to have been some work done on the brach relaxation code post
this version.
Regards,
Pauli
[Prev in Thread] |
Current Thread |
[Next in Thread] |