From c3ea6048f0746b494cc53483e3d1e0422bcda9e0 Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Sat, 31 Mar 2007 00:09:34 +0000 Subject: [PATCH] * config/tc-xtensa.c (xtensa_move_labels): Remove loops_ok argument. Do not check is_loop_target flag. (xtensa_frob_label): Adjust calls to xtensa_move_labels. (xg_assemble_vliw_tokens): Likewise. Also avoid calling xtensa_move_labels for alignment of loop opcodes. --- gas/ChangeLog | 9 +++++++++ gas/config/tc-xtensa.c | 41 ++++++----------------------------------- 2 files changed, 15 insertions(+), 35 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 1849dcee4bb..f29dc6ffd22 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,12 @@ +2007-03-30 Sterling Augustine + Bob Wilson + + * config/tc-xtensa.c (xtensa_move_labels): Remove loops_ok argument. + Do not check is_loop_target flag. + (xtensa_frob_label): Adjust calls to xtensa_move_labels. + (xg_assemble_vliw_tokens): Likewise. Also avoid calling + xtensa_move_labels for alignment of loop opcodes. + 2007-03-30 H.J. Lu * config/tc-i386.c (process_suffix): Reindent a bit. diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c index 2531ac99572..e8877ed7143 100644 --- a/gas/config/tc-xtensa.c +++ b/gas/config/tc-xtensa.c @@ -959,43 +959,16 @@ xtensa_clear_insn_labels (void) } -/* The "loops_ok" argument is provided to allow ignoring labels that - define loop ends. This fixes a bug where the NOPs to align a - loop opcode were included in a previous zero-cost loop: - - loop a0, loopend - - loopend: - - loop a2, loopend2 - - - would become: - - loop a0, loopend - - nop.n <===== bad! - loopend: - - loop a2, loopend2 - - - This argument is used to prevent moving the NOP to before the - loop-end label, which is what you want in this special case. */ - static void -xtensa_move_labels (fragS *new_frag, valueT new_offset, bfd_boolean loops_ok) +xtensa_move_labels (fragS *new_frag, valueT new_offset) { sym_list *lit; for (lit = insn_labels; lit; lit = lit->next) { symbolS *lit_sym = lit->sym; - if (loops_ok || ! symbol_get_tc (lit_sym)->is_loop_target) - { - S_SET_VALUE (lit_sym, new_offset); - symbol_set_frag (lit_sym, new_frag); - } + S_SET_VALUE (lit_sym, new_offset); + symbol_set_frag (lit_sym, new_frag); } } @@ -5035,7 +5008,7 @@ xtensa_frob_label (symbolS *sym) frag_now->fr_symbol, frag_now->fr_offset, NULL); xtensa_set_frag_assembly_state (frag_now); - xtensa_move_labels (frag_now, 0, TRUE); + xtensa_move_labels (frag_now, 0); } /* No target aligning in the absolute section. */ @@ -5051,7 +5024,7 @@ xtensa_frob_label (symbolS *sym) RELAX_DESIRE_ALIGN_IF_TARGET, frag_now->fr_symbol, frag_now->fr_offset, NULL); xtensa_set_frag_assembly_state (frag_now); - xtensa_move_labels (frag_now, 0, TRUE); + xtensa_move_labels (frag_now, 0); } /* We need to mark the following properties even if we aren't aligning. */ @@ -6734,15 +6707,13 @@ xg_assemble_vliw_tokens (vliw_insn *vinsn) frag_var (rs_machine_dependent, 0, 0, RELAX_CHECK_ALIGN_NEXT_OPCODE, target_sym, 0, NULL); xtensa_set_frag_assembly_state (frag_now); - - xtensa_move_labels (frag_now, 0, FALSE); } if (vinsn->slots[0].opcode == xtensa_entry_opcode && !vinsn->slots[0].is_specific_opcode) { xtensa_mark_literal_pool_location (); - xtensa_move_labels (frag_now, 0, TRUE); + xtensa_move_labels (frag_now, 0); frag_var (rs_align_test, 1, 1, 0, NULL, 2, NULL); } -- 2.30.2