diff options
author | Jakub Jelinek <jakub@redhat.com> | 2003-08-29 20:20:18 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2003-08-29 20:20:18 +0000 |
commit | 364b6d8b23fffbc773c2bda23348d73e8de86e84 (patch) | |
tree | ffe7b74218f18af4d967a05c8fb7bb373ca2161d /gas/dw2gencfi.c | |
parent | e294916c5a6fd7e6f6a13261100cb1d3a2ee5a82 (diff) | |
download | gdb-364b6d8b23fffbc773c2bda23348d73e8de86e84.zip gdb-364b6d8b23fffbc773c2bda23348d73e8de86e84.tar.gz gdb-364b6d8b23fffbc773c2bda23348d73e8de86e84.tar.bz2 |
* dw2gencfi.c (cfi_pseudo_table): Add cfi_gnu_window_save.
(dot_cfi, output_cfi_insn): Handle DW_CFA_GNU_window_save.
(output_cie): Don't use DW_EH_PE_pcrel if neither DIFF_EXPR_OK
nor tc_cfi_emit_pcrel_expr are defined.
(output_fde): Use tc_cfi_emit_pcrel_expr if available and
DIFF_EXPR_OK is not defined.
* config/tc-sparc.h (TARGET_USE_CFIPOP): Define.
(tc_cfi_frame_initial_instructions, tc_regname_to_dw2regnum,
tc_cfi_emit_pcrel_expr): Define.
(sparc_cfi_frame_initial_instructions, sparc_regname_to_dw2regnum,
sparc_cfi_emit_pcrel_expr): New prototypes.
(sparc_cie_data_alignment): New decl.
(DWARF2_DEFAULT_RETURN_COLUMN, DWARF2_CIE_DATA_ALIGNMENT): Define.
* config/tc-sparc.c: Include dw2gencfi.h.
(sparc_cie_data_alignment): New variable.
(md_begin): Initialize it.
(sparc_cfi_frame_initial_instructions): New function.
(sparc_regname_to_dw2regnum): Likewise.
(sparc_cfi_emit_pcrel_expr): Likewise.
* doc/as.texinfo: Document .cfi_gnu_window_save.
* config/tc-sparc.c (s_common): Cast last argument to long and
change format string to shut up warning.
testsuite/
* gas/cfi/cfi-sparc-1.s: New test.
* gas/cfi/cfi-sparc-1.d: New test.
* gas/cfi/cfi-sparc64-1.s: New test.
* gas/cfi/cfi-sparc64-1.d: New test.
* gas/cfi/cfi.exp: Run them.
Diffstat (limited to 'gas/dw2gencfi.c')
-rw-r--r-- | gas/dw2gencfi.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/gas/dw2gencfi.c b/gas/dw2gencfi.c index c7c62a7..c6f1a2e 100644 --- a/gas/dw2gencfi.c +++ b/gas/dw2gencfi.c @@ -374,6 +374,7 @@ const pseudo_typeS cfi_pseudo_table[] = { "cfi_same_value", dot_cfi, DW_CFA_same_value }, { "cfi_remember_state", dot_cfi, DW_CFA_remember_state }, { "cfi_restore_state", dot_cfi, DW_CFA_restore_state }, + { "cfi_gnu_window_save", dot_cfi, DW_CFA_GNU_window_save }, { "cfi_escape", dot_cfi_escape, 0 }, { NULL, NULL, 0 } }; @@ -529,6 +530,10 @@ dot_cfi (int arg) cfi_add_CFA_restore_state (); break; + case DW_CFA_GNU_window_save: + cfi_add_CFA_insn (DW_CFA_GNU_window_save); + break; + default: abort (); } @@ -798,6 +803,10 @@ output_cfi_insn (struct cfi_insn_data *insn) out_one (insn->insn); break; + case DW_CFA_GNU_window_save: + out_one (DW_CFA_GNU_window_save); + break; + case CFI_escape: { struct cfi_escape_data *e; @@ -838,7 +847,11 @@ output_cie (struct cie_entry *cie) out_sleb128 (DWARF2_CIE_DATA_ALIGNMENT); /* Data alignment */ out_one (cie->return_column); /* Return column */ out_uleb128 (1); /* Augmentation size */ +#if defined DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr out_one (DW_EH_PE_pcrel | DW_EH_PE_sdata4); +#else + out_one (DW_EH_PE_sdata4); +#endif if (cie->first) for (i = cie->first; i != cie->last; i = i->next) @@ -867,10 +880,22 @@ output_fde (struct fde_entry *fde, struct cie_entry *cie, exp.X_add_symbol = after_size_address; exp.X_op_symbol = cie->start_address; emit_expr (&exp, 4); /* CIE offset */ - + +#ifdef DIFF_EXPR_OK exp.X_add_symbol = fde->start_address; exp.X_op_symbol = symbol_temp_new_now (); emit_expr (&exp, 4); /* Code offset */ +#else + exp.X_op = O_symbol; + exp.X_add_symbol = fde->start_address; + exp.X_op_symbol = NULL; +#ifdef tc_cfi_emit_pcrel_expr + tc_cfi_emit_pcrel_expr (&exp, 4); /* Code offset */ +#else + emit_expr (&exp, 4); /* Code offset */ +#endif + exp.X_op = O_subtract; +#endif exp.X_add_symbol = fde->end_address; exp.X_op_symbol = fde->start_address; /* Code length */ |