mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 18:39:34 +08:00
* config/tc-xtensa.c (update_next_frag_state): Always add a NOP if
relaxing at the end of a loop. Don't mark frags as UNREACHABLE or MAYBE_UNREACHABLE. (relax_frag_immed): Update call to update_next_frag_state.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2004-11-10 Bob Wilson <bob.wilson@acm.org>
|
||||||
|
|
||||||
|
* config/tc-xtensa.c (update_next_frag_state): Always add a NOP if
|
||||||
|
relaxing at the end of a loop. Don't mark frags as UNREACHABLE or
|
||||||
|
MAYBE_UNREACHABLE.
|
||||||
|
(relax_frag_immed): Update call to update_next_frag_state.
|
||||||
|
|
||||||
2004-11-10 Alan Modra <amodra@bigpond.net.au>
|
2004-11-10 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* obj.h (struct format_ops <app_file>): Add int param.
|
* obj.h (struct format_ops <app_file>): Add int param.
|
||||||
|
@ -4535,7 +4535,7 @@ next_frag_format_size (const fragS *fragP)
|
|||||||
switch its state so it will instantiate a NOP. */
|
switch its state so it will instantiate a NOP. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
update_next_frag_state (fragS *fragP, bfd_boolean unreachable)
|
update_next_frag_state (fragS *fragP)
|
||||||
{
|
{
|
||||||
fragS *next_fragP = fragP->fr_next;
|
fragS *next_fragP = fragP->fr_next;
|
||||||
fragS *new_target = NULL;
|
fragS *new_target = NULL;
|
||||||
@ -4563,15 +4563,7 @@ update_next_frag_state (fragS *fragP, bfd_boolean unreachable)
|
|||||||
&& (new_target->fr_subtype == RELAX_MAYBE_DESIRE_ALIGN
|
&& (new_target->fr_subtype == RELAX_MAYBE_DESIRE_ALIGN
|
||||||
|| new_target->fr_subtype == RELAX_DESIRE_ALIGN));
|
|| new_target->fr_subtype == RELAX_DESIRE_ALIGN));
|
||||||
}
|
}
|
||||||
if (unreachable)
|
|
||||||
{
|
|
||||||
if (align_targets)
|
|
||||||
{
|
|
||||||
next_fragP->fr_subtype = RELAX_UNREACHABLE;
|
|
||||||
next_fragP->tc_frag_data.is_unreachable = TRUE;
|
|
||||||
new_target->fr_subtype = RELAX_DESIRE_ALIGN;
|
|
||||||
new_target->tc_frag_data.is_branch_target = TRUE;
|
|
||||||
}
|
|
||||||
while (next_fragP && next_fragP->fr_fix == 0)
|
while (next_fragP && next_fragP->fr_fix == 0)
|
||||||
{
|
{
|
||||||
if (next_fragP->fr_type == rs_machine_dependent
|
if (next_fragP->fr_type == rs_machine_dependent
|
||||||
@ -4584,17 +4576,6 @@ update_next_frag_state (fragS *fragP, bfd_boolean unreachable)
|
|||||||
next_fragP = next_fragP->fr_next;
|
next_fragP = next_fragP->fr_next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if (align_targets)
|
|
||||||
{
|
|
||||||
next_fragP->fr_subtype = RELAX_MAYBE_UNREACHABLE;
|
|
||||||
next_fragP->tc_frag_data.is_unreachable = FALSE;
|
|
||||||
new_target->fr_subtype = RELAX_MAYBE_DESIRE_ALIGN;
|
|
||||||
new_target->tc_frag_data.is_branch_target = FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static bfd_boolean
|
static bfd_boolean
|
||||||
@ -9115,13 +9096,8 @@ relax_frag_immed (segT segP,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: When a negatable branch expands and then contracts in a
|
|
||||||
subsequent pass, update_next_frag_state correctly updates the
|
|
||||||
type of the frag to RELAX_MAYBE_UNREACHABLE, but it doesn't undo
|
|
||||||
any expansion relax_frag_for_align may have expected it to. For
|
|
||||||
now, change back to only call it when the branch expands. */
|
|
||||||
if (negatable_branch && istack.ninsn > 1)
|
if (negatable_branch && istack.ninsn > 1)
|
||||||
update_next_frag_state (fragP, FALSE /* istack.ninsn > 1 */);
|
update_next_frag_state (fragP);
|
||||||
|
|
||||||
return this_text_diff;
|
return this_text_diff;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user