* config/tc-ia64.c (unwind): Add prologue_mask member.

(dot_vframe): Elide psp_gr record if it overlaps prologue_gr.
        (dot_save): Likewise for pfs_gr, rp_gr, and preds_gr.
        (dot_body): Clear unwind.prologue_mask.
        (dot_prologue): Set it.  Accept a register second argument.
This commit is contained in:
Richard Henderson 2000-08-07 21:50:08 +00:00
parent 0228082a3c
commit 30d2525955
2 changed files with 32 additions and 11 deletions

View file

@ -1,3 +1,11 @@
2000-08-07 Richard Henderson <rth@cygnus.com>
* config/tc-ia64.c (unwind): Add prologue_mask member.
(dot_vframe): Elide psp_gr record if it overlaps prologue_gr.
(dot_save): Likewise for pfs_gr, rp_gr, and preds_gr.
(dot_body): Clear unwind.prologue_mask.
(dot_prologue): Set it. Accept a register second argument.
2000-08-07 Kazu Hirata <kazu@hxi.com> 2000-08-07 Kazu Hirata <kazu@hxi.com>
* config/atof-ieee.c: Fix formatting. * config/atof-ieee.c: Fix formatting.

View file

@ -584,6 +584,7 @@ static struct
/* TRUE if processing unwind directives in a prologue region. */ /* TRUE if processing unwind directives in a prologue region. */
int prologue; int prologue;
int prologue_mask;
} unwind; } unwind;
typedef void (*vbyte_func) PARAMS ((int, char *, char *)); typedef void (*vbyte_func) PARAMS ((int, char *, char *));
@ -2747,7 +2748,8 @@ dot_vframe (dummy)
if (e.X_op == O_register && reg < 128) if (e.X_op == O_register && reg < 128)
{ {
add_unwind_entry (output_mem_stack_v ()); add_unwind_entry (output_mem_stack_v ());
add_unwind_entry (output_psp_gr (reg)); if (! (unwind.prologue_mask & 2))
add_unwind_entry (output_psp_gr (reg));
} }
else else
as_bad ("First operand to .vframe must be a general register"); as_bad ("First operand to .vframe must be a general register");
@ -2830,7 +2832,8 @@ dot_save (dummy)
break; break;
case REG_AR+AR_PFS: case REG_AR+AR_PFS:
add_unwind_entry (output_pfs_when ()); add_unwind_entry (output_pfs_when ());
add_unwind_entry (output_pfs_gr (reg2)); if (! (unwind.prologue_mask & 4))
add_unwind_entry (output_pfs_gr (reg2));
break; break;
case REG_AR+AR_LC: case REG_AR+AR_LC:
add_unwind_entry (output_lc_when ()); add_unwind_entry (output_lc_when ());
@ -2838,11 +2841,13 @@ dot_save (dummy)
break; break;
case REG_BR: case REG_BR:
add_unwind_entry (output_rp_when ()); add_unwind_entry (output_rp_when ());
add_unwind_entry (output_rp_gr (reg2)); if (! (unwind.prologue_mask & 8))
add_unwind_entry (output_rp_gr (reg2));
break; break;
case REG_PR: case REG_PR:
add_unwind_entry (output_preds_when ()); add_unwind_entry (output_preds_when ());
add_unwind_entry (output_preds_gr (reg2)); if (! (unwind.prologue_mask & 1))
add_unwind_entry (output_preds_gr (reg2));
break; break;
case REG_PRIUNAT: case REG_PRIUNAT:
add_unwind_entry (output_priunat_when_gr ()); add_unwind_entry (output_priunat_when_gr ());
@ -3509,6 +3514,8 @@ dot_body (dummy)
int dummy; int dummy;
{ {
unwind.prologue = 0; unwind.prologue = 0;
unwind.prologue_mask = 0;
add_unwind_entry (output_body ()); add_unwind_entry (output_body ());
demand_empty_rest_of_line (); demand_empty_rest_of_line ();
} }
@ -3518,8 +3525,8 @@ dot_prologue (dummy)
int dummy; int dummy;
{ {
unsigned char sep; unsigned char sep;
int mask = 0, grsave;
unwind.prologue = 1;
if (!is_it_end_of_statement ()) if (!is_it_end_of_statement ())
{ {
expressionS e1, e2; expressionS e1, e2;
@ -3532,20 +3539,26 @@ dot_prologue (dummy)
if (e1.X_op == O_constant) if (e1.X_op == O_constant)
{ {
mask = e1.X_add_number;
if (e2.X_op == O_constant) if (e2.X_op == O_constant)
{ grsave = e2.X_add_number;
int mask = e1.X_add_number; else if (e2.X_op == O_register
int reg = e2.X_add_number; && (grsave = e2.X_add_number - REG_GR) < 128)
add_unwind_entry (output_prologue_gr (mask, reg)); ;
}
else else
as_bad ("Second operand not a constant"); as_bad ("Second operand not a constant or general register");
add_unwind_entry (output_prologue_gr (mask, grsave));
} }
else else
as_bad ("First operand not a constant"); as_bad ("First operand not a constant");
} }
else else
add_unwind_entry (output_prologue ()); add_unwind_entry (output_prologue ());
unwind.prologue = 1;
unwind.prologue_mask = mask;
} }
static void static void