1992-03-05 15:20:59 -05:00
|
|
|
|
/* Structure for saving state for a nested function.
|
1998-04-04 08:32:39 -05:00
|
|
|
|
Copyright (C) 1989, 92-97, 1998 Free Software Foundation, Inc.
|
1992-03-05 15:20:59 -05:00
|
|
|
|
|
|
|
|
|
This file is part of GNU CC.
|
|
|
|
|
|
|
|
|
|
GNU CC 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 2, or (at your option)
|
|
|
|
|
any later version.
|
|
|
|
|
|
|
|
|
|
GNU CC 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.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with GNU CC; see the file COPYING. If not, write to
|
1995-06-15 07:52:21 -04:00
|
|
|
|
the Free Software Foundation, 59 Temple Place - Suite 330,
|
|
|
|
|
Boston, MA 02111-1307, USA. */
|
1992-03-05 15:20:59 -05:00
|
|
|
|
|
|
|
|
|
|
1998-05-28 02:47:21 -04:00
|
|
|
|
#if !defined(NULL_TREE) && !defined(tree)
|
|
|
|
|
typedef union union_node *_function_tree;
|
|
|
|
|
#define tree _function_tree
|
1992-03-05 15:20:59 -05:00
|
|
|
|
#endif
|
1998-05-28 02:47:21 -04:00
|
|
|
|
#if !defined(NULL_RTX) && !defined(rtx)
|
|
|
|
|
typedef struct rtx_def *_function_rtx;
|
|
|
|
|
#define rtx _function_rtx
|
1992-03-05 15:20:59 -05:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
struct var_refs_queue
|
1994-12-30 07:58:35 -05:00
|
|
|
|
{
|
|
|
|
|
rtx modified;
|
|
|
|
|
enum machine_mode promoted_mode;
|
|
|
|
|
int unsignedp;
|
|
|
|
|
struct var_refs_queue *next;
|
|
|
|
|
};
|
1992-03-05 15:20:59 -05:00
|
|
|
|
|
|
|
|
|
/* Stack of pending (incomplete) sequences saved by `start_sequence'.
|
|
|
|
|
Each element describes one pending sequence.
|
|
|
|
|
The main insn-chain is saved in the last element of the chain,
|
|
|
|
|
unless the chain is empty. */
|
|
|
|
|
|
|
|
|
|
struct sequence_stack
|
|
|
|
|
{
|
|
|
|
|
/* First and last insns in the chain of the saved sequence. */
|
|
|
|
|
rtx first, last;
|
1993-11-25 18:10:26 -05:00
|
|
|
|
tree sequence_rtl_expr;
|
1992-03-05 15:20:59 -05:00
|
|
|
|
struct sequence_stack *next;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
extern struct sequence_stack *sequence_stack;
|
1995-03-15 16:48:01 -05:00
|
|
|
|
|
|
|
|
|
/* Stack of single obstacks. */
|
|
|
|
|
|
|
|
|
|
struct simple_obstack_stack
|
|
|
|
|
{
|
|
|
|
|
struct obstack *obstack;
|
|
|
|
|
struct simple_obstack_stack *next;
|
|
|
|
|
};
|
1992-03-05 15:20:59 -05:00
|
|
|
|
|
|
|
|
|
/* This structure can save all the important global and static variables
|
|
|
|
|
describing the status of the current function. */
|
|
|
|
|
|
|
|
|
|
struct function
|
|
|
|
|
{
|
|
|
|
|
struct function *next;
|
|
|
|
|
|
|
|
|
|
/* For function.c. */
|
|
|
|
|
char *name;
|
|
|
|
|
tree decl;
|
|
|
|
|
int pops_args;
|
|
|
|
|
int returns_struct;
|
|
|
|
|
int returns_pcc_struct;
|
1996-04-16 10:19:48 -04:00
|
|
|
|
int returns_pointer;
|
1992-03-05 15:20:59 -05:00
|
|
|
|
int needs_context;
|
|
|
|
|
int calls_setjmp;
|
|
|
|
|
int calls_longjmp;
|
|
|
|
|
int calls_alloca;
|
|
|
|
|
int has_nonlocal_label;
|
1993-09-16 02:13:29 -04:00
|
|
|
|
int has_nonlocal_goto;
|
1995-03-15 16:48:01 -05:00
|
|
|
|
int contains_functions;
|
1999-02-08 16:39:33 -05:00
|
|
|
|
int has_computed_jump;
|
1997-04-23 22:55:16 -04:00
|
|
|
|
int is_thunk;
|
1998-11-20 02:37:42 -05:00
|
|
|
|
rtx nonlocal_goto_handler_slots;
|
1999-02-25 18:45:42 -05:00
|
|
|
|
rtx nonlocal_goto_handler_labels;
|
1992-03-05 15:20:59 -05:00
|
|
|
|
rtx nonlocal_goto_stack_level;
|
|
|
|
|
tree nonlocal_labels;
|
|
|
|
|
int args_size;
|
|
|
|
|
int pretend_args_size;
|
|
|
|
|
rtx arg_offset_rtx;
|
1994-04-06 07:49:37 -04:00
|
|
|
|
int varargs;
|
1995-07-14 08:02:43 -04:00
|
|
|
|
int stdarg;
|
1992-03-05 15:20:59 -05:00
|
|
|
|
int max_parm_reg;
|
|
|
|
|
rtx *parm_reg_stack_loc;
|
|
|
|
|
int outgoing_args_size;
|
|
|
|
|
rtx return_rtx;
|
|
|
|
|
rtx cleanup_label;
|
|
|
|
|
rtx return_label;
|
|
|
|
|
rtx save_expr_regs;
|
|
|
|
|
rtx stack_slot_list;
|
|
|
|
|
rtx parm_birth_insn;
|
1996-12-07 18:49:30 -05:00
|
|
|
|
HOST_WIDE_INT frame_offset;
|
1992-03-05 15:20:59 -05:00
|
|
|
|
rtx tail_recursion_label;
|
|
|
|
|
rtx tail_recursion_reentry;
|
|
|
|
|
rtx internal_arg_pointer;
|
1998-06-08 06:52:37 -04:00
|
|
|
|
char *cannot_inline;
|
1992-03-05 15:20:59 -05:00
|
|
|
|
rtx arg_pointer_save_area;
|
|
|
|
|
tree rtl_expr_chain;
|
|
|
|
|
rtx last_parm_insn;
|
|
|
|
|
tree context_display;
|
|
|
|
|
tree trampoline_list;
|
|
|
|
|
int function_call_count;
|
|
|
|
|
struct temp_slot *temp_slots;
|
|
|
|
|
int temp_slot_level;
|
1998-04-04 08:32:39 -05:00
|
|
|
|
int target_temp_slot_level;
|
|
|
|
|
int var_temp_slot_level;
|
1998-07-30 06:38:22 -04:00
|
|
|
|
int instrument_entry_exit;
|
1992-03-05 15:20:59 -05:00
|
|
|
|
/* This slot is initialized as 0 and is added to
|
|
|
|
|
during the nested function. */
|
|
|
|
|
struct var_refs_queue *fixup_var_refs_queue;
|
1997-01-03 07:51:40 -05:00
|
|
|
|
CUMULATIVE_ARGS args_info;
|
1992-03-05 15:20:59 -05:00
|
|
|
|
|
|
|
|
|
/* For stmt.c */
|
|
|
|
|
struct nesting *block_stack;
|
|
|
|
|
struct nesting *stack_block_stack;
|
|
|
|
|
struct nesting *cond_stack;
|
|
|
|
|
struct nesting *loop_stack;
|
|
|
|
|
struct nesting *case_stack;
|
|
|
|
|
struct nesting *nesting_stack;
|
|
|
|
|
int nesting_depth;
|
|
|
|
|
int block_start_count;
|
|
|
|
|
tree last_expr_type;
|
|
|
|
|
rtx last_expr_value;
|
|
|
|
|
int expr_stmts_for_value;
|
|
|
|
|
char *emit_filename;
|
|
|
|
|
int emit_lineno;
|
|
|
|
|
struct goto_fixup *goto_fixup_chain;
|
|
|
|
|
|
1996-07-23 16:03:47 -04:00
|
|
|
|
/* For exception handling information. */
|
|
|
|
|
struct eh_stack ehstack;
|
1998-05-14 09:39:15 -04:00
|
|
|
|
struct eh_stack catchstack;
|
1996-07-23 16:03:47 -04:00
|
|
|
|
struct eh_queue ehqueue;
|
|
|
|
|
rtx catch_clauses;
|
|
|
|
|
struct label_node *false_label_stack;
|
|
|
|
|
struct label_node *caught_return_label_stack;
|
|
|
|
|
tree protect_list;
|
[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-11 23:53:20 -05:00
|
|
|
|
rtx ehc;
|
1996-07-23 16:03:47 -04:00
|
|
|
|
|
1992-03-05 15:20:59 -05:00
|
|
|
|
/* For expr.c. */
|
1998-10-22 22:18:53 -04:00
|
|
|
|
rtx pending_chain;
|
1992-03-05 15:20:59 -05:00
|
|
|
|
int pending_stack_adjust;
|
|
|
|
|
int inhibit_defer_pop;
|
|
|
|
|
rtx saveregs_value;
|
1993-03-23 07:54:30 -05:00
|
|
|
|
rtx apply_args_value;
|
1992-03-05 15:20:59 -05:00
|
|
|
|
rtx forced_labels;
|
1998-10-10 22:21:54 -04:00
|
|
|
|
int check_memory_usage;
|
1992-03-05 15:20:59 -05:00
|
|
|
|
|
|
|
|
|
/* For emit-rtl.c. */
|
|
|
|
|
int reg_rtx_no;
|
|
|
|
|
int first_label_num;
|
|
|
|
|
rtx first_insn;
|
|
|
|
|
rtx last_insn;
|
1993-11-25 18:10:26 -05:00
|
|
|
|
tree sequence_rtl_expr;
|
1992-03-05 15:20:59 -05:00
|
|
|
|
struct sequence_stack *sequence_stack;
|
|
|
|
|
int cur_insn_uid;
|
|
|
|
|
int last_linenum;
|
|
|
|
|
char *last_filename;
|
|
|
|
|
char *regno_pointer_flag;
|
1995-12-27 15:22:03 -05:00
|
|
|
|
char *regno_pointer_align;
|
1992-03-05 15:20:59 -05:00
|
|
|
|
int regno_pointer_flag_length;
|
|
|
|
|
rtx *regno_reg_rtx;
|
|
|
|
|
|
|
|
|
|
/* For stor-layout.c. */
|
|
|
|
|
tree permanent_type_chain;
|
|
|
|
|
tree temporary_type_chain;
|
|
|
|
|
tree permanent_type_end;
|
|
|
|
|
tree temporary_type_end;
|
|
|
|
|
tree pending_sizes;
|
|
|
|
|
int immediate_size_expand;
|
|
|
|
|
|
|
|
|
|
/* For tree.c. */
|
|
|
|
|
int all_types_permanent;
|
|
|
|
|
struct momentary_level *momentary_stack;
|
|
|
|
|
char *maybepermanent_firstobj;
|
|
|
|
|
char *temporary_firstobj;
|
|
|
|
|
char *momentary_firstobj;
|
1994-03-08 15:51:59 -05:00
|
|
|
|
char *momentary_function_firstobj;
|
1992-03-05 15:20:59 -05:00
|
|
|
|
struct obstack *current_obstack;
|
|
|
|
|
struct obstack *function_obstack;
|
|
|
|
|
struct obstack *function_maybepermanent_obstack;
|
|
|
|
|
struct obstack *expression_obstack;
|
|
|
|
|
struct obstack *saveable_obstack;
|
|
|
|
|
struct obstack *rtl_obstack;
|
1995-03-15 16:48:01 -05:00
|
|
|
|
struct simple_obstack_stack *inline_obstacks;
|
1992-03-05 15:20:59 -05:00
|
|
|
|
|
|
|
|
|
/* For integrate.c. */
|
|
|
|
|
int uses_const_pool;
|
|
|
|
|
|
|
|
|
|
/* For md files. */
|
|
|
|
|
int uses_pic_offset_table;
|
1993-10-10 23:03:17 -04:00
|
|
|
|
/* tm.h can use this to store whatever it likes. */
|
|
|
|
|
struct machine_function *machine;
|
1992-09-25 01:52:11 -04:00
|
|
|
|
|
|
|
|
|
/* For reorg. */
|
|
|
|
|
rtx epilogue_delay_list;
|
1992-10-10 05:44:58 -04:00
|
|
|
|
|
|
|
|
|
/* For varasm. */
|
|
|
|
|
struct constant_descriptor **const_rtx_hash_table;
|
|
|
|
|
struct pool_sym **const_rtx_sym_hash_table;
|
|
|
|
|
struct pool_constant *first_pool, *last_pool;
|
|
|
|
|
int pool_offset;
|
[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-11 23:53:20 -05:00
|
|
|
|
rtx const_double_chain;
|
1992-03-05 15:20:59 -05:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* The FUNCTION_DECL for an inline function currently being expanded. */
|
|
|
|
|
extern tree inline_function_decl;
|
|
|
|
|
|
1999-05-30 09:33:11 -04:00
|
|
|
|
/* Label that will go on parm cleanup code, if any.
|
|
|
|
|
Jumping to this label runs cleanup code for parameters, if
|
|
|
|
|
such code must be run. Following this code is the logical return label. */
|
|
|
|
|
|
|
|
|
|
extern rtx cleanup_label;
|
|
|
|
|
|
1992-03-05 15:20:59 -05:00
|
|
|
|
/* Label that will go on function epilogue.
|
|
|
|
|
Jumping to this label serves as a "return" instruction
|
|
|
|
|
on machines which require execution of the epilogue on all returns. */
|
1999-05-30 09:33:11 -04:00
|
|
|
|
|
1992-03-05 15:20:59 -05:00
|
|
|
|
extern rtx return_label;
|
|
|
|
|
|
1999-05-30 09:33:11 -04:00
|
|
|
|
/* Offset to end of allocated area of stack frame.
|
|
|
|
|
If stack grows down, this is the address of the last stack slot allocated.
|
|
|
|
|
If stack grows up, this is the address for the next slot. */
|
|
|
|
|
extern HOST_WIDE_INT frame_offset;
|
|
|
|
|
|
|
|
|
|
/* Label to jump back to for tail recursion, or 0 if we have
|
|
|
|
|
not yet needed one for this function. */
|
|
|
|
|
extern rtx tail_recursion_label;
|
|
|
|
|
|
|
|
|
|
/* Place after which to insert the tail_recursion_label if we need one. */
|
|
|
|
|
extern rtx tail_recursion_reentry;
|
|
|
|
|
|
|
|
|
|
/* Location at which to save the argument pointer if it will need to be
|
|
|
|
|
referenced. There are two cases where this is done: if nonlocal gotos
|
|
|
|
|
exist, or if vars whose is an offset from the argument pointer will be
|
|
|
|
|
needed by inner routines. */
|
|
|
|
|
|
|
|
|
|
extern rtx arg_pointer_save_area;
|
|
|
|
|
|
|
|
|
|
/* Chain of all RTL_EXPRs that have insns in them. */
|
|
|
|
|
extern tree rtl_expr_chain;
|
|
|
|
|
|
1992-03-05 15:20:59 -05:00
|
|
|
|
/* List (chain of EXPR_LISTs) of all stack slots in this function.
|
|
|
|
|
Made for the sake of unshare_all_rtl. */
|
|
|
|
|
extern rtx stack_slot_list;
|
|
|
|
|
|
1992-08-11 15:50:24 -04:00
|
|
|
|
/* Given a function decl for a containing function,
|
|
|
|
|
return the `struct function' for it. */
|
1993-03-19 21:17:20 -05:00
|
|
|
|
struct function *find_function_data PROTO((tree));
|
1992-08-11 15:50:24 -04:00
|
|
|
|
|
|
|
|
|
/* Pointer to chain of `struct function' for containing functions. */
|
|
|
|
|
extern struct function *outer_function_chain;
|
|
|
|
|
|
|
|
|
|
/* Put all this function's BLOCK nodes into a vector and return it.
|
|
|
|
|
Also store in each NOTE for the beginning or end of a block
|
|
|
|
|
the index of that block in the vector. */
|
1993-10-10 23:03:17 -04:00
|
|
|
|
extern tree *identify_blocks PROTO((tree, rtx));
|
|
|
|
|
|
1996-12-07 18:49:30 -05:00
|
|
|
|
/* Return size needed for stack frame based on slots so far allocated.
|
|
|
|
|
This size counts from zero. It is not rounded to STACK_BOUNDARY;
|
|
|
|
|
the caller may have to do that. */
|
|
|
|
|
extern HOST_WIDE_INT get_frame_size PROTO((void));
|
|
|
|
|
|
1993-10-10 23:03:17 -04:00
|
|
|
|
/* These variables hold pointers to functions to
|
|
|
|
|
save and restore machine-specific data,
|
|
|
|
|
in push_function_context and pop_function_context. */
|
[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-11 23:53:20 -05:00
|
|
|
|
extern void (*save_machine_status) PROTO((struct function *));
|
|
|
|
|
extern void (*restore_machine_status) PROTO((struct function *));
|
1992-08-11 15:50:24 -04:00
|
|
|
|
|
[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-11 23:53:20 -05:00
|
|
|
|
/* Save and restore status information for a nested function. */
|
|
|
|
|
extern void save_tree_status PROTO((struct function *, tree));
|
|
|
|
|
extern void restore_tree_status PROTO((struct function *, tree));
|
|
|
|
|
extern void save_varasm_status PROTO((struct function *, tree));
|
1994-12-30 07:58:35 -05:00
|
|
|
|
extern void restore_varasm_status PROTO((struct function *));
|
[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-11 23:53:20 -05:00
|
|
|
|
extern void save_eh_status PROTO((struct function *));
|
|
|
|
|
extern void restore_eh_status PROTO((struct function *));
|
|
|
|
|
extern void save_stmt_status PROTO((struct function *));
|
|
|
|
|
extern void restore_stmt_status PROTO((struct function *));
|
|
|
|
|
extern void save_expr_status PROTO((struct function *));
|
|
|
|
|
extern void restore_expr_status PROTO((struct function *));
|
|
|
|
|
extern void save_emit_status PROTO((struct function *));
|
|
|
|
|
extern void restore_emit_status PROTO((struct function *));
|
|
|
|
|
extern void save_storage_status PROTO((struct function *));
|
|
|
|
|
extern void restore_storage_status PROTO((struct function *));
|
1994-12-30 07:58:35 -05:00
|
|
|
|
|
1998-06-20 19:55:13 -04:00
|
|
|
|
extern rtx get_first_block_beg PROTO((void));
|
|
|
|
|
|
1992-03-05 15:20:59 -05:00
|
|
|
|
#ifdef rtx
|
|
|
|
|
#undef rtx
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef tree
|
|
|
|
|
#undef tree
|
|
|
|
|
#endif
|