aboutsummaryrefslogtreecommitdiff
path: root/gas/dw2gencfi.c
AgeCommit message (Collapse)AuthorFilesLines
2010-03-152010-03-15 Thomas Schwinge <thomas@codesourcery.com>Thomas Schwinge1-2/+2
* dw2gencfi.c (output_cie): Consider emitting the S augmentation in all cases, and not only for .eh_frame.
2010-03-152010-03-15 Thomas Schwinge <thomas@codesourcery.com>Thomas Schwinge1-17/+19
* dw2gencfi.c (output_cie): Make it more explicit which code paths belong to .eh_frame only.
2009-12-11Add -Wshadow to the gcc command line options used when compiling the binutils.Nick Clifton1-1/+0
Fix up all warnings generated by the addition of this switch.
2009-11-042009-11-04 Daniel Jacobowitz <dan@codesourcery.com>Maxim Kuvyrkov1-2/+10
Maxim Kuvyrkov <maxim@codesourcery.com> * config/tc-m68k.h (CF_DIFF_EXPR_OK): Define to 0 for uClinux. (CFI_DIFF_LSDA_OK): Define. * config/te-uclinux.h: New file. * configure.tgt (m68k-uclinux): Define em. * dw2gencfi.c (CFI_DIFF_LSDA_OK): New macro. (dot_cfi_lsda, output_fde): Use instead of CFI_DIFF_EXPR_OK.
2009-10-02 * dw2gencfi.c: Include dwarf2dbg.h.Jakub Jelinek1-57/+255
(DWARF2_FORMAT): Define if not defined. (dot_cfi_sections): New function. (cfi_pseudo_table): Handle .cfi_sections. (CFI_EMIT_eh_frame, CFI_EMIT_debug_frame): Define. (cfi_sections): New variable. (output_cie, output_fde, select_cie_for_fde): Add eh_frame argument, add supporting for outputting .debug_frame section. (cfi_change_reg_numbers): New function or macro. (cfi_finish): Only emit .eh_frame if cfi_sections & CFI_EMIT_eh_frame. Emit .debug_frame if cfi_sections & CFI_EMIT_debug_frame. * config/tc-ppc.h (md_reg_eh_frame_to_debug_frame): Define. * doc/as.texinfo (CFI directives): Document .cfi_sections.
2009-09-11 * po/bfd.pot: Updated by the Translation project.Nick Clifton1-10/+14
* po/binutils.pot: Updated by the Translation project. * po/gold.pot: Updated by the Translation project. * po/gold.pot: Updated by the Translation project. * po/gprof.pot: Updated by the Translation project. * po/sv.po: Updated Swedish translation. * po/ld.pot: Updated by the Translation project. * po/fi.po: Updated Finnish translation. * po/ld.pot: Updated by the Translation project. * po/fi.po: Updated Finnish translation. Updated sources to compile cleanly with -Wc++-compat: * basic_blocks.c: Add casts. * cg_dfn.c: Add cast. * corefile.c: Add casts. * gmon_io.c: Add casts. * hist.c: Add cast. * source.c: Add cast. * sym_ids.c (struct match): Moved to top level. Updated soruces in ld/* to compile cleanly with -Wc++-compat: * ld.h (enum endian_enum,enum symbolic_enum,enum dynamic_list_enum): Move to top level. * ldcref.c: Add casts. * ldctor.c: Add casts. * ldexp.c * ldexp.h (enum node_tree_enum,enum phase_enum): Move to top level. * ldlang.c: Add casts. (lang_insert_orphan): Use enum name instead of integer. * ldlang.h (enum statement_enum): Move to top level. * ldmain.c: Add casts. * ldwrite.c: Add casts. * lexsup.c: Add casts. (enum control_enum): Move to top level. * mri.c: Add casts. (mri_draw_tree): Use enum name instead of integer. Updated sources to compile cleanly with -Wc++-compat: * basic_blocks.c: Add casts. * cg_dfn.c: Add cast. * corefile.c: Add casts. * gmon_io.c: Add casts. * hist.c: Add cast. * source.c: Add cast. * sym_ids.c (struct match): Moved to top level. * as.c (main): Call dwarf2_init. * config/obj-elf.c (struct group_list): New field. (build_group_lists): Use hash lookup. (free_section_idx): New function. (elf_frob_file): Adjust. * dwarf2dbg.c (all_segs_hash, last_seg_ptr): New variables. (get_line_subseg): Adjust. (dwarf2_init): New function. * dwarf2dbg.h (dwarf2_init): New declaration.
2009-06-22 * gas/app, gas/as.c, gas/as.h, gas/atof-generic.c, gas/cgen.c,Nick Clifton1-1/+1
gas/config/atof-ieee.c, gas/config/obj-aout.c, gas/config/obj-coff.c, gas/config/obj-ecoff.c, gas/config/obj-elf.c, gas/config/obj-som.c, gas/config/tc-alpha.c, gas/config/tc-arc.c, gas/config/tc-arm.c, gas/config/tc-cr16.c, gas/config/tc-cris.c, gas/config/tc-crx.c, gas/config/tc-d30v.c, gas/config/tc-dlx.c, gas/config/tc-hppa.c, gas/config/tc-i370.c, gas/config/tc-i386-intel.c, gas/config/tc-i386.c, gas/config/tc-i860.c, gas/config/tc-i960.c, gas/config/tc-ia64.c, gas/config/tc-iq2000.c, gas/config/tc-m32c.c, gas/config/tc-m32r.c, gas/config/tc-m68hc11.c, gas/config/tc-m68k.c, gas/config/tc-maxq.c, gas/config/tc-mcore.c, gas/config/tc-mep.c, gas/config/tc-mips.c, gas/config/tc-mmix.c, gas/config/tc-mn10300.c, gas/config/tc-moxie.c, gas/config/tc-ns32k.c, gas/config/tc-pj.c, gas/config/tc-ppc.c, gas/config/tc-s390.c, gas/config/tc-score.c, gas/config/tc-score7.c, gas/config/tc-sh.c, gas/config/tc-sparc.c, gas/config/tc-spu.c, gas/config/tc-tic30.c, gas/config/tc-vax.c, gas/config/tc-xtensa.c, gas/config/xtensa-relax.c, gas/dw2gencfi.c, gas/dwarf2dbg.c, gas/ehopt.c, gas/expr.c, gas/frags.c, gas/input-file.c, gas/read.c, gas/sb.c, gas/subsegs.c, gas/symbols.c, gas/write.c: Change the name of the gas macro `assert' to `gas_assert'.
2009-06-09 * dw2gencfi.c (output_cfi_insn): Initialize fragment before rs_cfaJakub Jelinek1-2/+3
to DW_CFA_advance_loc4. * gas/cfi/cfi-common-7.d: New test. * gas/cfi/cfi-common-7.s: New. * gas/cfi/cfi.exp: Add cfi-common-7 test.
2008-11-28 * Makefile.am (ehopt.o): Add struc-symbol.h.Jakub Jelinek1-6/+6
* Makefile.in: Regenerated. * ehopt.c: Include struc-symbol.h. (check_eh_frame): For very small O_constant DW_CFA_advance_loc4 create correct DW_CFA_advance_loc. Handle O_subtract only for code alignment factor 1, otherwise handle O_divide or O_right_shift of O_subtract and O_constant. (eh_frame_estimate_size_before_relax): Always divide by ca. (eh_frame_convert_frag): Likewise. * dw2gencfi.c (output_cfi_insn): Scale DW_CFA_advance_loc1, DW_CFA_advance_loc2 and DW_CFA_advance_loc4 outputs.
2008-10-09 * dw2gencfi.c (cfi_finish): Deal with md_fix_up_eh_frame.Eric Botcazou1-0/+4
* config/tc-i386.h (md_fix_up_eh_frame): Define on Solaris. (i386_solaris_fix_up_eh_frame): Declare. * config/tc-i386.c (i386_solaris_fix_up_eh_frame): New function.
2008-09-30 * dw2gencfi.c (output_cfi_insn): Fix typo in invocation ofAlan Modra1-1/+1
tc_cfi_emit_pcrel_expr macro.
2008-09-24include/Richard Henderson1-4/+142
* elf/dwarf2.h (DW_OP_GNU_encoded_addr): New. binutils/ * dwarf.c (size_of_encoded_value, get_encoded_value): Move up. (decode_location_expression): Add section parameter. Handle DW_OP_GNU_encoded_addr. (read_and_display_attr_value): Update decode_location_expression call. (display_debug_loc, display_debug_frames): Likewise. gas/ * dw2gencfi.c (DWARF2_ADDR_SIZE): Provide default. (struct cfi_insn_data): Add ea member. (CFI_val_encoded_addr, dot_cfi_val_encoded_addr): New. (output_cfi_insn): Handle CFI_val_encoded_addr. (select_cie_for_fde): Don't match CFI_val_encoded_addr. * doc/as.texinfo (.cfi_val_encoded_addr): Document.
2008-09-07 * dw2gencfi.c (CFI_DIFF_EXPR_OK): Define if not defined.Dave Anglin1-6/+15
(dot_cfi_personality): Use CFI_DIFF_EXPR_OK instead of DIFF_EXPR_OK. (dot_cfi_lsda, output_cie, output_fde): Likewise. * config/tc-hppa.h (CFI_DIFF_EXPR_OK): Define.
2008-08-21 * dw2gencfi.c (DWARF2_FDE_RELOC_SIZE): New.Richard Henderson1-8/+34
(output_cie, output_fde): Use it. (DWARF2_EH_FRAME_READ_ONLY): New. (cfi_finish): Use it. * config/tc-hppa.h (DWARF2_FDE_RELOC_SIZE): Set to 8 for 64-bit. (DWARF2_CIE_DATA_ALIGNMENT): Change sign. (DWARF2_EH_FRAME_READ_ONLY): New. * config/tc-hppa.c (tc_gen_reloc): Generate pc-relative relocations from the results of DIFF_EXPR_OK manipulation.
2008-02-13gas/Jan Beulich1-14/+23
2008-02-13 Jan Beulich <jbeulich@novell.com> * config/tc-i386.c (allow_pseudo_reg): New. (parse_real_register): Check for NULL just once. Allow all register table entries when allow_pseudo_reg is non-zero. Don't allow any registers without type when allow_pseudo_reg is zero. (tc_x86_regname_to_dw2regnum): Replace with ... (tc_x86_parse_to_dw2regnum): ... this. (tc_x86_frame_initial_instructions): Adjust for above change. * config/tc-i386.h (tc_regname_to_dw2regnum): Remove. (tc_parse_to_dw2regnum): New. (tc_x86_regname_to_dw2regnum): Replace with ... (tc_x86_parse_to_dw2regnum): ... this. * dw2gencfi.c (tc_parse_to_dw2regnum): New, broken out of ... (cfi_parse_reg): ... this. Use tc_parse_to_dw2regnum. Adjust error handling. gas/testsuite/ 2008-02-13 Jan Beulich <jbeulich@novell.com> * gas/cfi/cfi-i386.s: Add code testing use of all registers. Fix a few comments. * gas/cfi/cfi-x86_64.s: Likewise. * gas/cfi/cfi-i386.d, gas/cfi/cfi-x86_64.d: Adjust. opcodes/ 2008-02-13 Jan Beulich <jbeulich@novell.com> * i386-gen.c (process_i386_registers): Process new fields. * i386-opc.h (reg_entry): Shrink reg_flags and reg_num to unsigned char. Add dw2_regnum and Dw2Inval. * i386-reg.tbl: Provide initializers for dw2_regnum. Add pseudo register names. * i386-tbl.h: Re-generate.
2007-09-26gas/Jan Beulich1-12/+8
2007-09-26 Jan Beulich <jbeulich@novell.com> * dw2gencfi.c: Conditionalize whole body upon TARGET_USE_CFIPOP. (cfi_finish): Add second empty instance.
2007-07-03Switch to GPLv3Nick Clifton1-2/+2
2006-11-03 * dw2gencfi.c (struct fde_entry): Add per_encoding, lsda_encoding,Jakub Jelinek1-10/+262
personality and lsda. (struct cie_entry): Add per_encoding, lsda_encoding and personality. (alloc_fde_entry): Initialize per_encoding and lsda_encoding. (cfi_pseudo_table): Handle .cfi_personality and .cfi_lsda. (dot_cfi_personality, dot_cfi_lsda, encoding_size): New functions. (output_cie): Output personality including its encoding and LSDA encoding. (output_fde): Output LSDA. (select_cie_for_fde): Don't share CIE if personality, its encoding or LSDA encoding are different. Copy the 3 fields from fde_entry to cie_entry. * doc/as.texinfo (.cfi_personality, .cfi_lsda): Document. * gas/cfi/cfi-common-6.d: New test. * gas/cfi/cfi-common-6.s: New. * gas/cfi/cfi.exp: Add cfi-common-6 test.
2006-11-03 * subsegs.h (struct frchain): Add frch_cfi_data field.Jakub Jelinek1-39/+49
* dw2gencfi.c: Include subsegs.h. (cur_fde_data, last_address, cur_cfa_offset, cfa_save_stack): Removed. (struct frch_cfi_data): New type. (unused_cfi_data): New variable. (alloc_fde_entry): Move cur_fde_data, last_address, cur_cfa_offset and cfa_save_stack static vars into a structure pointed from each frchain. (alloc_cfi_insn_data, cfi_new_fde, cfi_end_fde, cfi_set_return_column, cfi_add_advance_loc, cfi_add_CFA_def_cfa, cfi_add_CFA_def_cfa_offset, cfi_add_CFA_remember_state, cfi_add_CFA_restore_state, dot_cfi, dot_cfi_escape, dot_cfi_startproc, dot_cfi_endproc, cfi_finish): Likewise. * gas/cfi/cfi-common-5.d: New test. * gas/cfi/cfi-common-5.s: New. * gas/cfi/cfi.exp: Add cfi-common-5 test.
2006-10-26 * dw2gencfi.c (cfi_add_CFA_offset):Ben Elliston1-0/+1
Assert DWARF2_CIE_DATA_ALIGNMENT is non-zero.
2006-02-27bfd/Jakub Jelinek1-2/+14
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle S flag. (_bfd_elf_write_section_eh_frame): Likewise. gas/ * dw2gencfi.c (struct fde_entry, struct cie_entry): Add signal_frame field. (CFI_signal_frame): Define. (cfi_pseudo_table): Add .cfi_signal_frame. (dot_cfi): Handle CFI_signal_frame. (output_cie): Handle cie->signal_frame. (select_cie_for_fde): Don't share CIE if signal_frame flag is different. Copy signal_frame from FDE to newly created CIE. * doc/as.texinfo: Document .cfi_signal_frame.
2005-11-17gas/Jan Beulich1-4/+18
2005-11-17 Jan Beulich <jbeulich@novell.com> * dw2gencfi.c (dot_cfi): Put argument parsing for cases DW_CFA_restore and DW_CFA_undefined in a loop.
2005-10-11This adjusts equate handling byNick Clifton1-1/+1
- allowing true forward references (which will always assume the referenced symbols have at the point of use) through the new .eqv pseudo-op and the new == operator - disallowing changing .equiv-generated equates (so that the protection this provides is both forward and backward) - snapshotting equates when their value gets changed so that previous uses don't get affected by the new value. - allowing expressions in places where absolute expressions (or register names) are needed which were not completely resolvable at the point of their definition but which are fully resolvable at the point of use In addition it fixes PR/288.
2005-09-28gas/Jan Beulich1-0/+9
2005-09-28 Jan Beulich <jbeulich@novell.com> * dw2gencfi.c (dot_cfi): Call ignore_rest_of_line when not fully parsing the input. (dot_cfi_startproc): Likewise. (dot_cfi_endproc): Likewise. Also check no extra input was given. (dot_cfi_escape): Likewise.
2005-08-11 * README-vms: Delete.Alan Modra1-7/+1
* config-gas.com: Delete. * makefile.vms: Delete. * vmsconf.sh: Delete. * config/atof-tahoe.c: Delete. * config/m88k-opcode.h: Delete. * config/obj-bout.c: Delete. * config/obj-bout.h: Delete. * config/obj-hp300.c: Delete. * config/obj-hp300.h: Delete. * config/tc-a29k.c: Delete. * config/tc-a29k.h: Delete. * config/tc-h8500.c: Delete. * config/tc-h8500.h: Delete. * config/tc-m88k.c: Delete. * config/tc-m88k.h: Delete. * config/tc-tahoe.c: Delete. * config/tc-tahoe.h: Delete. * config/tc-tic80.c: Delete. * config/tc-tic80.h: Delete. * config/tc-w65.c: Delete. * config/tc-w65.h: Delete. * config/te-aux.h: Delete. * config/te-delt88.h: Delete. * config/te-delta.h: Delete. * config/te-dpx2.h: Delete. * config/te-hp300.h: Delete. * config/te-ic960.h: Delete. * config/vms-a-conf.h: Delete. * doc/c-a29k.texi: Delete. * doc/c-h8500.texi: Delete. * doc/c-m88k.texi: Delete. * README: Remove obsolete examples, and list of supported targets. * Makefile.am: Remove a29k, h8500, m88k, tahoe, tic80, w65, bout and hp300 support. (DEP_FLAGS): Don't define BFD_ASSEMBLER. * configure.in: Remove --enable-bfd-assembler, need_bfd, primary_bfd_gas. * configure.tgt: Remove a29k, h8300-coff, h8500-*, i960 non-elf, m68k non bfd, m88k, or32-coff, tic80-*, vax non-bfd, w65k-*, *-nindy. * as.c: Remove all non-BFD_ASSEMBLER code, support for above targets. * as.h: Likewise. * dw2gencfi.c: Likewise. * dwarf2dbg.c: Likewise. * ehopt.c: Likewise. * input-file.c: Likewise. * listing.c: Likewise. * literal.c: Likewise. * messages.c: Likewise. * obj.h: Likewise. * output-file.c: Likewise. * read.c: Likewise. * stabs.c: Likewise. * struc-symbol.h: Likewise. * subsegs.c: Likewise. * subsegs.h: Likewise. * symbols.c: Likewise. * symbols.h: Likewise. * tc.h: Likewise. * write.c: Likewise. * write.h: Likewise. * config/aout_gnu.h: Likewise. * config/obj-aout.c: Likewise. * config/obj-aout.h: Likewise. * config/obj-coff.c: Likewise. * config/obj-coff.h: Likewise. * config/obj-evax.h: Likewise. * config/obj-ieee.h: Likewise. * config/tc-arm.c: Likewise. * config/tc-arm.h: Likewise. * config/tc-avr.c: Likewise. * config/tc-avr.h: Likewise. * config/tc-crx.h: Likewise. * config/tc-d10v.h: Likewise. * config/tc-d30v.h: Likewise. * config/tc-dlx.h: Likewise. * config/tc-fr30.h: Likewise. * config/tc-frv.h: Likewise. * config/tc-h8300.c: Likewise. * config/tc-h8300.h: Likewise. * config/tc-hppa.h: Likewise. * config/tc-i370.h: Likewise. * config/tc-i386.c: Likewise. * config/tc-i386.h: Likewise. * config/tc-i860.h: Likewise. * config/tc-i960.c: Likewise. * config/tc-i960.h: Likewise. * config/tc-ip2k.h: Likewise. * config/tc-iq2000.h: Likewise. * config/tc-m32c.h: Likewise. * config/tc-m32r.h: Likewise. * config/tc-m68hc11.h: Likewise. * config/tc-m68k.c: Likewise. * config/tc-m68k.h: Likewise. * config/tc-maxq.c: Likewise. * config/tc-maxq.h: Likewise. * config/tc-mcore.c: Likewise. * config/tc-mcore.h: Likewise. * config/tc-mn10200.h: Likewise. * config/tc-mn10300.c: Likewise. * config/tc-mn10300.h: Likewise. * config/tc-ms1.h: Likewise. * config/tc-msp430.c: Likewise. * config/tc-msp430.h: Likewise. * config/tc-ns32k.c: Likewise. * config/tc-ns32k.h: Likewise. * config/tc-openrisc.h: Likewise. * config/tc-or32.c: Likewise. * config/tc-or32.h: Likewise. * config/tc-ppc.c: Likewise. * config/tc-ppc.h: Likewise. * config/tc-s390.h: Likewise. * config/tc-sh.c: Likewise. * config/tc-sh.h: Likewise. * config/tc-sparc.c: Likewise. * config/tc-tic30.c: Likewise. * config/tc-tic30.h: Likewise. * config/tc-tic4x.c: Likewise. * config/tc-tic4x.h: Likewise. * config/tc-tic54x.c: Likewise. * config/tc-tic54x.h: Likewise. * config/tc-v850.h: Likewise. * config/tc-vax.c: Likewise. * config/tc-vax.h: Likewise. * config/tc-xstormy16.h: Likewise. * config/tc-xtensa.h: Likewise. * config/tc-z8k.c: Likewise. * config/tc-z8k.h: Likewise. * config/vms-a-conf.h * doc/Makefile.am: Likewise. * doc/all.texi: Likewise. * doc/as.texinfo: Likewise. * doc/Makefile.in: Regenerate. * Makefile.in: Regenerate. * configure: Regenerate. * config.in: Regenerate. * po/POTFILES.in: Regenerate.
2005-05-05Update the address and phone number of the FSFNick Clifton1-2/+2
2005-02-16 * dw2gencfi.c (output_cie, output_fde): Use DW_CFA_nop ratherAlan Modra1-3/+3
than zero.
2004-12-16gas/Jan Beulich1-0/+1
2004-12-15 Jan Beulich <jbeulich@novell.com> * dw2gencfi.c (dot.cfi.startproc): Clear cur_cfa_offset so '.cfi_startproc simple' doesn't inherit the old value.
2004-12-16gas/Jan Beulich1-2/+2
2004-12-15 Jan Beulich <jbeulich@novell.com> * dw2gencfi.c (output_cfi_insn): Adjust DW_CFA_def_cfa_sf generation to emit a signed and factored offset. Adjust DW_CFA_def_cfa_offset_sf generation to emit a factored offset.
2004-10-07When separating CIE out from FDE, treat a DW_CFA_remember_state as we do aNick Clifton1-22/+27
DW_CFA_advance_loc. Test to make sure that this feature continues to work.
2004-09-09 * dw2gencfi.c (select_cie_for_fde): When separating CIE outAlan Modra1-3/+8
from FDE, treat a CFI_escape as we do a DW_CFA_advance_loc.
2004-05-13Handle dwarf3 format CIE entries.Nick Clifton1-1/+4
2004-03-07 * dw2gencfi.c (output_cie): Align length to 4 byte boundary.Richard Henderson1-3/+3
(cfi_finish): Likewise for fde. * gas/alpha/elf-reloc-8.d, gas/cfi/cfi-alpha-1.d, gas/cfi/cfi-alpha-2.d, gas/cfi/cfi-alpha-3.d, gas/cfi/cfi-common-1.d, gas/cfi/cfi-common-2.d, gas/cfi/cfi-common-3.d: Adjust offsets.
2003-08-29s/.cfi_gnu_window_save/.cfi_window_save/gJakub Jelinek1-1/+1
2003-08-29 * dw2gencfi.c (cfi_pseudo_table): Add cfi_gnu_window_save.Jakub Jelinek1-1/+26
(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.
2003-06-18 * dw2gencfi.c (EH_FRAME_ALIGNMENT): Define if not defined.Jakub Jelinek1-5/+13
(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-11 * dw2gencfi.c (struct cfi_escape_data): New.Richard Henderson1-12/+53
(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-08 * dw2gencfi.c (struct cfa_save_data, cfa_save_stack): New.Richard Henderson1-0/+41
(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-052003-06-05 Michal Ludvig <mludvig@suse.cz>Michal Ludvig1-40/+160
* 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 * dw2gencfi.c (output_cfi_insn): Fix typo for negative offsets.Richard Henderson1-1/+1
2003-06-05 * dw2gencfi.c (cfi_finish): Set .eh_frame read-only.Richard Henderson1-1/+1
2003-06-02 * read.c (emit_expr): Set dot_value.Alan Modra1-9/+1
* dw2gencfi.c (output_fde): Remove pcrel reloc hack.
2003-05-31 * dw2gencfi.c (output_fde): Use fix_new to emit pc-relative reloc.Richard Henderson1-1/+16
(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-27 * dw2gencfi.c, dw2gencfi.h: Rewrite from scratch.Richard Henderson1-627/+597
* 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-21Fix dw3gencfi.c so that it will build on targets that do not define ↵Nick Clifton1-4/+11
BFD_ASSEMBLER.
2003-05-202003-05-20 Michal Ludvig <mludvig@suse.cz>Michal Ludvig1-35/+134
* 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 * dw2gencfi.c (cfi_parse_arg): Only use tc_regname_to_dw2regnum ifAlan Modra1-2/+5
defined. (dot_cfi_endproc): Avoid C99 construct.
2003-05-20 * dw2gencfi.c, dw2gencfi.h: New files.Alan Modra1-0/+721
* 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.