Commit Graph

39 Commits

Author SHA1 Message Date
Jeff Law
79f565f6bd [multiple changes]
Sun May 30 14:29:17 1999  Eric Raskin (ehr@listworks.com)
        * dgux.h (STARTFILE_SPEC): Fix incorrectly matched curly-braces.
Sun May 30 14:19:13 1999  Jeffrey A Law  (law@cygnus.com)
        * function.h (cleanup_label, frame_offset): Declare.
        (tail_recursion_label, tail_recursion_reentry): Likewise.
        (arg_pointer_save_area, rtl_expr_chain): Likewise.
        * stmt.c (cleanup_label, frame_offset): Delete extern declarations.
        (tail_recursion_label, tail_recursion_reentry): Likewise.
        (arg_pointer_save_area, rtl_expr_chain): Likewise.

From-SVN: r27249
1999-05-30 07:33:11 -06:00
Richard Henderson
e881bb1b1b Flow rewrite to use basic block structures and edge lists.
From-SVN: r25450
1999-02-25 15:45:42 -08:00
Richard Henderson
acd693d10c output.h (current_function_has_computed_jump): Rename from current_function_addresses_labels.
* output.h (current_function_has_computed_jump): Rename from
        current_function_addresses_labels.
        * function.h (struct function): Likewise for addresses_labels member.
        * rtl.h (FUNCTION_FLAGS_HAS_COMPUTED_JUMP): Likewise.
        * function.c (current_function_has_computed_jump): Likewise.
        Update all references.
        * integrate.c (function_cannot_inline_p):
        Test current_function_has_computed_jump instead of addresses_labels.
        (initialize_for_inline): Likewise save.
        (output_inline_function): Likewise restore.
        * expr.c (expand_expr): Don't reference addresses_labels variables.
        * stmt.c (expand_computed_goto): Set has_computed_jump.

From-SVN: r25100
1999-02-08 13:39:33 -08:00
Jeffrey A Law
ab87f8c8d1 Merge in gcc2 snapshot 19980929. See gcc/ChangeLog and gcc/FSFChangeLog for
details.

From-SVN: r24879
1999-01-26 18:43:17 -07:00
Bernd Schmidt
ba716ac925 function.c (nonlocal_goto_handler_slots): Renamed from nonlocal_goto_handler_slot; now an EXPR_LIST chain.
* function.c (nonlocal_goto_handler_slots): Renamed from
        nonlocal_goto_handler_slot; now an EXPR_LIST chain.
        (push_function_context_to): Adjust for this change.
        (pop_function_context_from): Likewise.
        (init_function_start): Likewise.
        (expand_function_end): Likewise.
        * function.h (struct function): Likewise.
        * calls.c (expand_call): Likewise.
        * explow.c (allocate_dynamic_stack_space): Likewise.
        * expr.h (nonlocal_goto_handler_slots): Rename its declaration.
        * stmt.c (declare_nonlocal_label): Make a new handler slot for each
        label.
        (expand_goto): When doing a nonlocal goto, find corresponding handler
        slot for it.  Don't put the label address in the static chain register.
        (expand_end_bindings): Break out nonlocal goto handling code into
        three new functions.
        (expand_nl_handler_label, expand_nl_goto_receiver,
        expand_nl_goto_receivers): New static functions, broken out of
        expand_end_bindings and adapted to create one handler per nonlocal
        label.
        * function.c (delete_handlers): Delete insn if it references any of
        the nonlocal goto handler slots.
        * i960.md (nonlocal_goto): Comment out code that modifies
        static_chain_rtx.
        * sparc.md (nonlocal_goto): Likewise.
        (goto_handler_and_restore_v9): Comment out.
        (goto_handler_and_restore_v9_sp64): Comment out.

From-SVN: r23732
1998-11-20 00:37:42 -07:00
Jason Merrill
fdc46fbe65 expr.c (pending_chain): Move up.
* expr.c (pending_chain): Move up.
	(save_expr_status): Do save pending_chain.
	(restore_expr_status): And restore it.
	* function.h (struct function): Add pending_chain.

From-SVN: r23241
1998-10-22 22:18:53 -04:00
Ken Raeburn
7d384cc0b3 Fine-grained control of -fcheck-memory-usage with new no_check_memory_usage attribute.
Fine-grained control of -fcheck-memory-usage with new no_check_memory_usage
attribute.  Misc minor bugfixes and tests for it too.

From-SVN: r22983
1998-10-11 02:21:54 +00:00
Richard Henderson
710384268d tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused.
* tree.h (BUILT_IN_CALLER_RETURN_ADDRESS): Unused.  Kill.
	(BUILT_IN_FP, BUILT_IN_SP, BUILT_IN_SET_RETURN_ADDR_REG): Kill.
	(BUILT_IN_EH_STUB_OLD, BUILT_IN_EH_STUB, BUILT_IN_SET_EH_REGS): Kill.
	(BUILT_IN_EH_RETURN, BUILT_IN_DWARF_CFA): New.
	* c-decl.c (init_decl_processing): Update accordingly.
	* expr.c (expand_builtin): Likewise.
	* cp/decl.c (init_decl_processing): Likewise.
	* rtl.h (global_rtl): Add cfa entry.
	(virtual_cfa_rtx, VIRTUAL_CFA_REGNUM): New.
	(LAST_VIRTUAL_REGISTER): Update.
	* emit-rtl.c (global_rtl): Add cfa entry.
	(init_emit): Initialize it.
	* function.c (cfa_offset): New.
	(instantiate_virtual_regs): Initialize it.
	(instantiate_virtual_regs_1): Instantiate virtual_cfa_rtx.
	(expand_function_end): Call expand_eh_return.
	* tm.texi (ARG_POINTER_CFA_OFFSET): New.
	* except.c (current_function_eh_stub_label): Kill.
	(current_function_eh_old_stub_label): Likwise; update all references.
	(expand_builtin_set_return_addr_reg): Kill.
	(expand_builtin_eh_stub_old, expand_builtin_eh_stub): Kill.
	(expand_builtin_set_eh_regs): Kill.
	(eh_regs): Produce a third reg for the actual handler address.
	(eh_return_context, eh_return_stack_adjust): New.
	(eh_return_handler, eh_return_stub_label): New.
	(init_eh_for_function): Initialize them.
	(expand_builtin_eh_return, expand_eh_return): New.
	* except.h: Update prototypes.
	* flow.c (find_basic_blocks_1): Update references to the stub label.
	* function.h (struct function): Kill stub label elements.
	* libgcc2.c (in_reg_window): For REG_SAVED_REG, check that the
	register number is one that would be in the previous window.
	Provide a dummy definition for non-windowed targets.
	(get_reg_addr): New function.
	(get_reg, put_reg, copy_reg): Use it.
	(__throw): Rely on in_reg_window, not INCOMING_REGNO.  Kill stub
	generating code and use __builtin_eh_return.  Use __builtin_dwarf_cfa.
	* alpha.c (alpha_eh_epilogue_sp_ofs): New.
	(alpha_init_expanders): Initialize it.
	(alpha_expand_epilogue): Use it.
	* alpha.h: Declare it.
	* alpha.md (eh_epilogue): New.
	* m68h.h (ARG_POINTER_CFA_OFFSET): New.
	* sparc.h (ARG_POINTER_CFA_OFFSET): New.

From-SVN: r22436
1998-09-15 12:19:12 -07:00
Bernd Schmidt
c708eef986 except.h (current_function_eh_stub_label): Declare.
* except.h (current_function_eh_stub_label): Declare.
        (current_function_eh_old_stub_label): Declare.
        * function.h (struct function): New members eh_stub_label and
        eh_old_stub_label.
        * except.c (current_function_eh_stub_label): New variable.
        (current_function_eh_old_stub_label): New variable.
        (init_eh_for_function): Clear them.
        (save_eh_status): Save them.
        (restore_eh_status): Restore them.
        (expand_builtin_eh_stub): Set current_function_eh_stub_label.
        (expand_builtin_eh_stub_old): Set current_function_eh_old_stub_label.
        * flow.c (find_basic_blocks_1): When handling a REG_LABEL note, don't
        make an edge from the block that contains it to the block starting
        with the label if this label is one of the eh stub labels.
        If eh stub labels exist, show they are reachable from the last block
        in the function.

From-SVN: r22369
1998-09-09 15:48:42 -06:00
Ken Raeburn
07417085a1 Function entry/exit profiling instrumentation:
* expr.h (profile_function_entry_libfunc, profile_function_exit_libfunc):
Declare new variables.
* optabs.c: Define them here.
(init_optabs): Initialize them.
* tree.h (struct tree_decl): New flag no_instrument_function_entry_exit.
(DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT): New accessor macro.
* c-decl.c (duplicate_decls): Merge it.
* c-common.c (enum attrs): New value A_NO_INSTRUMENT_FUNCTION.
(init_attributes): Use it for "no_instrument_function".
(decl_attributes): Handle it, for functions that have not yet been compiled.
Set decl flag.
* flags.h (flag_instrument_function_entry_exit): Declare new variable.
* toplev.c (flag_instrument_function_entry_exit): Define it here.
(f_options): New option "instrument-functions".
* function.h (struct function): New field instrument_entry_exit.
* function.c (current_function_instrument_entry_exit): New variable.
(push_function_context_to, pop_function_context_from): Save and restore.
(expand_function_start): Set current_ variable, maybe emit return label and
entry profile call.
(expand_function_end): Maybe emit exit profile call.
Testsuite:
* gcc.c-torture/special/eeprof-1.c: New test, for -finstrument-functions.
* gcc.c-torture/special/special.exp: Run it.

From-SVN: r21495
1998-07-30 10:38:22 +00:00
H.J. Lu
a24da858ab flow.c (allocate_for_life_analysis, [...]): Remove declaration.
* flow.c (allocate_for_life_analysis, init_regset_vector):
        Remove declaration.
        * function.h (get_first_block_beg): New declaration.
        * gbl-ctors.h (__do_global_dtors): Add prototype.
        * gcov-io.h (__fetch_long): New declaration.
        (__store_long): Likewise.
        (__read_long): Likewise.
        (__write_long): Likewise.
        * gcov.c (print_usage): New declaration.
        * Makefile.in (c-iterate.o): Depend on insn-codes.h too.

From-SVN: r20631
1998-06-20 17:55:13 -06:00
Jason Merrill
aeb302bbec function.c: Define current_function_cannot_inline.
* function.c: Define current_function_cannot_inline.
	(push_function_context_to): Save it.
	(pop_function_context_from): Restore it.
	* function.h (struct function): Provide it a home.
	* output.h: Declare it.
	* integrate.c (function_cannot_inline_p): Check it.
	* decl.c (cp_finish_decl): Disable inlining of extern inlines
	with static variables.

From-SVN: r20332
1998-06-08 06:52:37 -04:00
Michael Meissner
d05a5492a5 Make rtx, tree types type correct if the appropriate include files was not included
From-SVN: r20114
1998-05-28 06:47:21 +00:00
Andrew MacLeod
9a0d1e1b11 First cut of changes to utilize the new exception handling model
From-SVN: r19746
1998-05-14 13:39:15 +00:00
Jeff Law
e5e809f419 * Check in merge from gcc2. See ChangeLog.11 and ChangeLog.12
for details.

        * haifa-sched.c: Mirror recent changes from gcc2.

From-SVN: r18984
1998-04-04 06:32:39 -07:00
Teemu Torma
154bba13a4 [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
Jason Merrill
173cd503de x
From-SVN: r13974
1997-04-24 02:55:16 +00:00
Mike Stump
e976b8b277 Add setjmp/longjmp exception handling.
From-SVN: r13968
1997-04-23 20:04:25 +00:00
Richard Kenner
1de9b9763f (struct function): New field args_info.
From-SVN: r13354
1997-01-03 07:51:40 -05:00
Richard Kenner
9a807d3a23 (struct function): Make frame_offset be HOST_WIDE_INT.
(get_frame_size): Add definition.

From-SVN: r13244
1996-12-07 18:49:30 -05:00
Mike Stump
6adb4e3a29 install EH code
From-SVN: r12549
1996-07-23 20:03:47 +00:00
Richard Kenner
04aa3b9c26 (struct function): New field returns_pointer.
From-SVN: r11813
1996-04-16 10:19:48 -04:00
Richard Kenner
f30d95d264 (struct function): New field regno_pointer_align.
From-SVN: r10867
1995-12-27 15:22:03 -05:00
Richard Kenner
7da7e61109 (struct function): Add stdarg field.
From-SVN: r10122
1995-07-14 08:02:43 -04:00
Richard Kenner
a35311b035 Update FSF address.
From-SVN: r9961
1995-06-15 07:52:21 -04:00
Jason Merrill
a0dabda52b Handle compilation of nested functions from another scope.
From-SVN: r9185
1995-03-15 21:48:01 +00:00
Richard Kenner
a00b8dfa62 ({save_restore}_varasm_status): Add decls.
From-SVN: r8711
1994-12-30 07:58:35 -05:00
Richard Kenner
91ab952c02 (struct function): New field for current_function_varargs.
From-SVN: r6985
1994-04-06 07:49:37 -04:00
Jim Wilson
b810045319 (struct function): Add momentary_function_firstobj
field.

From-SVN: r6724
1994-03-08 12:51:59 -08:00
Richard Kenner
f55eed9920 (struct sequence_stack): New field sequence_rtl_expr.
(struct function): Likewise.

From-SVN: r6160
1993-11-25 18:10:26 -05:00
Richard Stallman
d6e1b011e1 (struct function): New field `machine'.
From-SVN: r5722
1993-10-11 03:03:17 +00:00
Jim Wilson
6766466421 (struct function): New field has_nonlocal_goto.
From-SVN: r5337
1993-09-15 23:13:29 -07:00
Tom Wood
d12b538233 (struct function): Add apply_args_value field.
From-SVN: r3844
1993-03-23 12:54:30 +00:00
Jim Wilson
521f2d6fcb Add prototypes.
From-SVN: r3794
1993-03-19 18:17:20 -08:00
Richard Stallman
b76227eaa5 (struct function): New fields const_rtx_hash_table,
const_rtx_sym_hash_table, first_pool, last_pool, pool_offset.

From-SVN: r2392
1992-10-10 09:44:58 +00:00
Jim Wilson
bd2315502c (struct function): Add epilogue_delay_list field.
From-SVN: r2244
1992-09-24 22:52:11 -07:00
Richard Kenner
c56d91f8e7 (struct var_refs_queue): Remove unused field ORIGINAL.
Add new fields PROMOTED_MODE and UNSIGNEDP.

From-SVN: r2176
1992-09-19 15:47:28 -04:00
Jim Wilson
ba534a45c7 (identify_blocks): Declare.
(rtx, tree): Move undefs to the very end.

From-SVN: r1798
1992-08-11 12:50:24 -07:00
Charles Hannum
bf6beae550 entered into RCS
From-SVN: r396
1992-03-05 20:20:59 +00:00