unwind bug fixes needed for today's gcc patch.
* config/tc-ia64.c (generate_unwind_image): Call ia64_flush_insns. (dot_endp): Don't call ia64_flush_insns. (emit_one_bundle): Don't delete prologue/body records from unwind_record list in first loop. Rewrite second loop to account for this.
This commit is contained in:
parent
bf64bfd6ba
commit
10850f29fe
|
@ -1,3 +1,11 @@
|
||||||
|
2000-06-08 James E. Wilson <wilson@cygnus.com>
|
||||||
|
|
||||||
|
* config/tc-ia64.c (generate_unwind_image): Call ia64_flush_insns.
|
||||||
|
(dot_endp): Don't call ia64_flush_insns.
|
||||||
|
(emit_one_bundle): Don't delete prologue/body records from
|
||||||
|
unwind_record list in first loop. Rewrite second loop to account for
|
||||||
|
this.
|
||||||
|
|
||||||
2000-06-07 David Mosberger <davidm@hpl.hp.com>
|
2000-06-07 David Mosberger <davidm@hpl.hp.com>
|
||||||
|
|
||||||
* config/tc-ia64.c: Add missing prototypes.
|
* config/tc-ia64.c: Add missing prototypes.
|
||||||
|
|
|
@ -2942,6 +2942,10 @@ generate_unwind_image ()
|
||||||
int size;
|
int size;
|
||||||
unsigned char *unw_rec;
|
unsigned char *unw_rec;
|
||||||
|
|
||||||
|
/* Force out pending instructions, to make sure all unwind records have
|
||||||
|
a valid slot_number field. */
|
||||||
|
ia64_flush_insns ();
|
||||||
|
|
||||||
/* Generate the unwind record. */
|
/* Generate the unwind record. */
|
||||||
size = output_unw_records (unwind.list, (void **) &unw_rec);
|
size = output_unw_records (unwind.list, (void **) &unw_rec);
|
||||||
if (size % 8 != 0)
|
if (size % 8 != 0)
|
||||||
|
@ -3561,7 +3565,6 @@ dot_endp (dummy)
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
|
|
||||||
insn_group_break (1, 0, 0);
|
insn_group_break (1, 0, 0);
|
||||||
ia64_flush_insns ();
|
|
||||||
|
|
||||||
/* If there was a .handlerdata, we haven't generated an image yet. */
|
/* If there was a .handlerdata, we haven't generated an image yet. */
|
||||||
if (unwind.info == 0)
|
if (unwind.info == 0)
|
||||||
|
@ -5239,21 +5242,12 @@ emit_one_bundle ()
|
||||||
/* Set the slot number for prologue/body records now as those
|
/* Set the slot number for prologue/body records now as those
|
||||||
refer to the current point, not the point after the
|
refer to the current point, not the point after the
|
||||||
instruction has been issued: */
|
instruction has been issued: */
|
||||||
prev = 0;
|
/* Don't try to delete prologue/body records here, as that will cause
|
||||||
|
them to also be deleted from the master list of unwind records. */
|
||||||
for (ptr = md.slot[curr].unwind_record; ptr; ptr = ptr->next)
|
for (ptr = md.slot[curr].unwind_record; ptr; ptr = ptr->next)
|
||||||
{
|
|
||||||
if (ptr->r.type == prologue || ptr->r.type == prologue_gr
|
if (ptr->r.type == prologue || ptr->r.type == prologue_gr
|
||||||
|| ptr->r.type == body)
|
|| ptr->r.type == body)
|
||||||
{
|
|
||||||
ptr->slot_number = (unsigned long) f + i;
|
ptr->slot_number = (unsigned long) f + i;
|
||||||
if (prev)
|
|
||||||
prev->next = ptr->next;
|
|
||||||
else
|
|
||||||
md.slot[curr].unwind_record = ptr->next;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
prev = ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (idesc->flags & IA64_OPCODE_SLOT2)
|
if (idesc->flags & IA64_OPCODE_SLOT2)
|
||||||
{
|
{
|
||||||
|
@ -5453,13 +5447,14 @@ emit_one_bundle ()
|
||||||
|
|
||||||
build_insn (md.slot + curr, insn + i);
|
build_insn (md.slot + curr, insn + i);
|
||||||
|
|
||||||
/* Set slot counts for unwind records. */
|
/* Set slot counts for non prologue/body unwind records. */
|
||||||
while (md.slot[curr].unwind_record)
|
for (ptr = md.slot[curr].unwind_record; ptr; ptr = ptr->next)
|
||||||
{
|
if (ptr->r.type != prologue && ptr->r.type != prologue_gr
|
||||||
md.slot[curr].unwind_record->slot_number = (unsigned long) f + i;
|
&& ptr->r.type != body)
|
||||||
md.slot[curr].unwind_record = md.slot[curr].unwind_record->next;
|
ptr->slot_number = (unsigned long) f + i;
|
||||||
}
|
md.slot[curr].unwind_record = NULL;
|
||||||
unwind.next_slot_number = (unsigned long) f + i + ((i == 2)?(0x10-2):1);
|
unwind.next_slot_number = (unsigned long) f + i + ((i == 2)?(0x10-2):1);
|
||||||
|
|
||||||
if (required_unit == IA64_UNIT_L)
|
if (required_unit == IA64_UNIT_L)
|
||||||
{
|
{
|
||||||
know (i == 1);
|
know (i == 1);
|
||||||
|
|
Loading…
Reference in New Issue