aboutsummaryrefslogtreecommitdiff
path: root/gcc/unwind-dw2.c
AgeCommit message (Collapse)AuthorFilesLines
2004-09-30unwind-dw2.c (_Unwind_GetGR): Honor DWARF_ZERO_REG.Richard Henderson1-0/+5
* unwind-dw2.c (_Unwind_GetGR): Honor DWARF_ZERO_REG. * doc/tm.texi (DWARF_ZERO_REG): New. * config/alpha/alpha.c (alpha_sa_mask, alpha_expand_prologue, alpha_expand_epilogue): Revert 2003-09-30 change to store zero. * config/alpha/alpha.h (DWARF_ZERO_REG): New. From-SVN: r88331
2004-09-20tsystem.h (alloca): Provide a default definition.Kaveh R. Ghazi1-1/+1
* tsystem.h (alloca): Provide a default definition. Revert: 2001-08-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * unwind-dw2.c: Call __builtin_alloca, not alloca. From-SVN: r87775
2004-09-08tm.texi (MD_UNWIND_SUPPORT): Document.Alan Modra1-10/+8
* doc/tm.texi (MD_UNWIND_SUPPORT): Document. (MD_FALLBACK_FRAME_STATE_FOR): Update. * unwind-dw2.c (MD_UNWIND_SUPPORT): #include if defined. (uw_frame_state_for): Adjust MD_FALLBACK_FRAME_STATE_FOR invocation. (MD_FROB_UPDATE_CONTEXT): Remove default. (uw_update_context_1): Instead #ifdef invocation. * config/ia64/unwind-ia64.c (MD_UNWIND_SUPPORT): #include if defined. (uw_frame_state_for): Adjust MD_FALLBACK_FRAME_STATE_FOR invocation. * config/alpha/gnu.h (MD_FALLBACK_FRAME_STATE_FOR): Don't undef. (MD_UNWIND_SUPPORT): Undefine this instead. * config/i386/gnu.h: Likewise. * config/alpha/linux-unwind.h: New file, macro converted to function, extracted from.. * config/alpha/linux.h (MD_FALLBACK_FRAME_STATE_FOR): ..this. (MD_UNWIND_SUPPORT): Define. * config/alpha/vms-unwind.h, config/alpha/vms.h: Likewise. * config/i386/linux-unwind.h, config/i386/linux.h, config/i386/linux64.h: Likewise. * config/ia64/linux-unwind.h, config/ia64/linux.h: Likewise. MD_HANDLE_UNWABI too. * config/mips/linux-unwind.h, config/mips/linux.h: Likewise. * config/pa/linux-unwind.h, config/pa/pa32-linux.h: Likewise. * config/rs6000/darwin-unwind.h, config/rs6000/darwin.h: Likewise. * config/s390/linux-unwind.h, config/s390/linux.h: Likewise. * config/sparc/linux-unwind.h, config/sparc/linux.h, config/sparc/linux64.h: Likewise. * config/sh/linux-unwind.h, config/sh/linux.h: Likewise, but merge SH_FALLBACK_FRAME_FLOAT_STATE into sh_fallback_frame_state. * config/rs6000/linux-unwind.h, config/rs6000/linux.h, config/rs6000/linux64.h: Likewise. Split out get_sigcontext function. Use ARG_POINTER_REGNUM for 32-bit temp reg too. From-SVN: r87167
2004-09-03re PR target/14925 (libunwind enabled gcc generates incompatible libgcc_s.so.1)H.J. Lu1-0/+20
2004-09-03 H.J. Lu <hongjiu.lu@intel.com> PR target/14925: Makefile.in (LIB2ADDEHSTATIC): New. (LIB2ADDEHSHARED): New. (LIBUNWIND): New. (LIBUNWINDDEP): New. (SHLIBUNWIND_LINK): New. (SHLIBUNWIND_INSTALL): New. (libgcc.mk): Pass LIB2ADDEHSTATIC, LIB2ADDEHSHARED, LIBUNWIND, LIBUNWINDDEP, SHLIBUNWIND_LINK and SHLIBUNWIND_INSTALL. (clean): Remove libunwind* (stage1-start): Remove and copy stage1/libunwind*. (stage2-start): Remove and copy stage2/libunwind*. (stage3-start): Remove and copy stage3/libunwind*. (stage4-start): Remove and copy stage4/libunwind*. (stageprofile-start): Remove and copy stageprofile/libunwind*. (stagefeedback-start): Remove and copy stagefeedback/libunwind*. * config.gcc (ia64*-*-linux*): Always add t-libunwind to tmake_file. Add t-libunwind-elf and ia64/t-glibc-libunwind to tmake_file if --with-system-libunwind isn't used. * config/ia64/t-glibc-libunwind: New file. * config/t-libunwind-elf: Likewise. * unwind-compat.c: Likewise. * unwind-compat.h: Likewise. * unwind-dw2-fde-compat.c: Likewise. * config/ia64/t-glibc (LIB2ADDEH): Updated. * config/ia64/t-hpux (T_CFLAGS): Add -DUSE_LIBUNWIND_EXCEPTIONS. * config/ia64/unwind-ia64.c: Include "unwind-compat.h". Define aliases if needed. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * config/t-libunwind (LIB2ADDEH): Updated. (LIB2ADDEHSTATIC): New. (T_CFLAGS): Add -DUSE_LIBUNWIND_EXCEPTIONS. (TARGET_LIBGCC2_CFLAGS): Set to -DUSE_GAS_SYMVER. * configure.ac: Change --enable-libunwind-exceptions to --with-system-libunwind. Don't define USE_LIBUNWIND_EXCEPTIONS. * configure: Regenerated. * config.in: Updated. * doc/install.texi (ia64-*-linux): Require libunwind 0.98 or above and mention --with-system-libunwind. (ia64-*-hpux*): Mention --enable-libunwind-exceptions is removed in gcc 3.4.3 and later. * gcc.c (init_spec): Add -lunwind to -lgcc_s if USE_LIBUNWIND_EXCEPTIONS is defined. * mklibgcc.in: Support libunwind. From-SVN: r87066
2004-08-19unwind-dw2-fde.c (get_cie_encoding): Cast argument to strlen to eliminate ↵Ulrich Weigand1-1/+1
warning. * unwind-dw2-fde.c (get_cie_encoding): Cast argument to strlen to eliminate warning. (linear_search_fdes): Declare p as unsigned. (binary_search_mixed_encoding_fdes): Likewise. * unwind-dw2.c (get_cie_encoding): Cast argument to strlen to eliminate warning. * config/s390/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Add missing type cast. From-SVN: r86280
2004-08-09unwind-dw2.c (uw_install_context_1): Update target saved stack pointer.Paul Brook1-16/+19
* unwind-dw2.c (uw_install_context_1): Update target saved stack pointer. Co-Authored-By: Richard Henderson <rth@redhat.com> From-SVN: r85723
2004-07-01Index: gcc/ChangeLogGeoffrey Keating1-59/+4
2004-06-28 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> PR 15813 * dwarf2out.c (reg_save): Output DW_CFA_same_value when a register is saved in itself. (initial_return_save): If the return address is a register, it's already there, don't bother to mention it in the CFI. (struct queued_reg_save): Add field saved_reg. (struct reg_saved_in_data): New. (regs_saved_in_regs): New. (num_regs_saved_in_regs): New. (queue_reg_save): Add extra parameter to specify register saved in register. Remove duplicate entries from queue. Add comment for function. (flush_queued_reg_saves): Handle registers saved in registers. Update regs_saved_in_regs. Add comment for function. (clobbers_queued_reg_save): Add comment for function. Allow for regs_saved_in_regs. (reg_saved_in): New. (dwarf2out_frame_debug_expr): Handle saving registers in other registers. (dwarf2out_frame_debug): Reset regs_saved_in_regs. * unwind-dw2.c (execute_cfa_program): Correct handling of DW_CFA_same_value. Add FIXME comment about incorrect implementation of DW_CFA_restore_extended. * config/rs6000/rs6000.c (rs6000_emit_prologue): Let dwarf2out_frame_debug_expr see instructions that save registers in other registers or save those other registers in memory. * unwind-dw2.c (DWARF_FRAME_REGISTERS): Move to unwind-dw2.h. (_Unwind_FrameState): Likewise. * unwind-dw2.h: New. * Makefile.in (LIB2ADDEHDEP): Add unwind-dw2.h. * config/rs6000/darwin-fallback.c: New file. * config/rs6000/darwin.h (MD_FALLBACK_FRAME_STATE_FOR): Define. * config/rs6000/t-darwin (LIB2FUNCS_EXTRA): Add darwin-fallback.o. Index: gcc/testsuite/ChangeLog 2004-06-26 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> * gcc.dg/cleanup-10.c: Run on all Linux platforms and powerpc-darwin. Use SA_RESETHAND rather than SA_ONESHOT. Trap SIGBUS as well as SIGSEGV. * gcc.dg/cleanup-11.c: Likewise. * gcc.dg/cleanup-8.c: Likewise. * gcc.dg/cleanup-9.c: Likewise. * gcc.dg/cleanup-5.c: Run on all platforms. Index: libjava/ChangeLog 2004-06-26 Geoffrey Keating <geoffk@apple.com> Andreas Tobler <a.tobler@schweiz.ch> * configure.host (powerpc-*-darwin*): New case, define can_unwind_signal. * configure.in (*-*-darwin*): New case, point to darwin-signal.h. * configure: Regenerate. * include/darwin-signal.h: New. Co-Authored-By: Andreas Tobler <a.tobler@schweiz.ch> From-SVN: r83953
2004-05-20unwind-dw2-fde.c (get_cie_encoding): Handle dwarf3 CIE format.Paul Brook1-2/+5
* unwind-dw2-fde.c (get_cie_encoding): Handle dwarf3 CIE format. * unwind-dw2.c (extract_cie_info): Ditto. (_Unwind_FrameState): Change retaddr_column to word type. From-SVN: r82072
2003-11-01unwind-dw2.c (_Unwind_FrameState): Remove commas at end of enumeration list.Andreas Jaeger1-2/+2
* unwind-dw2.c (_Unwind_FrameState): Remove commas at end of enumeration list. From-SVN: r73180
2003-11-01unwind-dw2.c (_Unwind_FindEnclosingFunction): Constify variable.Andreas Jaeger1-4/+4
* unwind-dw2.c (_Unwind_FindEnclosingFunction): Constify variable. (uw_frame_state_for): Constify variables. (extract_cie_info): Constify first argument. * unwind-dw2-fde-darwin.c: Adjust prototype of _Unwind_Find_registered_FDE for recent changes. (examine_objects): Constify return value and local variable result. (_Unwind_Find_FDE): Constify return value and local variable ret. From-SVN: r73172
2003-10-28irix6-libc-compat.c (inet_makeaddr): Prototype.Kaveh R. Ghazi1-0/+3
* config/mips/irix6-libc-compat.c (inet_makeaddr): Prototype. * crtstuff.c (__do_global_ctors_1): Move prototype. * unwind-dw2.c (NO_SIZE_OF_ENCODED_VALUE): Define when appropriate. * unwind-sjlj.c (_Unwind_GetCFA, _Unwind_FindEnclosingFunction): Mark parameter with __attribute__((unused)). From-SVN: r72999
2003-10-26unwind-dw2.c (_Unwind_GetGR): Avoid warning about unsigned comparison.Andreas Jaeger1-2/+2
* unwind-dw2.c (_Unwind_GetGR): Avoid warning about unsigned comparison. (_Unwind_SetGR): Likewise. From-SVN: r72960
2003-09-30dwarf2out.c (expand_builtin_init_dwarf_reg_sizes): Honor ↵Richard Henderson1-1/+8
DWARF_ALT_FRAME_RETURN_COLUMN. * dwarf2out.c (expand_builtin_init_dwarf_reg_sizes): Honor DWARF_ALT_FRAME_RETURN_COLUMN. * unwind-dw2.c (dwarf_reg_size_table): Expand by one. (_Unwind_GetGR, _Unwind_SetGR): Validate lookup column. (uw_frame_state_for): Return end-of-stack for null return address. * doc/tm.texi (DWARF_ALT_FRAME_RETURN_COLUMN): Add. * config/alpha/alpha.c (alpha_sa_mask): Add r31 for eh_return. (alpha_expand_prologue): Store a zero for it. (alpha_expand_epilogue): Don't reload it. * config/alpha/alpha.h (DWARF_ALT_FRAME_RETURN_COLUMN): New. * config/alpha/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Use column 64 for the sigframe return address. From-SVN: r71967
2003-08-19unwind-c.c: Add libgcc-style exception.Daniel Jacobowitz1-0/+9
* unwind-c.c: Add libgcc-style exception. * unwind-dw2.c: Likewise. * unwind-pe.h: Likewise. * unwind-sjlj.c: Likewise. * unwind.inc: Likewise. From-SVN: r70576
2003-07-16unwind-dw2.c (MD_FROB_UPDATE_CONTEXT): Define.Jakub Jelinek1-0/+7
* unwind-dw2.c (MD_FROB_UPDATE_CONTEXT): Define. (uw_update_context_1): Use it. * config/rs6000/rs6000.c (insn_after_throw): Remove. (rs6000_aix_emit_builtin_unwind_init): Save $r2 to its location in parent frame if _Unwind_* called directly instead of through .plt. (rs6000_emit_eh_toc_restore): Remove. (rs6000_emit_prologue): Update stack pointer before doing any saving if current_function_calls_eh_return. Generate unwind info for $r2. (rs6000_emit_epilogue): Restore stack pointer after doing all restoring if current_function_calls_eh_return. Restore $r2. * config/rs6000/rs6000-protos.h (rs6000_emit_eh_toc_restore): Remove. * config/rs6000/rs6000.md (eh_return): Remove call to rs6000_emit_eh_toc_restore. * config/rs6000/linux64.h (MD_FROB_UPDATE_CONTEXT): Define. * config/rs6000/aix.h (MD_FROB_UPDATE_CONTEXT): Define. * gcc.dg/cleanup-8.c: New test. * gcc.dg/cleanup-9.c: New test. From-SVN: r69450
2003-07-15dwarf2out.c (expand_builtin_init_dwarf_reg_sizes): If ↵J"orn Rennecke1-32/+73
DWARF_FRAME_RETURN_COLUMN doesn't have a register mode, use Pmode. 2003-07-15 J"orn Rennecke <joern.rennecke@superh.com> * dwarf2out.c (expand_builtin_init_dwarf_reg_sizes): If DWARF_FRAME_RETURN_COLUMN doesn't have a register mode, use Pmode. 2003-07-15 J"orn Rennecke <joern.rennecke@superh.com> Richard Henderson <rth@redhat.com> * unwind-dw2.c (_Unwind_GetGR): Use dwarf_reg_size_table to decide if to access a _Unwind_Ptr or a _Unwind_Word. (_Unwind_SetGR): Likewise. (_Unwind_GetPtr, _Unwind_SetSpColumn): New functions. (Unwind_SpTmp): New typedef. (uw_update_context_1): Use _Unwind_SetSpColumn and _Unwind_GetPtr. (uw_update_context): Use _Unwind_GetPtr. (init_dwarf_reg_size_table): Move above uw_init_context_1. (uw_init_context_1): Initialize dwarf_reg_size_table if necessary. Use _Unwind_SetSpColumn. (uw_install_context_1): Don't initialize dwarf_reg_size_table. Use _Unwind_GetPtr. Co-Authored-By: Richard Henderson <rth@redhat.com> From-SVN: r69424
2003-05-13unwind-dw2.c (uw_init_context_1): Don't pass &outer_cfa directly to ↵Richard Sandiford1-1/+3
_Unwind_SetGRPtr(). * unwind-dw2.c (uw_init_context_1): Don't pass &outer_cfa directly to _Unwind_SetGRPtr(). From-SVN: r66753
2003-05-10except.c (EH_RETURN_STACKADJ_RTX): Do not define.Ulrich Weigand1-15/+26
* except.c (EH_RETURN_STACKADJ_RTX): Do not define. (EH_RETURN_HANDLER_RTX): Likewise. (expand_builtin_eh_return): Do not copy stack adjustment if EH_RETURN_STACKADJ_RTX is not defined. (expand_eh_return): Likewise. Also, do not pass stack adjustment as argument to the eh_return pattern. * except.h (MUST_USE_SJLJ_EXCEPTIONS): Do not define just because EH_RETURN_STACKADJ_RTX is not defined. * unwind-dw.c (uw_update_context_1): If EH_RETURN_STACKADJ_RTX is not defined, treat stack pointer like a regular register. (uw_init_context_1): Set up fake initial stack pointer register. (uw_install_context_1): Do not compute stack adjustment if EH_RETURN_STACKADJ_RTX is not defined. * config/i386/i386.md ("eh_return"): Remove first argument. * config/mips/mips.md ("eh_return"): Likewise. * config/rs6000/rs6000.md ("eh_return"): Likewise. * config/sh/sh.md ("eh_return"): Likewise. * config/s390/s390.h (EH_RETURN_STACKADJ_RTX): Remove. From-SVN: r66672
2003-05-07unwind-dw2.c (_Unwind_GetGR): Cast pointer to _Unwind_Ptr, not _Unwind_Word.Richard Henderson1-1/+1
* unwind-dw2.c (_Unwind_GetGR): Cast pointer to _Unwind_Ptr, not _Unwind_Word. From-SVN: r66581
2003-05-06unwind-dw2.c (uw_update_context_1): Only set cfa as sp if previous frame ↵Richard Henderson1-7/+21
didn't save sp. * unwind-dw2.c (uw_update_context_1): Only set cfa as sp if previous frame didn't save sp. Clear sp for next frame. (uw_install_context_1): Honor saved sp from frame. From-SVN: r66526
2003-05-03builtins.c (expand_builtin): Remove.Richard Henderson1-19/+27
* builtins.c (expand_builtin) <BUILT_IN_DWARF_FP_REGNUM>: Remove. <BUILT_IN_DWARF_SP_COLUMN>: New. * builtins.def (BUILT_IN_DWARF_FP_REGNUM): Remove. (BUILT_IN_DWARF_SP_COLUMN): New. * dwarf2out.c (expand_builtin_dwarf_fp_regnum): Remove. (expand_builtin_dwarf_sp_column): New. * except.h: Update to match. * unwind-dw2.c (execute_stack_op): Correct stack push typo. (execute_cfa_program): Record location expression address before extracting length. (uw_update_context_1): Install old CFA into stack pointer column. (uw_init_context_1): Set cfa_reg to stack pointer column. From-SVN: r66447
2003-04-19Part 2 of the SCO port update. This is everything I have approval for.Kean Johnston1-1/+1
There are two outstanding patches I await approval to check in. From-SVN: r65832
2003-04-02libgcc-std.ver (_Unwind_GetCFA): New.Richard Henderson1-0/+8
* libgcc-std.ver (_Unwind_GetCFA): New. * unwind-dw2.c (_Unwind_GetCFA): New. * unwind-libunwind.c (_Unwind_GetCFA): New. * unwind-sjlj.c (_Unwind_GetCFA): New. * unwind.h: Declare it. From-SVN: r65190
2003-03-11tm.texi (Frame Registers): Document DWARF_REG_TO_UNWIND_COLUMN.Aldy Hernandez1-18/+49
2003-03-11 Aldy Hernandez <aldyh@redhat.com> * doc/tm.texi (Frame Registers): Document DWARF_REG_TO_UNWIND_COLUMN. * unwind-dw2.c (DWARF_REG_TO_UNWIND_COLUMN): Define. (_Unwind_GetGR): Use DWARF_REG_TO_UNWIND_COLUMN. (_Unwind_SetGR): Same. (_Unwind_GetGRPtr): New. (_Unwind_SetGRPtr): New. (uw_update_context_1): Use accesor functions instead of accessing context->reg[] directly. (uw_install_context_1): Same. (execute_cfa_program): Same. (__frame_state_for): Same. * config/rs6000/rs6000.c (spe_synthesize_frame_save): Use 1200 as the synthetic register offset. * config/rs6000/rs6000.h (DWARF_REG_TO_UNWIND_COLUMN): New. From-SVN: r64186
2003-01-07re PR libstdc++/9076 (Call Frame Instructions are not handled correctly ↵Benjamin Kosnik1-1/+4
during unwind operation..) 2003-01-07 Benjamin Kosnik <bkoz@redhat.com> Sunil Davasam <sunil.k.davasam@intel.com> PR libstdc++/9076 * unwind-dw2.c (execute_cfa_program): DW_CFA_undefined, DW_CFA_same_value, read next and ignore. Co-Authored-By: Sunil Davasam <sunil.k.davasam@intel.com> From-SVN: r61008
2002-12-16Merge basic-improvements-branch to trunkZack Weinberg1-0/+2
From-SVN: r60174
2002-11-27unwind-sjlj.c (_Unwind_FindEnclosingFunction): Rename ↵Andrew Haley1-1/+1
from_Unwind_Find_Enclosing_Function. 2002-11-26 Andrew Haley <aph@redhat.com> * unwind-sjlj.c (_Unwind_FindEnclosingFunction): Rename from_Unwind_Find_Enclosing_Function. * unwind-dw2.c (_Unwind_FindEnclosingFunction): Likewise. * config/ia64/unwind-ia64.c (_Unwind_FindEnclosingFunction): Likewise. * libgcc-std.ver (_Unwind_FindEnclosingFunction): Rename from _Unwind_Find_Enclosing_Function, export @@GCC_3.3. * unwind.h (_Unwind_FindEnclosingFunction): Add. From-SVN: r59568
2002-11-25libgcc-std.ver (_Unwind_Find_Enclosing_Function): Add.Andrew Haley1-0/+11
2002-11-25 Andrew Haley <aph@redhat.com> * libgcc-std.ver (_Unwind_Find_Enclosing_Function): Add. * config/ia64/unwind-ia64.c (_Unwind_Find_Enclosing_Function): New. * unwind-sjlj.c (_Unwind_Find_Enclosing_Function): Likewise. * unwind-dw2.c (_Unwind_Find_Enclosing_Function): Likewise. From-SVN: r59460
2002-05-31target.h: Fix formatting.Kazu Hirata1-65/+65
* target.h: Fix formatting. * timevar.h: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tree.c: Likewise. * tree-dump.h: Likewise. * tree.h: Likewise. * tree-inline.h: Likewise. * unroll.c: Likewise. * unwind-dw2.c: Likewise. * unwind-dw2-fde.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2-fde.h: Likewise. * unwind.h: Likewise. * unwind-sjlj.c: Likewise. * varasm.c: Likewise. * varray.h: Likewise. * vmsdbg.h: Likewise. * vmsdbgout.c: Likewise. * xcoffout.h: Likewise. From-SVN: r54123
2002-03-15add commentsJason Merrill1-1/+13
From-SVN: r50805
2002-01-21unwind-dw2.c: Fix formatting.Kazu Hirata1-15/+15
* unwind-dw2.c: Fix formatting. * unwind-dw2-fde.c: Likewise. * unwind-dw2-fde.h: Likewise. * unwind-pe.h: Likewise. * varasm.c: Likewise. * varray.h: Likewise. From-SVN: r49045
2002-01-10toplev.c: Fix formatting.Kazu Hirata1-17/+22
* toplev.c: Fix formatting. * tree.c: Likewise. * tree-dump.c: Likewise. * unroll.c: Likewise. * unwind-dw2.c: Likewise. * unwind-dw2-fde.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-sjlj.c: Likewise. From-SVN: r48749
2002-01-08Makefile.in (cs-tconfig.h): Don't depend on $(CONFIG_H) or except.h.Zack Weinberg1-1/+1
* Makefile.in (cs-tconfig.h): Don't depend on $(CONFIG_H) or except.h. Remove commands to define USING_SJLJ_EXCEPTIONS. (cppinit.o): Depend on except.h. (gencheck.h, options.h, specs.h, s-gencheck, s-options, s-specs): New rules. * configure.in: Don't AC_DEFINE_UNQUOTED PACKAGE or VERSION. Don't create specs.h/options.h/gencheck.h here. Remove unnecessary variable settings from last argument of AC_OUTPUT. * config.in, configure: Regenerate. * intl.c: Hardcode package name as "gcc". * cppinit.c: Include except.h. (builtin_array): Define __USING_SJLJ_EXCEPTIONS__ when appropriate. * unwind-dw2.c, unwind-sjlj.c, config/ia64/unwind-ia64.c: Use #if(n)def __USING_SJLJ_EXCEPTIONS, not #if (!)USING_SJLJ_EXCEPTIONS. * doc/cpp.texi: Document __USING_SJLJ_EXCEPTIONS__. From-SVN: r48651
2002-01-07* unwind-dw2.c (execute_cfa_program): Use < again.Jason Merrill1-1/+8
From-SVN: r48617
2001-12-11* unwind-dw2.c (execute_cfa_program): Fix DW_CFA_restore handling.Jakub Jelinek1-3/+3
From-SVN: r47881
2001-12-06tm.texi (DWARF_FRAME_REGISTERS): Add documentation.Aldy Hernandez1-3/+8
* doc/tm.texi (DWARF_FRAME_REGISTERS): Add documentation. (PRE_GCC3_DWARF_FRAME_REGISTERS): Same. * unwind-dw2.c (__frame_state_for): Change DWARF_FRAME_REGISTERS to PRE_GCC3_DWARF_FRAME_REGISTERS. (frame_state): Same. (PRE_GCC3_DWARF_FRAME_REGISTERS): Define if not already defined. Co-Authored-By: Richard Henderson <rth@redhat.com> From-SVN: r47730
2001-11-06unwind-dw2.c (execute_cfa_program): Evaluate call frame instructions up to ↵Olivier Hainque1-1/+1
the target pc inclusive. * unwind-dw2.c (execute_cfa_program): Evaluate call frame instructions up to the target pc inclusive. From-SVN: r46818
2001-09-19alias.c: Fix typos in comments.Stan Shebs1-1/+1
* alias.c: Fix typos in comments. * sched-rgn.c (init_ready_list): Ditto. * unwind-dw2.c (uw_frame_state_for): Ditto. * unwind-dw2-fde.c (_Unwind_Find_FDE): Ditto. * unwind.inc (_Unwind_RaiseException_Phase2): Ditto. * config/rs6000/rs6000.c (rs6000_adjust_priority): Ditto. From-SVN: r45698
2001-08-31Makefile.in (c-pragma.o): Depend on output.h.Kaveh R. Ghazi1-1/+1
* Makefile.in (c-pragma.o): Depend on output.h. (reorg.o): Depend on except.h. * c-pragma.c: Include output.h. * reorg.c: Include except.h. * unwind-dw2.c: Call __builtin_alloca, not alloca. From-SVN: r45331
2001-08-31unwind-pe.h (read_uleb128, [...]): Move actual reading code here.Jason Merrill1-62/+53
* unwind-pe.h (read_uleb128, read_sleb128): Move actual reading code here. Take _Unwind_{W,Sw}ord*. (read_encoded_value_with_base): Use them. * unwind-dw2.c (_Unwind_FrameState): Make cfa_offset and cfa_reg words. (extract_cie_info): Simplify read_?leb128 handling. (execute_stack_op, execute_cfa_program): Likewise. * unwind-dw2-fde.c (get_cie_encoding): Likewise. * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Simplify leb128 handling. From-SVN: r45315
2001-08-22Makefile.in, [...]: replace "GNU CC" with "GCC".Lars Brinkhoff1-10/+10
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105
2001-08-19unwind-dw2.c (execute_stack_op): Add default aborts to the inner switches to ↵Zack Weinberg1-0/+6
prevent warnings. * unwind-dw2.c (execute_stack_op): Add default aborts to the inner switches to prevent warnings. From-SVN: r45014
2001-08-17sbitmap.c: Fix comment formatting.Kazu Hirata1-1/+1
* sbitmap.c: Fix comment formatting. * sched-deps.c: Likewise. * sibcall.c: Likewise. * simplify-rtx.c: Likewise. * ssa.c: Likewise. * ssa-ccp.c: Likewise. * stor-layout.c: Likewise. * timevar.c: Likewise. * toplev.c: Likewise. * unwind-dw2.c: Likewise. * unwind-dw2-fde.c: Likewise. * varasm.c: Likewise. From-SVN: r44983
2001-07-19unwind-dw2.c (_Unwind_FrameState): Add eh_ptr.Mark Kettenis1-8/+72
* unwind-dw2.c (_Unwind_FrameState): Add eh_ptr. (extract_cie_info): Handle "eh" augmentation properly, remember eh_ptr. (struct frame_state, __frame_state_for): New. Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r44155
2001-05-20except.c (dw2_build_landing_pads): Use word_mode, not Pmode, as ncessary.Richard Henderson1-53/+58
* except.c (dw2_build_landing_pads): Use word_mode, not Pmode, as ncessary. (expand_eh_return): Convert between word_mode and Pmode. * unwind-dw2.c (extract_cie_info): Do not assume words and pointers are the same size. (execute_stack_op): Likewise. (execute_cfa_program): Likewise. (uw_frame_state_for): Likewise. (uw_update_context_1): Likewise. * unwind.inc (_Unwind_Reason_Code): Likewise. * config/mips/mips.h (EH_RETURN_DATA_REGNO): Define. (EH_RETURN_STACKADJ_RTX): Likewise. * config/mips/mips.c (compute_frame_size): Make space for saving EH return registers. (mips_expand_epilogue): Handle EH stack adjustments. * config/mips/mips.md (eh_return): New pattern. (eh_set_lr_si): Likewise. (eh_set_lr_di): Likewise. Add splitter to perform EH return after reload. From-SVN: r42332
2001-05-16except.c (eh_data_format_name): Move to ...Richard Henderson1-159/+46
* except.c (eh_data_format_name): Move to ... * dwarf2asm.c: ... here. Use designated initializers if available. (dw2_asm_output_encoded_addr_rtx): Accept varargs commentary. * dwarf2asm.h: Update declarations. * dwarf2out.c (output_cfi) [DW_CFA_set_loc]: If for_eh, mind ASM_PREFERRED_EH_DATA_FORMAT. (output_call_frame_info): Likewise. Use 'L' augmentation for the LSDA encoding. * unwind-dw2-fde.h (struct fde_vector): New. (struct old_object): Rename from struct object. (struct object): New. (__register_frame_info_bases): Declare. (__register_frame_info_table_bases): Declare. (struct dwarf_fde): Remove explicit pc_begin/pc_range members. * unwind-dw2-fde.c (objects): Remove. (unseen_objects, seen_objects): New. (__register_frame_info_bases): New. (__register_frame_info): Use it. (__register_frame_info_table_bases): New. (__register_frame_info_table): Use it. (__deregister_frame_info): Rewrite for changed object struct. (base_from_object, get_cie_encoding, get_fde_encoding): New. (fde_unencoded_compare): Rename from fde_compare; uninline. (fde_single_encoding_compare, fde_mixed_encoding_compare): New. (start_fde_sort): Adjust for new definition of fde_vector. (fde_insert): Likewise. (end_fde_sort): Likewise. Select comparison function based on properties of the object. (fde_split): Take object and fde_compare_t arguments. (frame_heapsort, fde_merge): Likewise. (classify_object_over_fdes): Rename from count_fdes. Handle encoded pointers. Collect encoding, mixed_encoding, and pc_begin for the object. (add_fdes): Handle encoded pointers. (init_object): Rename from frame_init. Update for new struct object. (linear_search_fdes): Rename from search_fdes. Handle encoded pointers. (binary_search_unencoded_fdes): Broken out from _Unwind_Find_FDE. (binary_search_single_encoding_fdes): New. (binary_search_mixed_encoding_fdes): New. (search_object): New. (_Unwind_Find_FDE): Update for new struct object. Fill in the dwarf_eh_bases. * unwind-dw2.c: Include unwind-pe.h. Constify all pointers iterating over EH data. (_Unwind_FrameState): Remove saw_lsda, addr_encoding. Add fde_encoding, lsda_encoding. (read_uleb128, read_sleb128): Remove. (read_encoded_pointer): Remove. All callers use read_encoded_value. (extract_cie_info): Set lsda_encoding from 'L' augmentation. (uw_frame_state_for): Don't set bases.func. Handle encoded fde pointers. * unwind-pe.h: Add "struct" to _Unwind_Context references. From-SVN: r42176
2001-05-11defaults.h (ASM_PREFERRED_EH_DATA_FORMAT): New.Richard Henderson1-0/+13
* defaults.h (ASM_PREFERRED_EH_DATA_FORMAT): New. * dwarf2asm.c (dw2_force_const_mem, dw2_output_indirect_constant_1, dw2_output_indirect_constants, dw2_asm_output_encoded_addr_rtx): New. * dwarf2asm.h (dw2_asm_output_encoded_addr_rtx): Prototype. (dw2_output_indirect_constants): Prototype. * dwarf2out.c (dwarf2out_begin_prologue): Generate current_function_func_begin_label if we'll need it for EH. Exit early for IA64_UNWIND_INFO. * except.c: Get DW_EH_PE_* defines from dwarf2.h. (eh_data_format_name): Update for indirect references. (output_function_exception_table): Care for IA64_UNWIND_INFO. Handle ASM_PREFERRED_EH_DATA_FORMAT. * except.h (MUST_USE_SJLJ_EXCEPTIONS): IA64_UNWIND_INFO needn't define HAVE_eh_return etc. * final.c (final_start_function): Always call dwarf2out_begin_prologue. (final_end_function): Don't call output_function_exception_table. * toplev.c (compile_file): Call dw2_output_indirect_constants. (rest_of_compilation): Invoke output_function_exception_table for ia64 before assemble_end_function. * tm.texi (ASM_PREFERRED_EH_DATA_FORMAT): Document. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Document. * unwind-dw2.c (_Unwind_GetTextRelBase, _Unwind_GetDataRelBase): New. * unwind.h: Declare them. * libgcc-std.ver: Export them. * unwind-pe.h: New file. * config/alpha/elf.h (ASM_PREFERRED_EH_DATA_FORMAT): New. * config/ia64/fde-glibc.c: Use "struct unw_table_entry" instead of "fde". (find_fde_for_dso): Extract DT_PLTGOT. (_Unwind_FindTableEntry): Rename from __ia64_find_fde; return the segment and gp as well. * config/ia64/frame-ia64.c: Remove file. * config/ia64/frame-ia64.h: Remove file. * config/ia64/unwind-ia64.c: New file. * config/ia64/unwind-ia64.h: New file. * config/ia64/ia64.h (ASM_OUTPUT_EH_CHAR): Remove. (ASM_OUTPUT_EH_SHORT, ASM_OUTPUT_EH_INT): Remove. (ASM_OUTPUT_EH_DOUBLE_INT): Remove. (ASM_PREFERRED_EH_DATA_FORMAT): New. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): New. (IA64_UNWIND_INFO): Re-enable. (HANDLER_SECTION): Remove. (EH_RETURN_DATA_REGNO): New. * config/ia64/ia64.md (exception_receiver): Remove. * config/ia64/t-glibc (LIB2ADDEH): Re-enable. * config/ia64/t-ia64 (LIB2ADDEH): Re-enable. From-SVN: r41981
2001-03-28IA-64 ABI Exception Handling.Richard Henderson1-0/+1217
From-SVN: r40924