From 504d556f8ece34749ea5f4cc66aa530b48dbbbb7 Mon Sep 17 00:00:00 2001 From: Kaz Kojima Date: Sun, 15 Apr 2007 22:02:25 +0000 Subject: * config/tc-sh.c (align_test_frag_offset_fixed_p): Handle rs_fill frags. --- gas/config/tc-sh.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'gas/config/tc-sh.c') diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c index 6cb9c93bc4..3af26a958e 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; -- cgit v1.2.1