aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@acm.org>2004-11-05 17:25:34 +0000
committerBob Wilson <bob.wilson@acm.org>2004-11-05 17:25:34 +0000
commit34e4178350592df5ab8187ef75a2318965af7b83 (patch)
tree5e6e2cdb943a498071ebe79fda63bb7cab86481f /gas
parent1eefd4933496825e984f27fb4086e03600a7952a (diff)
downloadgdb-34e4178350592df5ab8187ef75a2318965af7b83.zip
gdb-34e4178350592df5ab8187ef75a2318965af7b83.tar.gz
gdb-34e4178350592df5ab8187ef75a2318965af7b83.tar.bz2
* config/tc-xtensa.c (total_frag_text_expansion): New.
(md_estimate_size_before_relax): Use it. (find_address_of_next_align_frag): Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-xtensa.c19
2 files changed, 22 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 9dc94d1..184a579 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2004-11-05 Sterling Augustine <sterling@tensilica.com>
+
+ * config/tc-xtensa.c (total_frag_text_expansion): New.
+ (md_estimate_size_before_relax): Use it.
+ (find_address_of_next_align_frag): Likewise.
+
2004-11-05 Tomer Levi <Tomer.Levi@nsc.com>
* config/tc-crx.c: Rename argument types.
diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
index a2eaf96..340fb18 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
@@ -442,6 +442,7 @@ static void set_literal_pool_location (segT, fragS *);
static void xtensa_set_frag_assembly_state (fragS *);
static void finish_vinsn (vliw_insn *);
static bfd_boolean emit_single_op (TInsn *);
+static int total_frag_text_expansion (fragS *);
/* Alignment Functions. */
@@ -5706,7 +5707,7 @@ md_atof (int type, char *litP, int *sizeP)
int
md_estimate_size_before_relax (fragS *fragP, segT seg ATTRIBUTE_UNUSED)
{
- return fragP->tc_frag_data.text_expansion[0];
+ return total_frag_text_expansion (fragP);
}
@@ -6762,6 +6763,19 @@ emit_single_op (TInsn *orig_insn)
}
+static int
+total_frag_text_expansion (fragS *fragP)
+{
+ int slot;
+ int total_expansion = 0;
+
+ for (slot = 0; slot < MAX_SLOTS; slot++)
+ total_expansion += fragP->tc_frag_data.text_expansion[slot];
+
+ return total_expansion;
+}
+
+
/* Emit a vliw instruction to the current fragment. */
static void
@@ -8641,8 +8655,7 @@ find_address_of_next_align_frag (fragS **fragPP,
(*widens)++;
break;
}
- /* FIXME: shouldn't this add the expansion of all slots? */
- address += fragP->tc_frag_data.text_expansion[0];
+ address += total_frag_text_expansion (fragP);;
break;
case RELAX_IMMED: