Commit Graph

13 Commits

Author SHA1 Message Date
Jakub Jelinek 9393cb0db9 * dw2gencfi.c (EH_FRAME_ALIGNMENT): Define if not defined.
(output_cie): Don't pad.
	(output_fde): Add align argument.  Pad to align if not 0.
	(cfi_finish): Set .eh_frame alignment to EH_FRAME_ALIGNMENT.
	Pad just last FDE to EH_FRAME_ALIGNMENT.

	* gas/cfi/cfi-i386.d: Regenerated.
	* gas/cfi/cfi-common-1.d: Regenerated.
	* gas/cfi/cfi-common-2.d: Regenerated.
	* gas/cfi/cfi-common-3.d: Regenerated.
	* gas/cfi/cfi-x86_64.d: Regenerated.
	* gas/cfi/cfi-alpha-1.d: Regenerated.
	* gas/cfi/cfi-alpha-2.d: Regenerated.
	* gas/cfi/cfi-alpha-3.d: Regenerated.
2003-06-18 17:58:48 +00:00
Richard Henderson cdfbf930b9 * dw2gencfi.c (struct cfi_escape_data): New.
(cfi_add_CFA_nop): Remove.
        (CFI_escape, dot_cfi_escape): New.
        (dot_cfi): Remove nop.
        (cfi_pseudo_table): Remove nop; add escape.
        (output_cfi_insn): Likewise.
        (select_cie_for_fde): Stop on escape.
        * dw2gencfi.h (cfi_add_CFA_nop): Remove.
        * read.c, read.h (do_parse_cons_expression): New.
        * doc/as.texinfo (.cfi_escape): New.

        * gas/cfi/cfi-common-3.[ds]: New.
        * gas/cfi/cfi.exp: Run it.
2003-06-11 23:16:58 +00:00
Richard Henderson fa87b337c3 * dw2gencfi.c (struct cfa_save_data, cfa_save_stack): New.
(cfi_add_CFA_offset): Detect invalid offsets.
        (cfi_add_CFA_remember_state): Save cur_cfa_offset.
        (cfi_add_CFA_restore_state): Restore it.
        (CFI_rel_offset): New.
        (cfi_pseudo_table): Add it.
        (dot_cfi): Handle it.

        * gas/cfi/cfi-common-1.d, gas/cfi/cfi-common-1.s: New.
        * gas/cfi/cfi-common-2.d, gas/cfi/cfi-common-2.s: New.
        * gas/cfi/cfi-diag-1.d, gas/cfi/cfi-diag-1.s: New.
        * gas/cfi/cfi.exp: Run them.
2003-06-08 03:59:44 +00:00
Michal Ludvig 2be24b54a9 2003-06-05 Michal Ludvig <mludvig@suse.cz>
* dw2gencfi.c (cfi_add_CFA_insn, cfi_add_CFA_insn_reg)
	(cfi_add_CFA_insn_reg_reg, cfi_add_CFA_insn_reg_offset): New.
	(cfi_add_CFA_offset, cfi_add_CFA_def_cfa)
	(cfi_add_CFA_register, cfi_add_CFA_def_cfa_register)
	(cfi_add_CFA_def_cfa_offset): Use cfi_add_CFA_insn_*().
	(cfi_add_CFA_restore, cfi_add_CFA_undefined)
	(cfi_add_CFA_same_value, cfi_add_CFA_remember_state)
	(cfi_add_CFA_restore_state, cfi_add_CFA_nop): New.
	(cfi_pseudo_table): New directives .cfi_return_column,
	.cfi_restore, .cfi_undefined, .cfi_same_value,
	.cfi_remember_state, .cfi_restore_state, .cfi_nop.
	(dot_cfi, output_cfi_insn): Handle new directives.
	* dw2gencfi.h (cfi_add_CFA_restore, cfi_add_CFA_undefined)
	(cfi_add_CFA_same_value, cfi_add_CFA_remember_state)
	(cfi_add_CFA_restore_state, cfi_add_CFA_nop): New prototypes.
2003-06-05 09:23:47 +00:00
Richard Henderson 1233ae6299 * dw2gencfi.c (output_cfi_insn): Fix typo for negative offsets. 2003-06-05 06:53:40 +00:00
Richard Henderson 757bc39371 * dw2gencfi.c (cfi_finish): Set .eh_frame read-only. 2003-06-05 05:25:38 +00:00
Alan Modra ed7d5d1a43 * read.c (emit_expr): Set dot_value.
* dw2gencfi.c (output_fde): Remove pcrel reloc hack.
2003-06-02 22:48:59 +00:00
Richard Henderson eafbc43f93 * dw2gencfi.c (output_fde): Use fix_new to emit pc-relative reloc.
(cfi_finish): Set flag_traditional_format around .eh_frame data.

        * gas/alpha/elf-reloc-8.d: Correct .eh_frame relocs.
        * gas/cfi/cfi-alpha-2.d: New.
        * gas/cfi/cfi-alpha-2.s: New.
        * gas/cfi/cfi.exp: Run it.
2003-05-31 19:36:45 +00:00
Richard Henderson a4447b9378 * dw2gencfi.c, dw2gencfi.h: Rewrite from scratch.
* as.c (main): Always call cfi_finish.
        * config/tc-i386.c (x86_dwarf2_return_column): New.
        (x86_cie_data_alignment): New.
        (md_begin): Set them.
        (tc_x86_cfi_init): Remove.
        (tc_x86_regname_to_dw2regnum): Fix 32-bit register numbers;
        return int, not unsigned long; don't as_bad here.
        (tc_x86_frame_initial_instructions): Streamline; use
        updated api.
        * config/tc-i386.h (tc_cfi_init): Remove.
        (DWARF2_DEFAULT_RETURN_COLUMN): New.
        (DWARF2_CIE_DATA_ALIGNMENT): New.

        * gas/cfi/cfi-i386.d: Update for dw2gencfi rewrite.
        * gas/cfi/cfi-x86_64.d: Likewise.
        * gas/cfi/cfi-i386-2.d: New.
        * gas/cfi/cfi-i386-2.s: New.
2003-05-27 16:52:49 +00:00
Nick Clifton 7ed2c8b026 Fix dw3gencfi.c so that it will build on targets that do not define BFD_ASSEMBLER. 2003-05-21 11:31:07 +00:00
Michal Ludvig 39b8215104 2003-05-20 Michal Ludvig <mludvig@suse.cz>
* as.c (main): Remove tc_cfi_init().
	* dw2gencfi.c (cfi_parse_arg): Allow regnames beginning
	with '%'.
	(cfi_pseudo_table): Add "cfi_register" entry.
	(cfi_make_insn): Handle CFA_register.
	(cfi_output_insn): Ditto.
	(dot_cfi): Ditto.
	(cfi_get_label): Add 'simple' modifier to .cfi_startproc.
	(dot_cfi_endproc): Reuse already emitted CIEs.
	* testsuite/gas/cfi/cfi-i386.d: New pattern.
	* testsuite/gas/cfi/cfi-x86-64.d: Ditto.
2003-05-20 14:31:44 +00:00
Alan Modra 7c0295b157 * dw2gencfi.c (cfi_parse_arg): Only use tc_regname_to_dw2regnum if
defined.
	(dot_cfi_endproc): Avoid C99 construct.
2003-05-20 11:35:45 +00:00
Alan Modra 54cfded08e * dw2gencfi.c, dw2gencfi.h: New files.
* config/tc-i386.c (tc_x86_cfi_init): New function.
	* config/tc-i386.h (TARGET_USE_CFIPOP, tc_cfi_init): New defines.
	* as.c (parse_args): Set verbose flag on --verbose.
	(main): Call tc_cfi_init()/cfi_finish().
	* as.h (verbose): New external variable.
	* read.c (pobegin): Insert CFI pops to the list.
	* symbols.c (local_symbol_make): Make symbol external.
	* symbols.h (local_symbol_make): New prototype.
	* Makefile.am: Add dw2gencfi.[ch] files.  Run "make dep-am".
	* Makefile.in: Regenerate.
	* doc/as.texinfo: Added node "CFI directives" with description of
	all implemented .cfi_* directives.
	* doc/Makefile.in: Regenerate.
	* po/POTFILES.in: Regenerate.
2003-05-20 07:58:07 +00:00