gcc/gcc/except.h

278 lines
9.3 KiB
C
Raw Normal View History

1996-07-23 22:20:04 +02:00
/* Exception Handling interface routines.
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2007, 2008 Free Software Foundation, Inc.
1996-07-23 22:20:04 +02:00
Contributed by Mike Stump <mrs@cygnus.com>.
Makefile.in, [...]: replace "GNU CC" with "GCC". * 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-22 16:35:51 +02:00
This file is part of GCC.
1996-07-23 22:20:04 +02:00
Makefile.in, [...]: replace "GNU CC" with "GCC". * 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-22 16:35:51 +02:00
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
Makefile.in, [...]: replace "GNU CC" with "GCC". * 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-22 16:35:51 +02:00
version.
1996-07-23 22:20:04 +02:00
Makefile.in, [...]: replace "GNU CC" with "GCC". * 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-22 16:35:51 +02:00
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
1996-07-23 22:20:04 +02:00
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
1996-07-23 22:20:04 +02:00
#include "sbitmap.h"
#include "vecprim.h"
struct function;
/* Describes one exception region. */
struct eh_region GTY(())
{
/* The immediately surrounding region. */
struct eh_region *outer;
/* The list of immediately contained regions. */
struct eh_region *inner;
struct eh_region *next_peer;
/* An identifier for this region. */
int region_number;
/* When a region is deleted, its parents inherit the REG_EH_REGION
numbers already assigned. */
bitmap aka;
/* Each region does exactly one thing. */
enum eh_region_type
{
ERT_UNKNOWN = 0,
ERT_CLEANUP,
ERT_TRY,
ERT_CATCH,
ERT_ALLOWED_EXCEPTIONS,
ERT_MUST_NOT_THROW,
ERT_THROW
} type;
/* Holds the action to perform based on the preceding type. */
union eh_region_u {
/* A list of catch blocks, a surrounding try block,
and the label for continuing after a catch. */
struct eh_region_u_try {
struct eh_region *eh_catch;
struct eh_region *last_catch;
} GTY ((tag ("ERT_TRY"))) eh_try;
/* The list through the catch handlers, the list of type objects
matched, and the list of associated filters. */
struct eh_region_u_catch {
struct eh_region *next_catch;
struct eh_region *prev_catch;
tree type_list;
tree filter_list;
} GTY ((tag ("ERT_CATCH"))) eh_catch;
/* A tree_list of allowed types. */
struct eh_region_u_allowed {
tree type_list;
int filter;
} GTY ((tag ("ERT_ALLOWED_EXCEPTIONS"))) allowed;
/* The type given by a call to "throw foo();", or discovered
for a throw. */
struct eh_region_u_throw {
tree type;
} GTY ((tag ("ERT_THROW"))) eh_throw;
/* Retain the cleanup expression even after expansion so that
we can match up fixup regions. */
struct eh_region_u_cleanup {
struct eh_region *prev_try;
} GTY ((tag ("ERT_CLEANUP"))) cleanup;
} GTY ((desc ("%0.type"))) u;
/* Entry point for this region's handler before landing pads are built. */
rtx label;
tree tree_label;
/* Entry point for this region's handler from the runtime eh library. */
rtx landing_pad;
/* Entry point for this region's handler from an inner region. */
rtx post_landing_pad;
/* The RESX insn for handing off control to the next outermost handler,
if appropriate. */
rtx resume;
/* True if something in this region may throw. */
unsigned may_contain_throw : 1;
};
typedef struct eh_region *eh_region;
DEF_VEC_P(eh_region);
DEF_VEC_ALLOC_P(eh_region, gc);
DEF_VEC_ALLOC_P(eh_region, heap);
/* Per-function EH data. Used to save exception status for each
function. */
struct eh_status GTY(())
{
/* The tree of all regions for this function. */
struct eh_region *region_tree;
/* The same information as an indexable array. */
VEC(eh_region,gc) *region_array;
int last_region_number;
htab_t GTY((param_is (struct throw_stmt_node))) throw_stmt_table;
};
except.c (func_eh_entry): Add emitted field. 2000-05-25 Andrew MacLeod <amacleod@cygnus.com> Andrew Haley <aph@cygnus.com> * except.c (func_eh_entry): Add emitted field. (new_eh_region_entry): Set emitted field to 0; (output_exception_table_entry): Only emit previously un-emitted data, and send it to the eh_data section. (output_exception_table): Break out common parts. Output exception table for entire compilation unit to eh_data section. (output_exception_table_data): Common parts of output_exception_table. Send output to eh_data section. (output_function_exception_table): Output exception table data for a single function to eh_data section. (free_exception_table): New external to free the table. * except.h (free_exception_table): Add prototype. (output_function_exception_table): Add prototype. * final.c (final_end_function): Output function exception table for IA64_UNWIND_INFO. (final_scan_insn): Emit any unwind directives for an insn. * frame-dwarf2.c: New file containing all DWARF 2 specific code from frame.c. * frame.c: Remove all DWARF 2 specific code. * config/ia64/frame-ia64.c: New file. (gthread_stuff): Make all gthread available with IA64_UNWIND_INFO. (dwarf_fde): Define an IA64 struct for dwarf_fde. (__register_frame_info, __register_frame): Move to common area of file. (__register_frame_info_table, __register_frame_table): Move to common i area. (__deregister_frame_info, __deregister_frame): Move to common area. (__frame_init, find_fde): New versions for IA64_UNWIND_INFO. (read_uleb128): New version for ia64. (get_unwind_record): Read the next IA-64 unwind record. (read_R_record): Read a region header record. (process_a_b_reg_code): X record helper. (read_X_record): Read an X format record. (read_B_record): Read a B format record. (P3_record_types): List of record types matching the P3 format. (P7_record_types): List of record types matching the P7 format. (P8_record_types): List of record types matching the P8 format. (read_P_record): Read a P format record. (init_ia64_reg_loc): Set default fields for a register. (init_ia64_unwind_frame): Set defaults for all register records. (execute_one_ia64_descriptor): Execute one descriptor record. (rse_address_add): Calculate the position of a local reg in memory. (normalize_reg_loc): Turn a location descriptor into a memory address. (maybe_normalize_reg_loc): Only normalize a descriptor if it falls within a specified PC offset range. (get_real_reg_value): Given a register location, retrieve its value. (set_real_reg_value): Change the value of a register location. (copy_reg_value): Copy reg values, if needed. (copy_saved_reg_state): Copy all registers that need to be copied. (process_state_between): Normalize all frame register records that fall within the specified PC range. (frame_translate): Take a processed frame description, and turn everything into addresses. (build_ia64_frame_state ): Find and create frame state record for a PC. (get_personality): Get the personality routine for a given frame. (get_except_table): Get the exception table for a given frame. (record_name): Unwind record names for debugging. (print_record): Print and unwind record. (print_all_records): Print an entire unwind image. (__ia64_backtrace): Print a backtrace. (ia64_backtrace_helper): New function. (__register_frame_info_aux): New function. * config/ia64/crtend.asm (__do_frame_setup_aux): New function. * frame.h (enum unw_record_type): New unwind record types. (struct unw_p_record, unw_b_record, unw_x_record) : New unwind records. (struct unw_r_record, unwind_record): New unwind record structs. (struct unwind_info_ptr): Unwind information layout. (IA64_UNW_LOC_TYPE_*): Macros for different types for location descriptors. (struct ia64_reg_loc): Register location description. (struct ia64_frame_state): Location of all registers in a frame. (struct object): Add pc_base and fde_end for IA64_UNWIND_INFO. * libgcc2.c (__ia64_personality_v1): Personality routine. (__calc_caller_bsp): Calculate the bsp register for the caller's frame. (ia64_throw_helper): Figure out who to return to and set up the registers. (__throw): Throw routine. * output.h (assemble_eh_align, assemble_eh_label): New functions to generate EH info where we want it. (assemble_eh_integer): New function. * toplev.c (compile_file): Output module level exception table for non-ia64 targets. (main): Set exceptions_via_longjump and flag_new_exceptions based on IA64_UNWIND_INFO too. * varasm.c (assemble_eh_label): Generate a label via ASM_OUTPUT_EH_LABEL if it has been specified. (assemble_eh_align): Generate an alignment directive via ASM_OUTPUT_EH_ALIGN if it has been specified. (assemble_eh_label): Generate an integer value via ASM_OUTPUT_EH_type if they have been specified. * config/ia64/ia64.c (rtx_needs_barrier): Add flushrs. (ia64_init_builtins): Add __builtin_ia64_bsp and __builtin_ia64_flushrs. (ia64_expand_builtin): Add IA64_BUILTIN_BSP and IA64_BUILTIN_FLUSHRS. * config/ia64/ia64.h (ia64_builtins): Add IA64_BUILTIN_BSP and IA64_BUILTIN_FLUSHRS. * config/ia64/ia64.md (flushrs): New insn to flush the register stack. Add to unspec list. * config/ia64/crtbegin.asm (frame_object): Change size. (__do_frame_setup_aux): New function. * config/ia64/crtend.asm: call __do_frame_setup_aux. * config/ia64/t-ia64 (LIB2ADDEH): Add. * Makefile.in (LIB2ADDEH): Add. (LIB2ADD): Use LIB2ADDEH. Co-Authored-By: Andrew Haley <aph@cygnus.com> From-SVN: r34169
2000-05-25 17:21:51 +02:00
/* Test: is exception handling turned on? */
extern int doing_eh (int);
except.c (func_eh_entry): Add emitted field. 2000-05-25 Andrew MacLeod <amacleod@cygnus.com> Andrew Haley <aph@cygnus.com> * except.c (func_eh_entry): Add emitted field. (new_eh_region_entry): Set emitted field to 0; (output_exception_table_entry): Only emit previously un-emitted data, and send it to the eh_data section. (output_exception_table): Break out common parts. Output exception table for entire compilation unit to eh_data section. (output_exception_table_data): Common parts of output_exception_table. Send output to eh_data section. (output_function_exception_table): Output exception table data for a single function to eh_data section. (free_exception_table): New external to free the table. * except.h (free_exception_table): Add prototype. (output_function_exception_table): Add prototype. * final.c (final_end_function): Output function exception table for IA64_UNWIND_INFO. (final_scan_insn): Emit any unwind directives for an insn. * frame-dwarf2.c: New file containing all DWARF 2 specific code from frame.c. * frame.c: Remove all DWARF 2 specific code. * config/ia64/frame-ia64.c: New file. (gthread_stuff): Make all gthread available with IA64_UNWIND_INFO. (dwarf_fde): Define an IA64 struct for dwarf_fde. (__register_frame_info, __register_frame): Move to common area of file. (__register_frame_info_table, __register_frame_table): Move to common i area. (__deregister_frame_info, __deregister_frame): Move to common area. (__frame_init, find_fde): New versions for IA64_UNWIND_INFO. (read_uleb128): New version for ia64. (get_unwind_record): Read the next IA-64 unwind record. (read_R_record): Read a region header record. (process_a_b_reg_code): X record helper. (read_X_record): Read an X format record. (read_B_record): Read a B format record. (P3_record_types): List of record types matching the P3 format. (P7_record_types): List of record types matching the P7 format. (P8_record_types): List of record types matching the P8 format. (read_P_record): Read a P format record. (init_ia64_reg_loc): Set default fields for a register. (init_ia64_unwind_frame): Set defaults for all register records. (execute_one_ia64_descriptor): Execute one descriptor record. (rse_address_add): Calculate the position of a local reg in memory. (normalize_reg_loc): Turn a location descriptor into a memory address. (maybe_normalize_reg_loc): Only normalize a descriptor if it falls within a specified PC offset range. (get_real_reg_value): Given a register location, retrieve its value. (set_real_reg_value): Change the value of a register location. (copy_reg_value): Copy reg values, if needed. (copy_saved_reg_state): Copy all registers that need to be copied. (process_state_between): Normalize all frame register records that fall within the specified PC range. (frame_translate): Take a processed frame description, and turn everything into addresses. (build_ia64_frame_state ): Find and create frame state record for a PC. (get_personality): Get the personality routine for a given frame. (get_except_table): Get the exception table for a given frame. (record_name): Unwind record names for debugging. (print_record): Print and unwind record. (print_all_records): Print an entire unwind image. (__ia64_backtrace): Print a backtrace. (ia64_backtrace_helper): New function. (__register_frame_info_aux): New function. * config/ia64/crtend.asm (__do_frame_setup_aux): New function. * frame.h (enum unw_record_type): New unwind record types. (struct unw_p_record, unw_b_record, unw_x_record) : New unwind records. (struct unw_r_record, unwind_record): New unwind record structs. (struct unwind_info_ptr): Unwind information layout. (IA64_UNW_LOC_TYPE_*): Macros for different types for location descriptors. (struct ia64_reg_loc): Register location description. (struct ia64_frame_state): Location of all registers in a frame. (struct object): Add pc_base and fde_end for IA64_UNWIND_INFO. * libgcc2.c (__ia64_personality_v1): Personality routine. (__calc_caller_bsp): Calculate the bsp register for the caller's frame. (ia64_throw_helper): Figure out who to return to and set up the registers. (__throw): Throw routine. * output.h (assemble_eh_align, assemble_eh_label): New functions to generate EH info where we want it. (assemble_eh_integer): New function. * toplev.c (compile_file): Output module level exception table for non-ia64 targets. (main): Set exceptions_via_longjump and flag_new_exceptions based on IA64_UNWIND_INFO too. * varasm.c (assemble_eh_label): Generate a label via ASM_OUTPUT_EH_LABEL if it has been specified. (assemble_eh_align): Generate an alignment directive via ASM_OUTPUT_EH_ALIGN if it has been specified. (assemble_eh_label): Generate an integer value via ASM_OUTPUT_EH_type if they have been specified. * config/ia64/ia64.c (rtx_needs_barrier): Add flushrs. (ia64_init_builtins): Add __builtin_ia64_bsp and __builtin_ia64_flushrs. (ia64_expand_builtin): Add IA64_BUILTIN_BSP and IA64_BUILTIN_FLUSHRS. * config/ia64/ia64.h (ia64_builtins): Add IA64_BUILTIN_BSP and IA64_BUILTIN_FLUSHRS. * config/ia64/ia64.md (flushrs): New insn to flush the register stack. Add to unspec list. * config/ia64/crtbegin.asm (frame_object): Change size. (__do_frame_setup_aux): New function. * config/ia64/crtend.asm: call __do_frame_setup_aux. * config/ia64/t-ia64 (LIB2ADDEH): Add. * Makefile.in (LIB2ADDEH): Add. (LIB2ADD): Use LIB2ADDEH. Co-Authored-By: Andrew Haley <aph@cygnus.com> From-SVN: r34169
2000-05-25 17:21:51 +02:00
/* Note that the current EH region (if any) may contain a throw, or a
call to a function which itself may contain a throw. */
extern void note_eh_region_may_contain_throw (struct eh_region *);
/* Invokes CALLBACK for every exception handler label. Only used by old
loop hackery; should not be used by new code. */
extern void for_each_eh_label (void (*) (rtx));
1996-07-23 22:20:04 +02:00
/* Invokes CALLBACK for every exception region in the current function. */
extern void for_each_eh_region (void (*) (struct eh_region *));
/* Determine if the given INSN can throw an exception. */
extern bool can_throw_internal_1 (int, bool, bool);
alias.c (rtx_equal_for_memref_p): Constify. * alias.c (rtx_equal_for_memref_p): Constify. * basic-block.h (const_edge, const_basic_block): New. (reg_set_to_hard_reg_set, dfs_enumerate_from, single_succ_p, single_pred_p, single_succ_edge, single_pred_edge, single_succ, single_pred, maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p, edge_probability_reliable_p, br_prob_note_reliable_p, forwarder_block_p, flow_nodes_print, inside_basic_block_p, control_flow_insn_p, dominated_by_p): Likewise. * bb-reorder.c (better_edge_p, push_to_next_round_p): Likewise. * bt-load.c (basic_block_freq, insn_sets_btr_p, can_move_up): Likewise. * cfganal.c (flow_active_insn_p, forwarder_block_p, flow_nodes_print, dfs_enumerate_from): Likewise. * cfgbuild.c (count_basic_blocks, inside_basic_block_p, control_flow_insn_p, count_basic_blocks): Likewise. * cfgloop.c (flow_bb_inside_loop_p, glb_enum_p, get_loop_body_with_size, loop_exit_edge_p): Likewise. * cfgloop.h (flow_bb_inside_loop_p, num_loop_insns, average_num_loop_insns, loop_exit_edge_p, just_once_each_iteration_p, can_duplicate_loop_p): Likewise. * cfgloopanal.c (just_once_each_iteration_p, num_loop_insns, average_num_loop_insns, seq_cost): Likewise. * cfgloopmanip.c (rpe_enum_p, can_duplicate_loop_p): Likewise. * dominance.c (dominated_by_p): Likewise. * emit-rtl.c (validate_subreg): Likewise. * except.c (can_throw_internal, can_throw_external): Likewise. * except.h (can_throw_internal, can_throw_external): Likewise. * gcse.c (gcse_constant_p, oprs_unchanged_p, oprs_anticipatable_p, oprs_available_p, hash_expr, expr_equiv_p, oprs_not_set_p, compute_transp, load_killed_in_block_p, reg_killed_on_edge, simple_mem, store_ops_ok, load_kills_store, find_loads, store_killed_in_insn, store_killed_after, store_killed_before, gcse_mem_operand, implicit_set_cond_p, store_killed_in_pat): Likewise. * ifcvt.c (count_bb_insns, cheap_bb_rtx_cost_p, noce_operand_ok, noce_mem_write_may_trap_or_fault_p): Likewise. * pointer-set.c (pointer_set_contains, pointer_map_contains): Likewise. * pointer-set.h (pointer_set_contains, pointer_map_contains): Likewise. * predict.c (can_predict_insn_p, maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p, edge_probability_reliable_p, br_prob_note_reliable_p, can_predict_insn_p): Likewise. * regclass.c (reg_set_to_hard_reg_set): Likewise. * resource.c (return_insn_p): Likewise. * rtl.h (reg_set_between_p, reg_set_p, validate_subreg): Likewise. * rtlanal.c (reg_set_between_p, reg_set_p): Likewise. * tracer.c (count_insns, ignore_bb_p, better_p): Likewise. * tree-cfg.c (verify_gimple_unary_expr, verify_gimple_binary_expr, verify_gimple_modify_stmt): Likewise. * tree-chrec.c (is_not_constant_evolution, is_multivariate_chrec_rec, is_multivariate_chrec, chrec_contains_symbols, chrec_contains_undetermined, tree_contains_chrecs, evolution_function_is_affine_multivariate_p, evolution_function_is_univariate_p, avoid_arithmetics_in_type_p, eq_evolutions_p, scev_direction): Likewise. * tree-chrec.h (automatically_generated_chrec_p, tree_is_chrec, eq_evolutions_p, is_multivariate_chrec, chrec_contains_symbols, chrec_contains_symbols_defined_in_loop, chrec_contains_undetermined, tree_contains_chrecs, evolution_function_is_affine_multivariate_p, evolution_function_is_univariate_p, chrec_zerop, evolution_function_is_constant_p, evolution_function_is_affine_p, evolution_function_is_affine_or_constant_p, tree_does_not_contain_chrecs, chrec_type): Likewise. * tree-data-ref.c (tree_fold_divides_p, object_address_invariant_in_loop_p, dr_may_alias_p, ziv_subscript_p, siv_subscript_p, gcd_of_steps_may_divide_p, same_access_functions, constant_access_functions, access_functions_are_affine_or_constant_p, find_vertex_for_stmt): Likewise. * tree-flow.h (scev_direction): Likewise. * tree-gimple.c (is_gimple_stmt): Likewise. * tree-outof-ssa.c (identical_copies_p, identical_stmt_lists_p): Likewise. * tree-pretty-print.c (op_prio): Likewise. * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop, analyzable_condition, backedge_phi_arg_p): Likewise. * tree-scalar-evolution.h (get_chrec_loop): Likewise. * tree-ssa-operands.c (get_name_decl, operand_build_cmp): Likewise. * tree-ssa-threadupdate.c (dbds_continue_enumeration_p): Likewise. From-SVN: r127404
2007-08-14 06:44:35 +02:00
extern bool can_throw_internal (const_rtx);
extern bool can_throw_external_1 (int, bool, bool);
alias.c (rtx_equal_for_memref_p): Constify. * alias.c (rtx_equal_for_memref_p): Constify. * basic-block.h (const_edge, const_basic_block): New. (reg_set_to_hard_reg_set, dfs_enumerate_from, single_succ_p, single_pred_p, single_succ_edge, single_pred_edge, single_succ, single_pred, maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p, edge_probability_reliable_p, br_prob_note_reliable_p, forwarder_block_p, flow_nodes_print, inside_basic_block_p, control_flow_insn_p, dominated_by_p): Likewise. * bb-reorder.c (better_edge_p, push_to_next_round_p): Likewise. * bt-load.c (basic_block_freq, insn_sets_btr_p, can_move_up): Likewise. * cfganal.c (flow_active_insn_p, forwarder_block_p, flow_nodes_print, dfs_enumerate_from): Likewise. * cfgbuild.c (count_basic_blocks, inside_basic_block_p, control_flow_insn_p, count_basic_blocks): Likewise. * cfgloop.c (flow_bb_inside_loop_p, glb_enum_p, get_loop_body_with_size, loop_exit_edge_p): Likewise. * cfgloop.h (flow_bb_inside_loop_p, num_loop_insns, average_num_loop_insns, loop_exit_edge_p, just_once_each_iteration_p, can_duplicate_loop_p): Likewise. * cfgloopanal.c (just_once_each_iteration_p, num_loop_insns, average_num_loop_insns, seq_cost): Likewise. * cfgloopmanip.c (rpe_enum_p, can_duplicate_loop_p): Likewise. * dominance.c (dominated_by_p): Likewise. * emit-rtl.c (validate_subreg): Likewise. * except.c (can_throw_internal, can_throw_external): Likewise. * except.h (can_throw_internal, can_throw_external): Likewise. * gcse.c (gcse_constant_p, oprs_unchanged_p, oprs_anticipatable_p, oprs_available_p, hash_expr, expr_equiv_p, oprs_not_set_p, compute_transp, load_killed_in_block_p, reg_killed_on_edge, simple_mem, store_ops_ok, load_kills_store, find_loads, store_killed_in_insn, store_killed_after, store_killed_before, gcse_mem_operand, implicit_set_cond_p, store_killed_in_pat): Likewise. * ifcvt.c (count_bb_insns, cheap_bb_rtx_cost_p, noce_operand_ok, noce_mem_write_may_trap_or_fault_p): Likewise. * pointer-set.c (pointer_set_contains, pointer_map_contains): Likewise. * pointer-set.h (pointer_set_contains, pointer_map_contains): Likewise. * predict.c (can_predict_insn_p, maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p, edge_probability_reliable_p, br_prob_note_reliable_p, can_predict_insn_p): Likewise. * regclass.c (reg_set_to_hard_reg_set): Likewise. * resource.c (return_insn_p): Likewise. * rtl.h (reg_set_between_p, reg_set_p, validate_subreg): Likewise. * rtlanal.c (reg_set_between_p, reg_set_p): Likewise. * tracer.c (count_insns, ignore_bb_p, better_p): Likewise. * tree-cfg.c (verify_gimple_unary_expr, verify_gimple_binary_expr, verify_gimple_modify_stmt): Likewise. * tree-chrec.c (is_not_constant_evolution, is_multivariate_chrec_rec, is_multivariate_chrec, chrec_contains_symbols, chrec_contains_undetermined, tree_contains_chrecs, evolution_function_is_affine_multivariate_p, evolution_function_is_univariate_p, avoid_arithmetics_in_type_p, eq_evolutions_p, scev_direction): Likewise. * tree-chrec.h (automatically_generated_chrec_p, tree_is_chrec, eq_evolutions_p, is_multivariate_chrec, chrec_contains_symbols, chrec_contains_symbols_defined_in_loop, chrec_contains_undetermined, tree_contains_chrecs, evolution_function_is_affine_multivariate_p, evolution_function_is_univariate_p, chrec_zerop, evolution_function_is_constant_p, evolution_function_is_affine_p, evolution_function_is_affine_or_constant_p, tree_does_not_contain_chrecs, chrec_type): Likewise. * tree-data-ref.c (tree_fold_divides_p, object_address_invariant_in_loop_p, dr_may_alias_p, ziv_subscript_p, siv_subscript_p, gcd_of_steps_may_divide_p, same_access_functions, constant_access_functions, access_functions_are_affine_or_constant_p, find_vertex_for_stmt): Likewise. * tree-flow.h (scev_direction): Likewise. * tree-gimple.c (is_gimple_stmt): Likewise. * tree-outof-ssa.c (identical_copies_p, identical_stmt_lists_p): Likewise. * tree-pretty-print.c (op_prio): Likewise. * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop, analyzable_condition, backedge_phi_arg_p): Likewise. * tree-scalar-evolution.h (get_chrec_loop): Likewise. * tree-ssa-operands.c (get_name_decl, operand_build_cmp): Likewise. * tree-ssa-threadupdate.c (dbds_continue_enumeration_p): Likewise. From-SVN: r127404
2007-08-14 06:44:35 +02:00
extern bool can_throw_external (const_rtx);
explow.c (optimize_save_area_alloca): Do not accept parameters. 2004-07-08 Paolo Bonzini <bonzini@gnu.org> * explow.c (optimize_save_area_alloca): Do not accept parameters. * passes.c (rest_of_handle_final): Handle symout. (rest_of_handle_new_regalloc, rest_of_handle_old_regalloc): Push timevar here. (rest_of_handle_sched): Break out SMS. Remove ifs for flag_schedule_insns and flag_modulo_sched. (rest_of_handle_addressof, rest_of_handle_cse2): Garbage collect at the end. (rest_of_handle_gcse2): Put under timevar TV_RELOAD_CSE_REGS. (rest_of_handle_partition_blocks, rest_of_handle_sms, rest_of_handle_if_after_reload, rest_of_handle_peephole2, rest_of_handle_mode_switching, rest_of_handle_jump, rest_of_handle_guess_branch_prob, rest_of_handle_eh, rest_of_handle_jump2, rest_of_handle_postreload, rest_of_handle_flow2, rest_of_clean_state, rest_of_handle_shorten_branches, rest_of_handle_prologue_epilogue, rest_of_handle_branch_target_load_optimize): New. (rest_of_compilation): Call the above. Remove ggc_collect calls moved to rest_of_handle_*. * rtl.h (optimize_save_area_alloca): Do not accept parameters. * dwarf2out.c (dwarf2out_begin_prologue): Use TREE_NOTHROW. * except.c (set_nothrow_function_flags): Set TREE_NOTHROW. * except.h (set_nothrow_function_flags): Update comment. * function.c (current_function_nothrow): Remove. * output.h (current_function_nothrow): Remove. * passes.c (rest_of_compilation): Do not set TREE_NOTHROW. * config/arm/arm.c (arm_compute_func_type): Use TREE_NOTHROW. From-SVN: r84274
2004-07-08 09:42:02 +02:00
/* Set TREE_NOTHROW and cfun->all_throwers_are_sibcalls. */
tree-vrp.c (execute_vrp): Return value. 2006-03-02 Daniel Berlin <dberlin@dberlin.org> * gcc/tree-vrp.c (execute_vrp): Return value. * gcc/regrename.c (rest_of_handle_regrename): Ditto. * gcc/tree-into-ssa.c (rewrite_into_ssa): Ditto. * gcc/tree-complex.c (tree_lower_complex): Ditto. (tree_lower_complex_O0): Ditto. * gcc/tracer.c (rest_of_handle_tracer): Ditto. * gcc/postreload-gcse.c (rest_of_handle_gcse2): Ditto. * gcc/postreload.c (rest_of_handle_postreload): Ditto. * gcc/tree-tailcall.c (execute_tail_recursion): Ditto. (execute_tail_calls): Ditto. * gcc/tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * gcc/tree.h (init_function_for_compilation): Ditto. * gcc/ipa-cp.c (ipcp_driver): Ditto. * gcc/tree-scalar-evolution.c (scev_const_prop): Ditto. * gcc/tree-scalar-evolution.h (scev_const_prop): Ditto. * gcc/final.c (compute_alignments): Ditto. (rest_of_handle_final): Ditto. (rest_of_handle_shorten_branches): Ditto. (rest_of_clean_state): Ditto. * gcc/omp-low.c (execute_expand_omp): Ditto. (execute_lower_omp): Ditto. * gcc/tree-ssa-dse.c (tree_ssa_dse): Ditto. * gcc/ipa-reference.c (static_execute): Ditto. * gcc/tree-ssa-uncprop.c (tree_ssa_uncprop): Ditto. * gcc/reorg.c (rest_of_handle_delay_slots): Ditto. (rest_of_handle_machine_reorg): Ditto. * gcc/cgraphunit.c (rebuild_cgraph_edges): Ditto. * gcc/flow.c (recompute_reg_usage): Ditto. (rest_of_handle_remove_death_notes): Ditto. (rest_of_handle_life): Ditto. (rest_of_handle_flow2): Ditto. * gcc/tree-ssa-copyrename.c (rename_ssa_copies): Ditto. * gcc/tree-ssa-ccp.c (do_ssa_ccp): Ditto. (do_ssa_store_ccp): Ditto. (execute_fold_all_builtins): Ditto. * gcc/mode-switching.c (rest_of_handle_mode_switching): Ditto. * gcc/modulo-sched.c (rest_of_handle_sms): Ditto. * gcc/ipa-pure-const.c (static_execute): Ditto. * gcc/cse.c (rest_of_handle_cse): Ditto. (rest_of_handle_cse2): Ditto. * gcc/web.c (rest_of_handle_web): Ditto. * gcc/tree-stdarg.c (execute_optimize_stdarg): Ditto. * gcc/tree-ssa-math-opts.c (execute_cse_reciprocals): Ditto. * gcc/tree-ssa-dom.c (tree_ssa_dominator_optimize): Ditto. * gcc/tree-nrv.c (tree_nrv): Ditto. (execute_return_slot_opt): Ditto. * gcc/tree-ssa-alias.c (compute_may_aliases): Ditto. (create_structure_vars): Ditto. * gcc/loop-init.c (rtl_loop_init): Ditto. (rtl_loop_done): Ditto. (rtl_move_loop_invariants): Ditto. (rtl_unswitch): Ditto. (rtl_unroll_and_peel_loops): Ditto. (rtl_doloop): Ditto. * gcc/gimple-low.c (lower_function_body): Ditto. (mark_used_blocks): Ditto. * gcc/tree-ssa-sink.c (execute_sink_code): Ditto. * gcc/ipa-inline.c (cgraph_decide_inlining): Ditto. (cgraph_early_inlining): Ditto. * gcc/global.c (rest_of_handle_global_alloc): Ditto. * gcc/jump.c (cleanup_barriers): Ditto. (purge_line_number_notes): Ditto. * gcc/ifcvt.c (rest_of_handle_if_conversion): Ditto. (rest_of_handle_if_after_reload): Ditto. * gcc/tree-ssa-loop.c (tree_ssa_loop_init): Ditto. (tree_ssa_loop_im): Ditto. (tree_ssa_loop_unswitch): Ditto. (tree_vectorize): Ditto. (tree_linear_transform): Ditto. (tree_ssa_loop_ivcanon): Ditto. (tree_ssa_empty_loop): Ditto. (tree_ssa_loop_bounds): Ditto. (tree_complete_unroll): Ditto. (tree_ssa_loop_prefetch): Ditto. (tree_ssa_loop_ivopts): Ditto. (tree_ssa_loop_done): Ditto. * gcc/predict.c (tree_estimate_probability): Ditto. * gcc/recog.c (split_all_insns_noflow): Ditto. (rest_of_handle_peephole2): Ditto. (rest_of_handle_split_all_insns): Ditto. * gcc/tree-eh.c (lower_eh_constructs): Ditto. * gcc/regmove.c (rest_of_handle_regmove): Ditto. (rest_of_handle_stack_adjustments): Ditto. * gcc/local-alloc.c (rest_of_handle_local_alloc): Ditto. * gcc/function.c (instantiate_virtual_regs): Ditto. (init_function_for_compilation): Ditto. (rest_of_handle_check_leaf_regs): Ditto. * gcc/gcse.c (rest_of_handle_jump_bypass): Ditto. (rest_of_handle_gcse): Ditto. * gcc/ipa-type-escape.c (type_escape_execute): Ditto. * gcc/alias.c (rest_of_handle_cfg): Ditto. * gcc/tree-if-conv.c (main_tree_if_conversion): Ditto. * gcc/profile.c (rest_of_handle_branch_prob): Ditto. * gcc/tree-ssa-phiopt.c (tree_ssa_phiopt): Ditto. * gcc/rtl-factoring.c (rest_of_rtl_seqabstr): Ditto. * gcc/bt-load.c (rest_of_handle_branch_target_load_optimize): Ditto * gcc/tree-dfa.c (find_referenced_vars): Ditto. * gcc/except.c (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. (rest_of_handle_eh): Ditto. * gcc/emit-rtl.c (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. * gcc/except.h (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. * gcc/cfgexpand.c (tree_expand_cfg): Ditto. * gcc/tree-cfgcleanup.c (merge_phi_nodes): Ditto. * gcc/tree-ssa-pre.c (do_pre): Ditto. (execute_fre): Ditto. * gcc/cfgcleanup.c (rest_of_handle_jump): Ditto. (rest_of_handle_jump2): Ditto. * gcc/tree-sra.c (tree_sra): Ditto. * gcc/tree-mudflap.c (execute_mudflap_function_ops): Ditto. (execute_mudflap_function_decls): Ditto. * gcc/tree-ssa-copy.c (do_copy_prop): Ditto. (do_store_copy_prop): Ditto. * gcc/ipa-prop.h (ipcp_driver): Ditto. * gcc/cfglayout.c (insn_locators_initialize): Ditto. * gcc/tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars): Ditto. * gcc/cfglayout.h (insn_locators_initialize): Ditto. * gcc/tree-ssa-dce.c (tree_ssa_dce): Ditto. * gcc/tree-ssa.c (execute_early_warn_uninitialized): Ditto. (execute_late_warn_uninitialized): Ditto. * gcc/rtl.h (cleanup_barriers): Ditto. (split_all_insns_noflow): Ditto. (purge_line_number_notes): Ditto. (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. (recompute_reg_usage): Ditto. (variable_tracking_main): Ditto. * gcc/integrate.c (emit_initial_value_sets): Ditto. * gcc/integrate.h (emit_initial_value_sets): Ditto. * gcc/tree-optimize.c (execute_free_datastructures): Ditto (execute_free_cfg_annotations): Ditto. (execute_fixup_cfg): Ditto. (execute_cleanup_cfg_pre_ipa): Ditto. (execute_cleanup_cfg_post_optimizing): Ditto. (execute_init_datastructures): Ditto. * gcc/tree-object-size.c (compute_object_sizes): Ditto. * gcc/combine.c (rest_of_handle_combine): Ditto. * gcc/tree-outof-ssa.c (rewrite_out_of_ssa): Ditto. * gcc/bb-reorder.c (duplicate_computed_gotos): Ditto. (rest_of_handle_reorder_blocks): Ditto. (rest_of_handle_partition_blocks): Ditto. * gcc/var-tracking.c (variable_tracking_main): Ditto. * gcc/tree-profile.c (tree_profiling): Ditto. * gcc/tree-vect-generic.c (expand_vector_operations): Ditto. * gcc/reg-stack.c (rest_of_handle_stack_regs): Ditto. * gcc/sched-rgn.c (rest_of_handle_sched): Ditto. (rest_of_handle_sched2): Ditto. * gcc/basic-block.h (free_bb_insn): Ditto. * gcc/tree-ssa-structalias.c (ipa_pta_execute): Ditto. * gcc/tree-cfg.c (execute_build_cfg): Ditto. (remove_useless_stmts): Ditto. (split_critical_edges): Ditto. (execute_warn_function_return): Ditto. (execute_warn_function_noreturn): Ditto. * gcc/tree-ssa-reassoc.c (execute_reassoc): Ditto. * gcc/cfgrtl.c (free_bb_for_insn): Ditto. * gcc/passes.c (execute_one_pass): Run additional todos returned by execute function. * gcc/tree-pass.h (struct tree_opt_pass): Make execute return a value. From-SVN: r111643
2006-03-02 20:00:11 +01:00
extern unsigned int set_nothrow_function_flags (void);
extern void init_eh (void);
extern void init_eh_for_function (void);
extern rtx reachable_handlers (rtx);
void remove_eh_region (int);
extern void convert_from_eh_region_ranges (void);
tree-vrp.c (execute_vrp): Return value. 2006-03-02 Daniel Berlin <dberlin@dberlin.org> * gcc/tree-vrp.c (execute_vrp): Return value. * gcc/regrename.c (rest_of_handle_regrename): Ditto. * gcc/tree-into-ssa.c (rewrite_into_ssa): Ditto. * gcc/tree-complex.c (tree_lower_complex): Ditto. (tree_lower_complex_O0): Ditto. * gcc/tracer.c (rest_of_handle_tracer): Ditto. * gcc/postreload-gcse.c (rest_of_handle_gcse2): Ditto. * gcc/postreload.c (rest_of_handle_postreload): Ditto. * gcc/tree-tailcall.c (execute_tail_recursion): Ditto. (execute_tail_calls): Ditto. * gcc/tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * gcc/tree.h (init_function_for_compilation): Ditto. * gcc/ipa-cp.c (ipcp_driver): Ditto. * gcc/tree-scalar-evolution.c (scev_const_prop): Ditto. * gcc/tree-scalar-evolution.h (scev_const_prop): Ditto. * gcc/final.c (compute_alignments): Ditto. (rest_of_handle_final): Ditto. (rest_of_handle_shorten_branches): Ditto. (rest_of_clean_state): Ditto. * gcc/omp-low.c (execute_expand_omp): Ditto. (execute_lower_omp): Ditto. * gcc/tree-ssa-dse.c (tree_ssa_dse): Ditto. * gcc/ipa-reference.c (static_execute): Ditto. * gcc/tree-ssa-uncprop.c (tree_ssa_uncprop): Ditto. * gcc/reorg.c (rest_of_handle_delay_slots): Ditto. (rest_of_handle_machine_reorg): Ditto. * gcc/cgraphunit.c (rebuild_cgraph_edges): Ditto. * gcc/flow.c (recompute_reg_usage): Ditto. (rest_of_handle_remove_death_notes): Ditto. (rest_of_handle_life): Ditto. (rest_of_handle_flow2): Ditto. * gcc/tree-ssa-copyrename.c (rename_ssa_copies): Ditto. * gcc/tree-ssa-ccp.c (do_ssa_ccp): Ditto. (do_ssa_store_ccp): Ditto. (execute_fold_all_builtins): Ditto. * gcc/mode-switching.c (rest_of_handle_mode_switching): Ditto. * gcc/modulo-sched.c (rest_of_handle_sms): Ditto. * gcc/ipa-pure-const.c (static_execute): Ditto. * gcc/cse.c (rest_of_handle_cse): Ditto. (rest_of_handle_cse2): Ditto. * gcc/web.c (rest_of_handle_web): Ditto. * gcc/tree-stdarg.c (execute_optimize_stdarg): Ditto. * gcc/tree-ssa-math-opts.c (execute_cse_reciprocals): Ditto. * gcc/tree-ssa-dom.c (tree_ssa_dominator_optimize): Ditto. * gcc/tree-nrv.c (tree_nrv): Ditto. (execute_return_slot_opt): Ditto. * gcc/tree-ssa-alias.c (compute_may_aliases): Ditto. (create_structure_vars): Ditto. * gcc/loop-init.c (rtl_loop_init): Ditto. (rtl_loop_done): Ditto. (rtl_move_loop_invariants): Ditto. (rtl_unswitch): Ditto. (rtl_unroll_and_peel_loops): Ditto. (rtl_doloop): Ditto. * gcc/gimple-low.c (lower_function_body): Ditto. (mark_used_blocks): Ditto. * gcc/tree-ssa-sink.c (execute_sink_code): Ditto. * gcc/ipa-inline.c (cgraph_decide_inlining): Ditto. (cgraph_early_inlining): Ditto. * gcc/global.c (rest_of_handle_global_alloc): Ditto. * gcc/jump.c (cleanup_barriers): Ditto. (purge_line_number_notes): Ditto. * gcc/ifcvt.c (rest_of_handle_if_conversion): Ditto. (rest_of_handle_if_after_reload): Ditto. * gcc/tree-ssa-loop.c (tree_ssa_loop_init): Ditto. (tree_ssa_loop_im): Ditto. (tree_ssa_loop_unswitch): Ditto. (tree_vectorize): Ditto. (tree_linear_transform): Ditto. (tree_ssa_loop_ivcanon): Ditto. (tree_ssa_empty_loop): Ditto. (tree_ssa_loop_bounds): Ditto. (tree_complete_unroll): Ditto. (tree_ssa_loop_prefetch): Ditto. (tree_ssa_loop_ivopts): Ditto. (tree_ssa_loop_done): Ditto. * gcc/predict.c (tree_estimate_probability): Ditto. * gcc/recog.c (split_all_insns_noflow): Ditto. (rest_of_handle_peephole2): Ditto. (rest_of_handle_split_all_insns): Ditto. * gcc/tree-eh.c (lower_eh_constructs): Ditto. * gcc/regmove.c (rest_of_handle_regmove): Ditto. (rest_of_handle_stack_adjustments): Ditto. * gcc/local-alloc.c (rest_of_handle_local_alloc): Ditto. * gcc/function.c (instantiate_virtual_regs): Ditto. (init_function_for_compilation): Ditto. (rest_of_handle_check_leaf_regs): Ditto. * gcc/gcse.c (rest_of_handle_jump_bypass): Ditto. (rest_of_handle_gcse): Ditto. * gcc/ipa-type-escape.c (type_escape_execute): Ditto. * gcc/alias.c (rest_of_handle_cfg): Ditto. * gcc/tree-if-conv.c (main_tree_if_conversion): Ditto. * gcc/profile.c (rest_of_handle_branch_prob): Ditto. * gcc/tree-ssa-phiopt.c (tree_ssa_phiopt): Ditto. * gcc/rtl-factoring.c (rest_of_rtl_seqabstr): Ditto. * gcc/bt-load.c (rest_of_handle_branch_target_load_optimize): Ditto * gcc/tree-dfa.c (find_referenced_vars): Ditto. * gcc/except.c (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. (rest_of_handle_eh): Ditto. * gcc/emit-rtl.c (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. * gcc/except.h (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. * gcc/cfgexpand.c (tree_expand_cfg): Ditto. * gcc/tree-cfgcleanup.c (merge_phi_nodes): Ditto. * gcc/tree-ssa-pre.c (do_pre): Ditto. (execute_fre): Ditto. * gcc/cfgcleanup.c (rest_of_handle_jump): Ditto. (rest_of_handle_jump2): Ditto. * gcc/tree-sra.c (tree_sra): Ditto. * gcc/tree-mudflap.c (execute_mudflap_function_ops): Ditto. (execute_mudflap_function_decls): Ditto. * gcc/tree-ssa-copy.c (do_copy_prop): Ditto. (do_store_copy_prop): Ditto. * gcc/ipa-prop.h (ipcp_driver): Ditto. * gcc/cfglayout.c (insn_locators_initialize): Ditto. * gcc/tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars): Ditto. * gcc/cfglayout.h (insn_locators_initialize): Ditto. * gcc/tree-ssa-dce.c (tree_ssa_dce): Ditto. * gcc/tree-ssa.c (execute_early_warn_uninitialized): Ditto. (execute_late_warn_uninitialized): Ditto. * gcc/rtl.h (cleanup_barriers): Ditto. (split_all_insns_noflow): Ditto. (purge_line_number_notes): Ditto. (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. (recompute_reg_usage): Ditto. (variable_tracking_main): Ditto. * gcc/integrate.c (emit_initial_value_sets): Ditto. * gcc/integrate.h (emit_initial_value_sets): Ditto. * gcc/tree-optimize.c (execute_free_datastructures): Ditto (execute_free_cfg_annotations): Ditto. (execute_fixup_cfg): Ditto. (execute_cleanup_cfg_pre_ipa): Ditto. (execute_cleanup_cfg_post_optimizing): Ditto. (execute_init_datastructures): Ditto. * gcc/tree-object-size.c (compute_object_sizes): Ditto. * gcc/combine.c (rest_of_handle_combine): Ditto. * gcc/tree-outof-ssa.c (rewrite_out_of_ssa): Ditto. * gcc/bb-reorder.c (duplicate_computed_gotos): Ditto. (rest_of_handle_reorder_blocks): Ditto. (rest_of_handle_partition_blocks): Ditto. * gcc/var-tracking.c (variable_tracking_main): Ditto. * gcc/tree-profile.c (tree_profiling): Ditto. * gcc/tree-vect-generic.c (expand_vector_operations): Ditto. * gcc/reg-stack.c (rest_of_handle_stack_regs): Ditto. * gcc/sched-rgn.c (rest_of_handle_sched): Ditto. (rest_of_handle_sched2): Ditto. * gcc/basic-block.h (free_bb_insn): Ditto. * gcc/tree-ssa-structalias.c (ipa_pta_execute): Ditto. * gcc/tree-cfg.c (execute_build_cfg): Ditto. (remove_useless_stmts): Ditto. (split_critical_edges): Ditto. (execute_warn_function_return): Ditto. (execute_warn_function_noreturn): Ditto. * gcc/tree-ssa-reassoc.c (execute_reassoc): Ditto. * gcc/cfgrtl.c (free_bb_for_insn): Ditto. * gcc/passes.c (execute_one_pass): Run additional todos returned by execute function. * gcc/tree-pass.h (struct tree_opt_pass): Make execute return a value. From-SVN: r111643
2006-03-02 20:00:11 +01:00
extern unsigned int convert_to_eh_region_ranges (void);
extern void find_exception_handler_labels (void);
extern bool current_function_has_exception_handlers (void);
extern void output_function_exception_table (const char *);
[multiple changes] Thu Dec 11 20:42:18 1997 Teemu Torma <tot@trema.com> Thread-safe EH support for pthreads, DCE threads and Solaris threads. * integrate.c (expand_inline_function): If the inline fn uses eh context, make sure that the current fn has one. * toplev.c (rest_of_compilation): Call emit_eh_context. * except.c (use_eh_context): New fn. (get_eh_context_once): New fn. (call_get_eh_context): New fn. (emit_eh_context): New fn. (get_eh_context): Call either get_eh_context_once or call_get_eh_context, depending on what we have. (get_dynamic_handler_chain): Call get_eh_context_once. * except.h: Prototypes for fns above. * optabs.c (get_eh_context_libfunc): Removed. (init_optabs): Don't initialize it. * expr.h (get_eh_context_libfunc): Removed. * rtl.h, rtl.c: New reg_note REG_EH_CONTEXT. * config/pa/pa.h (CPP_SPEC): Support for -threads. * config/pa/pa-hpux10.h (LIB_SPEC): Ditto. * config/pa/t-pa (MULTILIB_OPTIONS, MULTILIB_DIRNAMES): New multilib for -threads. * config/sparc/t-sol2: Added multilibs for -threads and made -pthreads alias to it. * config/sparc/sol2.h (CPP_SPEC, LIB_SPEC): Added -threads and -pthreads options. * libgcc-thr.h: New file. * libgcc2.c: (__get_cpp_eh_context): Removed. (struct cpp_eh_context): Removed. (struct eh_context): Replaced cpp_eh_context with generic language specific pointer. (__get_eh_info): New function. (__throw): Check eh_context::info. (__sjthrow): Ditto. * libgcc2.c: Include libgcc-thr.h. (new_eh_context, __get_eh_context, eh_pthread_initialize, eh_context_initialize, eh_context_static, eh_context_specific, eh_context_free): New functions. (get_eh_context, eh_context_key): New variables. (__sjthrow, __sjpopnthrow, __eh_pcnthrow, __throw): Use get_eh_context to get the context. (longjmp): Move the declaration inside #ifdef DONT_USE_BUILTIN_SETJMP. * frame.c: Include libgcc-thr.h. (object_mutex): Mutex to protect the object list. (find_fde, __register_frame, __register_frame_table, __deregister_frame): Hold the lock while accessing objects. * except.h (get_eh_context): Declare. * except.c (current_function_ehc): Define. (current_function_dhc, current_function_dcc): Removed. (get_eh_context): New function. (get_dynamic_handler_chain): Use get_eh_context. (get_saved_pc_ref): Ditto. (get_dynamic_cleanup_chain): Removed references to current_function_dcc. (save_eh_status, restore_eh_status): Save and restore current_function_ehc instead. * optabs.c (get_eh_context_libfunc): New variable. (init_optabs): Initialize it. * expr.h: Declare get_eh_context_libfunc. * function.h (struct function): Replaced dhc and dcc with ehc. * except.c (get_saved_pc_ref): New functions. (eh_saved_pc_rtx, eh_saved_pc): Deleted. (expand_internal_throw_indirect): Use get_saved_pc_ref() instead of eh_saved_pc. (end_eh_unwinder): Likewise. (init_eh): Remove initialization of eh_saved_pc. * optabs.c (get_saved_pc_libfunc): New variable. (init_optabs): Initialize it. * expr.h: Declare get_saved_pc_libfunc. * except.h (eh_saved_pc_rtx): Deleted. (get_saved_pc_ref): Declared. From Scott Snyder <snyder@d0sgif.fnal.gov>: * libgcc2.c (__get_saved_pc): New. (__eh_type, __eh_pc): Deleted. (__eh_pcnthrow): Use __get_saved_pc() instead of __eh_pc. (__get_dynamic_handler_chain): Move __dynamic_handler_chain inside this fcn. cp/: Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com> * decl.c (ptr_ptr_type_node): Define. (init_decl_processing): Initialize it. * cp-tree.h: Declare it. * exception.cc (__cp_exception_info): Use __get_eh_info. (__cp_push_exception): Ditto. (__cp_pop_exception): Ditto. From Scott Snyder <snyder@d0sgif.fnal.gov>: * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of saved_pc. (init_exception_processing): Removed saved_pc initialization. From-SVN: r17052
1997-12-12 05:53:20 +01:00
extern void expand_builtin_unwind_init (void);
extern rtx expand_builtin_eh_return_data_regno (tree);
extern rtx expand_builtin_extract_return_addr (tree);
extern void expand_builtin_init_dwarf_reg_sizes (tree);
extern rtx expand_builtin_frob_return_addr (tree);
extern rtx expand_builtin_dwarf_sp_column (void);
extern void expand_builtin_eh_return (tree, tree);
extern void expand_eh_return (void);
extern rtx expand_builtin_extend_pointer (tree);
gengtype.c (write_root): Param_is argument is OK. * gengtype.c (write_root): Param_is argument is OK. * expr.c (expand_expr_real_1): Update call of get_exception_*. * function.h: Include varray.h (rtl_eh): New stucture based on except.c one. (call_site_record): New forward declaration and vector type. * calls.c (emit_call_1): Do not call note_current_region_may_contain_throw. * except.c (eh_status): Remove cur_region, try_region since they are unused. Move filter, exc_ptr, ttype_data, ehspec_data, action_record_data and exception_handler_label_map, ehr_stackadj, ehr_handler, ehr_label, sjlj_fc, sjlj_exit_after to rth_eh in function.h. Remove call_site_data_used, call_site_data_size. Turn call_site_record into vector in function.h. (note_current_region_may_contain_throw): Remove. (get_exception_pointer, get_exception_filter): Do not take struct function argument; update. (add_ehl_entry, find_exception_handler_labels, ehspec_filter_hash, add_ttypes_entry, add_ehspec_entry, assign_filter_values, build_post_landing_pads, dw2_build_landing_pads, sjlj_assign_call_site_values, sjlj_mark_call_sites, sjlj_emit_function_enter, sjlj_emit_function_enter, sjlj_emit_function_exit, sjlj_emit_dispatch_table, sjlj_build_landing_pads, finish_eh_generation, remove_exception_handler_label, remove_eh_handler, maybe_remove_eh_handler, add_reachable_handler, reachable_handlers, expand_builtin_eh_return, expand_eh_return, add_action_record, collect_one_action_chain, add_call_site, convert_to_eh_region_ranges, sjlj_size_of_call_site_table, sjlj_output_call_site_table, output_function_exception_table, * except.h (note_current_region_may_contain_throw): Remove (get_exception_pointer, get_exception_filter): Do not take struct function argument. * Makefile.in (GTFILES): Put varargs before struct function. From-SVN: r134328
2008-04-15 21:37:22 +02:00
extern rtx get_exception_pointer (void);
extern rtx get_exception_filter (void);
typedef tree (*duplicate_eh_regions_map) (tree, void *);
extern int duplicate_eh_regions (struct function *, duplicate_eh_regions_map,
void *, int, int);
extern void sjlj_emit_function_exit_after (rtx);
Makefile.in: Set and use UNWIND_H. 2005-06-28 Paul Brook <paul@codesourcery.com> gcc/ * Makefile.in: Set and use UNWIND_H. Install as unwind.h. * c-decl.c (finish_decl): Call default_init_unwind_resume_libfunc. * except.c (add_ehspec_entry): Generate arm eabi filter lists. (assign_filter_values): Ditto. (output_ttype): New function. (output_function_exception_table): Use output_ttype. Generate arm eabi filter lists. (default_init_unwind_resume_libfunc): New function. * except.h (default_init_unwind_resume_libfunc): Add prototype. * optabs.c (init_optabs): Don't set unwind_resume_libfunc. * opts.c (decode_options): Use targetm.unwind_tables_default. * target-def.h (TARGET_ASM_TTYPE): Provide and use definition. (TARGET_ARM_EABI_UNWINDER, TARGET_UNWIND_TABLES_DEFAULT): Ditto. * target.h (struct gcc_target): Add asm.ttype, unwind_tables_default and arm_eabi_unwinder. * unwind-c.c: Support Arm EABI unwinder. * unwind.h: Rename ... * unwind-generic.h: ... To this. * doc/tm.texi (TARGET_ASM_TTYPE, TARGET_ARM_EABI_UNWINDER): Document. (TARGET_UNWID_TABLES_DEFAULT): Document. * config/arm/arm-protos.h (arm_output_fn_unwind): Add prototype. * config/arm/arm.c (arm_unwind_emit, arm_output_ttype): New functions. (TARGET_UNWIND_EMIT, TARGET_ASM_TTYPE, TARGET_ARM_EABI_UNWINDER): Define. (thumb_pushpop, thumb_output_function_prologue): Output unwinding directives. (arm_unwind_emit_stm, arm_unwind_emit_set): New functions. * config/arm/arm.h (MUST_USE_SJLJ_EXCEPTIONS): Only define when !TARGET_UNWIND_INFO. (ARM_OUTPUT_FN_UNWIND, ARM_EABI_UNWIND_TABLES): Define. * config/arm/bpabi.h (TARGET_UNWIND_INFO): Define. * config/arm/elf.h (ASM_DECLARE_FUNCTION_NAME, ASM_DECLARE_FUNCTION_SIZE): Use ARM_OUTPUT_FN_UNWIND. * config/arm/lib1funcs.asm: Include libunwind.S. * config/arm/libgcc-bpabi.ver: Add unwinding routines. * config/arm/libunwind.S: New file. * config/arm/pr-support.c: New file. * config/arm/t-bpabi (LIB1ASMFUNCS): Add _unwind. (UNWIND_H, LIB2ADDEH, LIB2ADDEHDEP): Set. * config/arm/t-symbian (UNWIND_H, LIB2ADDEH, LIB2ADDEHDEP): Set. * config/arm/unwind-arm.c: New file. * config/arm/unwind-arm.h: New file. * config/i386/t-netware (USER_H): Remove unwind.h. * config/ia64/ia64.h (TARGET_UNWIND_TABLES_DEFAULT): Define. gcc/cp/ * Make-lang.in (cp/except.o): Depend on $(TARGET_H) * except.c: Include target.h. (init_exception_processing): Initialize unwind_resume_libfunc. * doc/tm.texi: Document TARGET_ASM_TTYPE gcc/ada/ * misc.c (gnat_init_gcc_eh): Call default_init_unwind_resume_libfunc. gcc/java/ * decl.c (java_init_decl_processing): Call default_init_unwind_resume_libfunc. gcc/objc/ * objc-act.c (objc_init_exceptions): Call default_init_unwind_resume_libfunc. libstdc++/ * acinclude.m4 (GLIBCXX_ENABLE_SJLJ_EXCEPTIONS): Check for __cxa_end_cleanup. * libsupc++/Makefile.am (sources): Add eh_call.c and eh_arm.c. * libsupc++/eh_arm.cc: New file. * libsupc++/eh_call.cc: New file. * libsupc++/eh_catch.cc (__cxa_get_exception_ptr): Use __gxx_caught_object. (__cxa_begin_catch): Ditto. Use __is_gxx_exception_class. Call _Unwind_Complete when using the ARM EABI. (__cxa_end_catch): Use __is_gxx_exception_class. * libsupc++/eh_personality.cc: Define NO_SIZE_OF_ENCODED_VALUE when using the ARM EABI. (save_caught_exception, restore_caught_exception): New functions. (_throw_typet): New typedef. (get_ttype_entry, get_adjusted_ptr, check_exception_spec): Add ARM EABI implementations. (PERSONALITY_FUNCTION): Use new functions. Addd support for ARM EABI unwinding libary. (__cxa_unexpected): Disable when using the ARM EABI. * libsupc++/eh_throw.cc (__cxa_throw): Use __GXX_INIT_EXCEPTION_CLASS. (__cxa_rethrow): Use __is_gxx_exception_class. Call _Unwind_RaiseException when using the ARM EABI. * libsupc++/unwind-cxx.h (struct __cxa_exception): Add fields for ARM EABI semantics. (struct __cxa_eh_globals): Ditto. (__cxa_call_terminate): Add prototype. (__cxa_type_match, __cxa_begin_cleanup, __cxa_end_cleanup): Add prototypes. (__get_exception_header_from_obj, __get_exception_header_from_ue): Move earlier in file. (__is_gxx_exception_class, __GXX_INIT_EXCEPTION_CLASS, __gxx_caught_object): New functions. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * libmath/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * src/Makefie.in: Regenerate. * testsuite/makefile.in: Regenerate. From-SVN: r101385
2005-06-28 21:52:27 +02:00
extern void default_init_unwind_resume_libfunc (void);
extern struct eh_region *gen_eh_region_cleanup (struct eh_region *,
struct eh_region *);
extern struct eh_region *gen_eh_region_try (struct eh_region *);
extern struct eh_region *gen_eh_region_catch (struct eh_region *, tree);
extern struct eh_region *gen_eh_region_allowed (struct eh_region *, tree);
extern struct eh_region *gen_eh_region_must_not_throw (struct eh_region *);
extern int get_eh_region_number (struct eh_region *);
extern bool get_eh_region_may_contain_throw (struct eh_region *);
extern tree get_eh_region_no_tree_label (int);
extern tree get_eh_region_tree_label (struct eh_region *);
extern void set_eh_region_tree_label (struct eh_region *, tree);
extern void foreach_reachable_handler (int, bool, bool,
void (*) (struct eh_region *, void *),
void *);
extern void collect_eh_region_array (void);
extern void expand_resx_expr (tree);
extern void verify_eh_tree (struct function *);
extern void dump_eh_tree (FILE *, struct function *);
void debug_eh_tree (struct function *);
extern int eh_region_outermost (struct function *, int, int);
extern void add_type_for_runtime (tree);
extern tree lookup_type_for_runtime (tree);
/* If non-NULL, this is a function that returns an expression to be
executed if an unhandled exception is propagated out of a cleanup
region. For example, in C++, an exception thrown by a destructor
during stack unwinding is required to result in a call to
`std::terminate', so the C++ version of this function returns a
CALL_EXPR for `std::terminate'. */
backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch. 2008-07-28 Richard Guenther <rguenther@suse.de> Merge from gimple-tuples-branch. * ChangeLog.tuples: ChangeLog from gimple-tuples-branch. * gimple.def: New file. * gsstruct.def: Likewise. * gimple-iterator.c: Likewise. * gimple-pretty-print.c: Likewise. * tree-gimple.c: Removed. Merged into ... * gimple.c: ... here. New file. * tree-gimple.h: Removed. Merged into ... * gimple.h: ... here. New file. * Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h. * configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the --enable-checking=gimple flag. * config.in: Likewise. * configure: Regenerated. * tree-ssa-operands.h: Tuplified. * tree-vrp.c: Likewise. * tree-loop-linear.c: Likewise. * tree-into-ssa.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-dump.c: Likewise. * tree-complex.c: Likewise. * cgraphbuild.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-pretty-print.c: Likewise. * tracer.c: Likewise. * gengtype.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * tree-ssa-loop-manip.c: Likewise. * value-prof.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-tailcall.c: Likewise. * value-prof.h: Likewise. * tree.c: Likewise. * tree.h: Likewise. * tree-pass.h: Likewise. * ipa-cp.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-scalar-evolution.h: Likewise. * target.h: Likewise. * lambda-mat.c: Likewise. * tree-phinodes.c: Likewise. * diagnostic.h: Likewise. * builtins.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * cfghooks.c: Likewise. * fold-const.c: Likewise. * cfghooks.h: Likewise. * omp-low.c: Likewise. * tree-ssa-dse.c: Likewise. * ipa-reference.c: Likewise. * tree-ssa-uncprop.c: Likewise. * toplev.c: Likewise. * tree-gimple.c: Likewise. * tree-gimple.h: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sccvn.h: Likewise. * cgraphunit.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-nomudflap.c: Likewise. * tree-call-cdce.c: Likewise. * ipa-pure-const.c: Likewise. * c-format.c: Likewise. * tree-stdarg.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-nrv.c: Likewise. * tree-ssa-propagate.c: Likewise. * ipa-utils.c: Likewise. * tree-ssa-propagate.h: Likewise. * tree-ssa-alias.c: Likewise. * gimple-low.c: Likewise. * tree-ssa-sink.c: Likewise. * ipa-inline.c: Likewise. * c-semantics.c: Likewise. * dwarf2out.c: Likewise. * expr.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * predict.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-parloops.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * matrix-reorg.c: Likewise. * c-decl.c: Likewise. * tree-eh.c: Likewise. * c-pretty-print.c: Likewise. * lambda-trans.c: Likewise. * function.c: Likewise. * langhooks.c: Likewise. * ebitmap.h: Likewise. * tree-vectorizer.c: Likewise. * function.h: Likewise. * langhooks.h: Likewise. * tree-vectorizer.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * domwalk.c: Likewise. * tree-if-conv.c: Likewise. * profile.c: Likewise. * domwalk.h: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-flow-inline.h: Likewise. * tree-affine.c: Likewise. * tree-vect-analyze.c: Likewise. * c-typeck.c: Likewise. * gimplify.c: Likewise. * coretypes.h: Likewise. * tree-ssa-phiopt.c: Likewise. * calls.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree.def: Likewise. * tree-dfa.c: Likewise. * except.c: Likewise. * except.h: Likewise. * cfgexpand.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-live.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.h: Likewise. * tree-predcom.c: Likewise. * lambda.h: Likewise. * tree-mudflap.c: Likewise. * ipa-prop.c: Likewise. * print-tree.c: Likewise. * tree-ssa-copy.c: Likewise. * ipa-prop.h: Likewise. * tree-ssa-forwprop.c: Likewise. * ggc-page.c: Likewise. * c-omp.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-nested.c: Likewise. * tree-ssa.c: Likewise. * lambda-code.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-inline.c: Likewise. * tree-inline.h: Likewise. * tree-iterator.c: Likewise. * tree-optimize.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-vect-transform.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * cfgloop.c: Likewise. * system.h: Likewise. * tree-profile.c: Likewise. * cfgloop.h: Likewise. * c-gimplify.c: Likewise. * c-common.c: Likewise. * tree-vect-generic.c: Likewise. * tree-flow.h: Likewise. * c-common.h: Likewise. * basic-block.h: Likewise. * tree-ssa-structalias.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-ssa-structalias.h: Likewise. * tree-cfg.c: Likewise. * passes.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * tree-ssa-reassoc.c: Likewise. * cfgrtl.c: Likewise. * varpool.c: Likewise. * stmt.c: Likewise. * tree-ssanames.c: Likewise. * tree-ssa-threadedge.c: Likewise. * langhooks-def.h: Likewise. * tree-ssa-operands.c: Likewise. * config/alpha/alpha.c: Likewise. * config/frv/frv.c: Likewise. * config/s390/s390.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32c/m32c-protos.h: Likewise. * config/spu/spu.c: Likewise. * config/sparc/sparc.c: Likewise. * config/i386/i386.c: Likewise. * config/sh/sh.c: Likewise. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/pa/pa.c: Likewise. * config/mips/mips.c: Likewise. From-SVN: r138207
2008-07-28 16:33:56 +02:00
extern gimple (*lang_protect_cleanup_actions) (void);
/* Return true if type A catches type B. */
extern int (*lang_eh_type_covers) (tree a, tree b);
/* Map a type to a runtime object to match type. */
extern tree (*lang_eh_runtime_type) (tree);
/* Just because the user configured --with-sjlj-exceptions=no doesn't
mean that we can use call frame exceptions. Detect that the target
has appropriate support. */
#ifndef MUST_USE_SJLJ_EXCEPTIONS
# if defined (EH_RETURN_DATA_REGNO) \
&& (defined (TARGET_UNWIND_INFO) \
|| (DWARF2_UNWIND_INFO \
defaults.h (ASM_PREFERRED_EH_DATA_FORMAT): New. * 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-05-12 08:03:20 +02:00
&& (defined (EH_RETURN_HANDLER_RTX) \
|| defined (HAVE_eh_return))))
# define MUST_USE_SJLJ_EXCEPTIONS 0
# else
# define MUST_USE_SJLJ_EXCEPTIONS 1
# endif
#endif
#ifdef CONFIG_SJLJ_EXCEPTIONS
# if CONFIG_SJLJ_EXCEPTIONS == 1
# define USING_SJLJ_EXCEPTIONS 1
# endif
# if CONFIG_SJLJ_EXCEPTIONS == 0
# define USING_SJLJ_EXCEPTIONS 0
# if !defined(EH_RETURN_DATA_REGNO)
#error "EH_RETURN_DATA_REGNO required"
# endif
# if ! (defined(TARGET_UNWIND_INFO) || DWARF2_UNWIND_INFO)
#error "{DWARF2,TARGET}_UNWIND_INFO required"
# endif
# if !defined(TARGET_UNWIND_INFO) \
&& !(defined(EH_RETURN_HANDLER_RTX) || defined(HAVE_eh_return))
#error "EH_RETURN_HANDLER_RTX or eh_return required"
# endif
/* Usually the above error checks will have already triggered an
error, but backends may set MUST_USE_SJLJ_EXCEPTIONS for their own
reasons. */
# if MUST_USE_SJLJ_EXCEPTIONS
#error "Must use SJLJ exceptions but configured not to"
# endif
# endif
#else
# define USING_SJLJ_EXCEPTIONS MUST_USE_SJLJ_EXCEPTIONS
#endif
struct throw_stmt_node GTY(())
{
backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch. 2008-07-28 Richard Guenther <rguenther@suse.de> Merge from gimple-tuples-branch. * ChangeLog.tuples: ChangeLog from gimple-tuples-branch. * gimple.def: New file. * gsstruct.def: Likewise. * gimple-iterator.c: Likewise. * gimple-pretty-print.c: Likewise. * tree-gimple.c: Removed. Merged into ... * gimple.c: ... here. New file. * tree-gimple.h: Removed. Merged into ... * gimple.h: ... here. New file. * Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h. * configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the --enable-checking=gimple flag. * config.in: Likewise. * configure: Regenerated. * tree-ssa-operands.h: Tuplified. * tree-vrp.c: Likewise. * tree-loop-linear.c: Likewise. * tree-into-ssa.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-dump.c: Likewise. * tree-complex.c: Likewise. * cgraphbuild.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-pretty-print.c: Likewise. * tracer.c: Likewise. * gengtype.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * tree-ssa-loop-manip.c: Likewise. * value-prof.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-tailcall.c: Likewise. * value-prof.h: Likewise. * tree.c: Likewise. * tree.h: Likewise. * tree-pass.h: Likewise. * ipa-cp.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-scalar-evolution.h: Likewise. * target.h: Likewise. * lambda-mat.c: Likewise. * tree-phinodes.c: Likewise. * diagnostic.h: Likewise. * builtins.c: Likewise. * tree-ssa-alias-warnings.c: Likewise. * cfghooks.c: Likewise. * fold-const.c: Likewise. * cfghooks.h: Likewise. * omp-low.c: Likewise. * tree-ssa-dse.c: Likewise. * ipa-reference.c: Likewise. * tree-ssa-uncprop.c: Likewise. * toplev.c: Likewise. * tree-gimple.c: Likewise. * tree-gimple.h: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sccvn.h: Likewise. * cgraphunit.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-nomudflap.c: Likewise. * tree-call-cdce.c: Likewise. * ipa-pure-const.c: Likewise. * c-format.c: Likewise. * tree-stdarg.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-nrv.c: Likewise. * tree-ssa-propagate.c: Likewise. * ipa-utils.c: Likewise. * tree-ssa-propagate.h: Likewise. * tree-ssa-alias.c: Likewise. * gimple-low.c: Likewise. * tree-ssa-sink.c: Likewise. * ipa-inline.c: Likewise. * c-semantics.c: Likewise. * dwarf2out.c: Likewise. * expr.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * predict.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-parloops.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * matrix-reorg.c: Likewise. * c-decl.c: Likewise. * tree-eh.c: Likewise. * c-pretty-print.c: Likewise. * lambda-trans.c: Likewise. * function.c: Likewise. * langhooks.c: Likewise. * ebitmap.h: Likewise. * tree-vectorizer.c: Likewise. * function.h: Likewise. * langhooks.h: Likewise. * tree-vectorizer.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * domwalk.c: Likewise. * tree-if-conv.c: Likewise. * profile.c: Likewise. * domwalk.h: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-flow-inline.h: Likewise. * tree-affine.c: Likewise. * tree-vect-analyze.c: Likewise. * c-typeck.c: Likewise. * gimplify.c: Likewise. * coretypes.h: Likewise. * tree-ssa-phiopt.c: Likewise. * calls.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree.def: Likewise. * tree-dfa.c: Likewise. * except.c: Likewise. * except.h: Likewise. * cfgexpand.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-live.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-live.h: Likewise. * tree-predcom.c: Likewise. * lambda.h: Likewise. * tree-mudflap.c: Likewise. * ipa-prop.c: Likewise. * print-tree.c: Likewise. * tree-ssa-copy.c: Likewise. * ipa-prop.h: Likewise. * tree-ssa-forwprop.c: Likewise. * ggc-page.c: Likewise. * c-omp.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-nested.c: Likewise. * tree-ssa.c: Likewise. * lambda-code.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-inline.c: Likewise. * tree-inline.h: Likewise. * tree-iterator.c: Likewise. * tree-optimize.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-vect-transform.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * cfgloop.c: Likewise. * system.h: Likewise. * tree-profile.c: Likewise. * cfgloop.h: Likewise. * c-gimplify.c: Likewise. * c-common.c: Likewise. * tree-vect-generic.c: Likewise. * tree-flow.h: Likewise. * c-common.h: Likewise. * basic-block.h: Likewise. * tree-ssa-structalias.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-ssa-structalias.h: Likewise. * tree-cfg.c: Likewise. * passes.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * tree-ssa-reassoc.c: Likewise. * cfgrtl.c: Likewise. * varpool.c: Likewise. * stmt.c: Likewise. * tree-ssanames.c: Likewise. * tree-ssa-threadedge.c: Likewise. * langhooks-def.h: Likewise. * tree-ssa-operands.c: Likewise. * config/alpha/alpha.c: Likewise. * config/frv/frv.c: Likewise. * config/s390/s390.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32c/m32c-protos.h: Likewise. * config/spu/spu.c: Likewise. * config/sparc/sparc.c: Likewise. * config/i386/i386.c: Likewise. * config/sh/sh.c: Likewise. * config/xtensa/xtensa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/pa/pa.c: Likewise. * config/mips/mips.c: Likewise. From-SVN: r138207
2008-07-28 16:33:56 +02:00
gimple stmt;
int region_nr;
};
extern struct htab *get_eh_throw_stmt_table (struct function *);
extern void set_eh_throw_stmt_table (struct function *, struct htab *);
extern void remove_unreachable_regions (sbitmap, sbitmap);
extern VEC(int,heap) * label_to_region_map (void);
extern int num_eh_regions (void);