This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
m68k fix request for 2.11.x release branch
- To: binutils at gcc dot gnu dot org
- Subject: m68k fix request for 2.11.x release branch
- From: mike stump <mrs at windriver dot com>
- Date: Tue, 28 Aug 2001 08:08:45 -0700 (PDT)
Below is a patch that is necessary for testcase just below. Could
this be checked in to the 2.11.x release branch? It used to work, but
someone broke it, and then Nick fixed it. The testcase works in the
top of tree. I tested the testcase with the patch in the 2.11.x
release branch, and it seems to work with it.
Thanks.
#NO_APP
.text
Ltext0:
.balign 2
.globl _foobar
_foobar:
.stabd 68,0,242
link a6,#-24
movel d0,d1
movel d1,d0
lsll #2,d0
lea a6@(-44),a0
moveq #110,d1
moveq #110,d1
moveq #110,d1
cmpl a0@(d0:l),d1
jeq L38
jra L39
.balign 2
L39:
jra L37
.balign 2
L38:
.stabd 68,0,362
addql #1,a6@(-4)
jra L36
.balign 2
2001-07-06 Nick Clifton <nickc@cambridge.redhat.com>
* config/tc-m68k.c (md_estimate_size_before_relax): Catch and
ignore empty, ineffectual alignment frags when deciding if a
branch can be short.
Index: tc-m68k.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-m68k.c,v
retrieving revision 1.17.2.2
diff -p -c -r1.17.2.2 tc-m68k.c
*** tc-m68k.c 2001/06/11 10:04:48 1.17.2.2
--- tc-m68k.c 2001/08/28 15:02:33
*************** md_estimate_size_before_relax (fragP, se
*** 4692,4704 ****
fragS *l;
stop = symbol_get_frag (fragP->fr_symbol);
for (l = fragP->fr_next; l != stop; l = l->fr_next)
- if (l->fr_fix + l->fr_var != 0)
- break;
- if (l == stop)
{
! fragP->fr_subtype = TAB (TABTYPE (fragP->fr_subtype), SHORT);
}
}
break;
default:
--- 4692,4716 ----
fragS *l;
stop = symbol_get_frag (fragP->fr_symbol);
+
for (l = fragP->fr_next; l != stop; l = l->fr_next)
{
! /* Catch empty alignment frags whoes fr_offset field
! is an alignment requirement of 2 bytes. The check
! below will misinterpret this as evidence that real
! code exists between the symbol and the instruction
! and so will not convert the short jump into a word
! jump. */
! if (l->fr_fix == 0
! && l->fr_var == 1
! && (l->fr_type == rs_align || l->fr_type == rs_align_code))
! continue;
!
! if (l->fr_fix + l->fr_var != 0)
! break;
}
+ if (l == stop)
+ fragP->fr_subtype = TAB (TABTYPE (fragP->fr_subtype), SHORT);
}
break;
default:
--------------------