aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@acm.org>2004-10-12 23:05:32 +0000
committerBob Wilson <bob.wilson@acm.org>2004-10-12 23:05:32 +0000
commitb08b50715338943656d9001415debe7f74a589c6 (patch)
tree4a35df31fa572109cea848fe8e39e1de0b3c3471 /bfd
parente1923096a1457947ac9c358b081001e99f664fc2 (diff)
downloadgdb-b08b50715338943656d9001415debe7f74a589c6.zip
gdb-b08b50715338943656d9001415debe7f74a589c6.tar.gz
gdb-b08b50715338943656d9001415debe7f74a589c6.tar.bz2
bfd ChangeLog
* elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete. (narrow_instruction, widen_instruction): Remove unnecessary calls to xtensa_format_encode. (ebb_propose_action): Inline call to ebb_add_proposed_action. (ebb_add_proposed_action): Delete. gas ChangeLog * config/tc-xtensa.c (xtensa_frequency_pseudo): Use set_subseg_freq. (is_entry_opcode, is_movi_opcode, is_the_loop_opcode, is_jx_opcode, is_windowed_return_opcode): Delete. (xtensa_frob_label): Use get_subseg_target_freq. (md_assemble): Inline call to is_entry_opcode. (xtensa_handle_align): Inline call to get_frag_is_literal. (relaxation_requirements): Inline call to is_jx_opcode. (emit_single_op): Inline call to is_movi_opcode. (xg_assemble_vliw_tokens): Inline calls to get_frag_is_insn, get_frag_is_no_transform, is_entry_opcode, and set_frag_is_specific_opcode. Use get_subseg_total_freq. (xtensa_fix_a0_b_retw_frags, xtensa_fix_b_j_loop_end_frags, xtensa_fix_close_loop_end_frags, relax_frag_immed, convert_frag_immed): Inline calls to get_frag_is_no_transform. (next_instrs_are_b_retw): Inline call to is_windowed_return_opcode. (xtensa_fix_short_loop_frags): Inline calls to is_the_loop_opcode and get_frag_is_no_transform. (convert_frag_immed_finish_loop): Inline calls to get_expression_value and set_frag_is_no_transform. (get_expression_value): Delete. (subseg_map struct): Rename cur_total_freq to total_freq. Rename cur_target_freq to target_freq. (get_subseg_info): Split out code to create a new map entry into ... (add_subseg_info): ... this new function. (get_last_insn_flags): Check if get_subseg_info succeeded. (set_last_insn_flags): Call add_subseg_info if needed. (get_subseg_total_freq, get_subseg_target_freq, set_subseg_freq): New. (xtensa_reorder_segments): Compute last_sec while counting sections. Remove call to get_last_sec. (get_last_sec): Delete. (cache_literal_section): Inline call to retrieve_literal_seg and its callees, seg_present and add_seg_list. (retrieve_literal_seg, seg_present, add_seg_list): Delete. (get_frag_is_insn, get_frag_is_no_transform, set_frag_is_specific_opcode, set_frag_is_no_transform): Delete. * config/tc-xtensa.h (MAX_SLOTS): Reduce from 31 to 15.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/elf32-xtensa.c42
2 files changed, 21 insertions, 29 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index c0b4e3a..0ba2f6c 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,13 @@
2004-10-12 Bob Wilson <bob.wilson@acm.org>
+ * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
+ (narrow_instruction, widen_instruction): Remove unnecessary calls to
+ xtensa_format_encode.
+ (ebb_propose_action): Inline call to ebb_add_proposed_action.
+ (ebb_add_proposed_action): Delete.
+
+2004-10-12 Bob Wilson <bob.wilson@acm.org>
+
* elf32-xtensa.c: Use ISO C90 formatting.
2004-10-12 Paul Brook <paul@codesourcery.com>
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index 56f317f..8d9649e 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -37,8 +37,6 @@
#define XTENSA_NO_NOP_REMOVAL 0
-extern flagword elf_xtensa_get_private_bfd_flags (bfd *);
-
/* Local helper functions. */
static bfd_boolean add_extra_plt_sections (bfd *, int);
@@ -2767,13 +2765,6 @@ elf_xtensa_set_private_flags (bfd *abfd, flagword flags)
}
-extern flagword
-elf_xtensa_get_private_bfd_flags (bfd *abfd)
-{
- return elf_elfheader (abfd)->e_flags;
-}
-
-
static bfd_boolean
elf_xtensa_print_private_bfd_data (bfd *abfd, void *farg)
{
@@ -3641,7 +3632,6 @@ narrow_instruction (bfd_byte *contents,
|| xtensa_format_length (isa, o_fmt) != 2)
return FALSE;
- xtensa_format_encode (isa, o_fmt, o_slotbuf);
xtensa_format_encode (isa, o_fmt, o_insnbuf);
operand_count = xtensa_opcode_num_operands (isa, opcode);
o_operand_count = xtensa_opcode_num_operands (isa, o_opcode);
@@ -3789,7 +3779,6 @@ widen_instruction (bfd_byte *contents,
|| xtensa_format_length (isa, o_fmt) != 3)
return FALSE;
- xtensa_format_encode (isa, o_fmt, o_slotbuf);
xtensa_format_encode (isa, o_fmt, o_insnbuf);
operand_count = xtensa_opcode_num_operands (isa, opcode);
o_operand_count = xtensa_opcode_num_operands (isa, o_opcode);
@@ -5595,8 +5584,6 @@ insn_block_decodable_len (bfd_byte *contents,
}
-static void ebb_add_proposed_action (ebb_constraint *, proposed_action *);
-
static void
ebb_propose_action (ebb_constraint *c,
bfd_vma alignment_pow,
@@ -5606,24 +5593,13 @@ ebb_propose_action (ebb_constraint *c,
int removed_bytes,
bfd_boolean do_action)
{
- proposed_action paction;
- paction.align_type = align_type;
- paction.alignment_pow = alignment_pow;
- paction.action = action;
- paction.offset = offset;
- paction.removed_bytes = removed_bytes;
- paction.do_action = do_action;
- ebb_add_proposed_action (c, &paction);
-}
+ proposed_action *act;
-
-static void
-ebb_add_proposed_action (ebb_constraint *c, proposed_action *action)
-{
- unsigned i;
if (c->action_allocated <= c->action_count)
{
- unsigned new_allocated = (c->action_count + 2) * 2;
+ unsigned new_allocated, i;
+
+ new_allocated = (c->action_count + 2) * 2;
proposed_action *new_actions = (proposed_action *)
bfd_zmalloc (sizeof (proposed_action) * new_allocated);
@@ -5634,7 +5610,15 @@ ebb_add_proposed_action (ebb_constraint *c, proposed_action *action)
c->actions = new_actions;
c->action_allocated = new_allocated;
}
- c->actions[c->action_count] = *action;
+
+ act = &c->actions[c->action_count];
+ act->align_type = align_type;
+ act->alignment_pow = alignment_pow;
+ act->action = action;
+ act->offset = offset;
+ act->removed_bytes = removed_bytes;
+ act->do_action = do_action;
+
c->action_count++;
}