From: Richard Henderson Date: Mon, 7 Aug 2000 21:50:08 +0000 (+0000) Subject: * config/tc-ia64.c (unwind): Add prologue_mask member. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=30d25259553fb463278b0a432a93314063d12cf3;p=binutils-gdb.git * 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. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index ec06506f844..12051edfc04 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,11 @@ +2000-08-07 Richard Henderson + + * 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 * config/atof-ieee.c: Fix formatting. diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c index c704cc68df3..d941fdb6a28 100644 --- a/gas/config/tc-ia64.c +++ b/gas/config/tc-ia64.c @@ -584,6 +584,7 @@ static struct /* TRUE if processing unwind directives in a prologue region. */ int prologue; + int prologue_mask; } unwind; typedef void (*vbyte_func) PARAMS ((int, char *, char *)); @@ -2747,7 +2748,8 @@ dot_vframe (dummy) if (e.X_op == O_register && reg < 128) { 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 as_bad ("First operand to .vframe must be a general register"); @@ -2830,7 +2832,8 @@ dot_save (dummy) break; case REG_AR+AR_PFS: 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; case REG_AR+AR_LC: add_unwind_entry (output_lc_when ()); @@ -2838,11 +2841,13 @@ dot_save (dummy) break; case REG_BR: 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; case REG_PR: 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; case REG_PRIUNAT: add_unwind_entry (output_priunat_when_gr ()); @@ -3509,6 +3514,8 @@ dot_body (dummy) int dummy; { unwind.prologue = 0; + unwind.prologue_mask = 0; + add_unwind_entry (output_body ()); demand_empty_rest_of_line (); } @@ -3518,8 +3525,8 @@ dot_prologue (dummy) int dummy; { unsigned char sep; + int mask = 0, grsave; - unwind.prologue = 1; if (!is_it_end_of_statement ()) { expressionS e1, e2; @@ -3532,20 +3539,26 @@ dot_prologue (dummy) if (e1.X_op == O_constant) { + mask = e1.X_add_number; + if (e2.X_op == O_constant) - { - int mask = e1.X_add_number; - int reg = e2.X_add_number; - add_unwind_entry (output_prologue_gr (mask, reg)); - } + grsave = e2.X_add_number; + else if (e2.X_op == O_register + && (grsave = e2.X_add_number - REG_GR) < 128) + ; 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 as_bad ("First operand not a constant"); } else add_unwind_entry (output_prologue ()); + + unwind.prologue = 1; + unwind.prologue_mask = mask; } static void