aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaz Kojima <kkojima@rr.iij4u.or.jp>2007-04-15 22:02:25 +0000
committerKaz Kojima <kkojima@rr.iij4u.or.jp>2007-04-15 22:02:25 +0000
commit0838d2ac72ee48c60ff25beeb4ec9175644aca4e (patch)
tree8725e4d43a4e1b7e86c83bdf620cf8d4958e55ff
parente9043d6669a9cd89059e56123f7bcf5e73382185 (diff)
downloadgdb-0838d2ac72ee48c60ff25beeb4ec9175644aca4e.zip
gdb-0838d2ac72ee48c60ff25beeb4ec9175644aca4e.tar.gz
gdb-0838d2ac72ee48c60ff25beeb4ec9175644aca4e.tar.bz2
* config/tc-sh.c (align_test_frag_offset_fixed_p): Handle
rs_fill frags.
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-sh.c16
2 files changed, 17 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 246917b..2822c52 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2007-04-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * config/tc-sh.c (align_test_frag_offset_fixed_p): Handle
+ rs_fill frags.
+
2007-04-14 Steve Ellcey <sje@cup.hp.com>
* Makefile.am: Add ACLOCAL_AMFLAGS.
diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c
index 6cb9c93..3af26a9 100644
--- a/gas/config/tc-sh.c
+++ b/gas/config/tc-sh.c
@@ -847,9 +847,13 @@ align_test_frag_offset_fixed_p (const fragS *frag1, const fragS *frag2,
/* Maybe frag2 is after frag1. */
frag = frag1;
- while (frag->fr_type == rs_align_test)
+ while (frag->fr_type == rs_fill
+ || frag->fr_type == rs_align_test)
{
- off += frag->fr_fix;
+ if (frag->fr_type == rs_fill)
+ off += frag->fr_fix + frag->fr_offset * frag->fr_var;
+ else
+ off += frag->fr_fix;
frag = frag->fr_next;
if (frag == NULL)
break;
@@ -863,9 +867,13 @@ align_test_frag_offset_fixed_p (const fragS *frag1, const fragS *frag2,
/* Maybe frag1 is after frag2. */
off = frag1->fr_address - frag2->fr_address;
frag = frag2;
- while (frag->fr_type == rs_align_test)
+ while (frag->fr_type == rs_fill
+ || frag->fr_type == rs_align_test)
{
- off -= frag->fr_fix;
+ if (frag->fr_type == rs_fill)
+ off -= frag->fr_fix + frag->fr_offset * frag->fr_var;
+ else
+ off -= frag->fr_fix;
frag = frag->fr_next;
if (frag == NULL)
break;