aboutsummaryrefslogtreecommitdiff
path: root/gcc/libgcc2.c
AgeCommit message (Collapse)AuthorFilesLines
1997-12-29Do not define inhibit_libc if it was already definedMichael Meissner1-1/+1
From-SVN: r17258
1997-12-24Makefile.in (GTHREAD_FLAGS): New var.Teemu Torma1-2/+7
* Makefile.in (GTHREAD_FLAGS): New var. (LIBGCC2_CFLAGS): Added $(GTHREAD_FLAGS). (distclean): Remove gthr-default.h. * configure.in: Accept dce as a thread package. Check for thread.h and pthread.h. Link gthr-default.h to appropriate thread file and set gthread_flags. (hppa1.1-*-hpux10*): If --enable-threads, use dce threads and include multilib definitions from pa/t-dce-thr. (sparc-*-solaris2*): Enable threads by default, if thread.h or pthread.h is found, preferring posix threads over solaris ones. * config/pa/t-dce-thr: New file. * config/pa/t-pa: Removed multilibs. * config/sparc/t-sol2: Ditto. * gthr.h: New file. * gthr-single.h: New file. * gthr-posix.h: New file. * gthr-solaris.h: New file. * gthr-dce.h: New file. * libgcc-thr.h: Removed. * objc/thr-dce.c: New file copied from thr-decosf1.c. * frame.c: Include gthr.h instead of libgcc-thr.h. * libgcc2.c: Include gthr.h instead of libgcc-thr.h. (eh_context_initialize): If __gthread_once fails, use static eh context. (eh_context_free): Call __gthread_key_dtor. From-SVN: r17235
1997-12-19*** empty log message ***Jeff Law1-0/+3
From-SVN: r17156
1997-12-12except.c (use_eh_context): Don't copy_rtx a REG.Jason Merrill1-174/+4
* except.c (use_eh_context): Don't copy_rtx a REG. (emit_throw): Lose old unwinder support. (expand_internal_throw): Likewise. * libgcc2.c (struct eh_context): Likewise. (new_eh_context): Likewise. (__get_eh_info): Lose redundant cast. (__get_dynamic_handler_chain): Likewise. (__get_saved_pc): Lose. Lose all old unwinder support code. * decl2.c (finish_file): Lose call to expand_builtin_throw. * except.c (expand_builtin_throw): Remove. * cp-tree.h: Remove ptr_ptr_type_node. * decl.c: Likewise. From-SVN: r17054
1997-12-11[multiple changes]Teemu Torma1-30/+176
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-11Another handful of gcc-2.8 changes (will it ever go out the door?).Jeff Law1-1/+1
See ChangeLog.11 for details. From-SVN: r17040
1997-12-09* Partially cleaned up prototyping code from HJ.Jeffrey A Law1-2/+1
* haifa-sched.c (haifa_classify_insn): Renamed from classify_insn. All references changed. * rtl.h: Protect from multiple inclusions. Add many prototypes. * libgcc2.c (string.h): Hoist inclusion to occur before first use of string functions like strlen. More pending patches. From-SVN: r17024
1997-12-06Merge from gcc-2.8Jeff Law1-1/+12
From-SVN: r16987
1997-12-04./: * libgcc2.c (__throw): Use __builtin_return_addr instead of __eh_pc.Jason Merrill1-3/+4
* except.c: Lose outer_context_label_stack. (expand_eh_region_end): Rethrow from outer_context here. (expand_fixup_region_end): Let expand_eh_region_end do the rethrow. (expand_internal_throw): Take no args. (expand_internal_throw_indirect): Lose. (expand_leftover_cleanups, expand_start_all_catch): Use expand_rethrow. (expand_start_all_catch): Start a rethrow region. (expand_end_all_catch): End it. (expand_rethrow): New fn. * except.h: Reflect above changes. cp/: * except.c (expand_end_catch_block): Lose rethrow region. (expand_start_catch_block): Likewise. (expand_end_catch_block): Don't expand_leftover_cleanups. From-SVN: r16937
1997-11-26integrate.c (output_inline_function): Just unset DECL_INLINE.Jason Merrill1-0/+1
* integrate.c (output_inline_function): Just unset DECL_INLINE. Tue Nov 25 23:33:29 1997 scott snyder <snyder@d0sgif.fnal.gov> * dwarf2out.c (outout_call_frame_info): Ensure that the info has proper alignment. * libgcc2.c (__throw): Initialize HANDLER. From-SVN: r16724
1997-11-20Makefile.in (LIB2FUNCS): Remove C++ memory management support.Jason Merrill1-155/+0
./: * Makefile.in (LIB2FUNCS): Remove C++ memory management support. * libgcc2.c: Remove __builtin_new, __builtin_vec_new, set_new_handler, __builtin_delete, and __builtin_vec_delete. * except.c (output_exception_table): Don't bother with __EXCEPTION_END__. cp/: * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs. (various.o): Likewise. * inc/new: Add placement deletes. Add throw specs for default new. * new.cc (set_new_handler): Move here from libgcc2. * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler. (new): Move from libgcc2. Throw bad_alloc. * new2.cc: Move the rest of the op news and op deletes from libgcc2. * decl.c (init_decl_processing): Update exception specs on new and delete. From-SVN: r16617
1997-10-31[multiple changes]Jason Merrill1-4/+6
Fri Oct 31 01:45:31 1997 Jason Merrill <jason@yorick.cygnus.com> * libgcc2.c (L_eh): Define __eh_pc. Replace __eh_type with generic pointer __eh_info. Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com> Support for nested exceptions. * tinfo2.cc (__is_pointer): New fn. * exception.cc (struct cp_eh_info): Define. (__cp_exception_info, __uncatch_exception): New fns. (__cp_push_exception, __cp_pop_exception): New fns. * except.c: Lose saved_throw_{type,value,cleanup,in_catch}. Lose empty_fndecl. (init_exception_processing): Likewise. __eh_pc is now external. (push_eh_info): New fn. (get_eh_{info,value,type,caught}): New fns. (push_eh_cleanup): Just call __cp_pop_exception. (expand_start_catch_block): Use push_eh_info. Start the eh region sooner. (expand_end_eh_spec): Use push_eh_info. (expand_throw): Call __cp_push_exception to set up the exception info. Just pass the destructor or 0 as the cleanup. Call __uncatch_exception when we rethrow. (expand_builtin_throw): Don't refer to empty_fndecl. From-SVN: r16248
1997-10-18tree.c (restore_tree_status): Also free up temporary storage when we finish ↵Jason Merrill1-1/+1
a toplevel function. * tree.c (restore_tree_status): Also free up temporary storage when we finish a toplevel function. (dump_tree_statistics): Print stats for backend obstacks. * libgcc2.c (__throw): Don't copy the return address. * dwarf2out.c (expand_builtin_dwarf_reg_size): Ignore return address. * except.c (exceptions_via_longjmp): Initialize to 2 (uninitialized). * toplev.c (main): Initialize exceptions_via_longjmp. * tree.c: Add extra_inline_obstacks. (save_tree_status): Use it. (restore_tree_status): If this is a toplevel inline obstack and we didn't want to save anything on it, recycle it. (print_inline_obstack_statistics): New fn. * function.c (pop_function_context_from): Pass context to restore_tree_status. * obstack.h (obstack_empty_p): New macro. From-SVN: r16050
1997-09-28* libgcc2.c (__throw): Fix thinko.Jason Merrill1-1/+1
From-SVN: r15781
1997-09-27c-decl.c (init_decl_processing): Add __builtin_dwarf_reg_size.Jason Merrill1-6/+18
* c-decl.c (init_decl_processing): Add __builtin_dwarf_reg_size. * tree.h (built_in_function): Likewise. * expr.c (expand_builtin): Likewise. * except.h: Likewise. * dwarf2out.c (expand_builtin_dwarf_reg_size): New fn. * libgcc2.c (copy_reg): New fn. (__throw): Use it. From-SVN: r15750
1997-09-18final.c (final_scan_insn): Hand BARRIERs off to the dwarf2 code.Jason Merrill1-9/+6
* final.c (final_scan_insn): Hand BARRIERs off to the dwarf2 code. * dwarf2out.c (dwarf2out_frame_debug): Pass the whole insn along. (dwarf2out_stack_adjust): A BARRIER resets the args space to 0. * except.c (end_eh_unwinder): Subtract 1 from return address. * libgcc2.c (__throw): Likewise. (find_exception_handler): Don't change PC here. Compare end with >. From-SVN: r15554
1997-09-17libgcc2.c (find_exception_handler): Subtract one from our PC when looking ↵Jason Merrill1-0/+4
for a handler... * libgcc2.c (find_exception_handler): Subtract one from our PC when looking for a handler, to avoid hitting the beginning of the next region. * except.c (expand_builtin_set_return_addr_reg): Use force_operand. From-SVN: r15534
1997-09-16* libgcc2.c (find_exception_handler): Not found is -1.Jason Merrill1-4/+4
From-SVN: r15504
1997-09-15dwarf2 EH supportJason Merrill1-111/+349
From-SVN: r15464
1997-09-10Clean up patches for delta88 nested function support.Jim Wilson1-2/+2
* m88k/m88k.c (struct option): Rename to struct options. * m88k/dolph.h (INITIALIZE_TRAMPOLINE): Delete here. * m88k/sysv3.h (INITIALIZE_TRAMPOLINE): Delete ifdef and comments. * libgcc2.c (__enable_execute_stack): Check for __sysV88__ not __DOLPHIN__ or sysV88. From-SVN: r15393
1997-09-10* m88k/sysv3.h (INITIALIZE_TRAMPOLINE) Define.Manfred Hollstein1-2/+2
* libgcc2.c (__enable_execute_stack): Provide for sysV88 too. From-SVN: r15256
1997-08-02(_trampoline): Rework last change; both getpagesize and mprotect areRichard Kenner1-13/+15
in cygwin32. From-SVN: r14636
1997-07-31Don't compile getpagesize if __CYGWIN32__Ian Lance Taylor1-0/+4
From-SVN: r14571
1997-07-02(_trampoline): Add stdcall attribute to VirtualProtect on i386.Richard Kenner1-0/+4
From-SVN: r14371
1997-06-19* libgcc2.c (__eh_type): Remove `extern' to make this a definition.Mike Stump1-1/+1
From-SVN: r14260
1997-06-18libgcc2.c (__eh_pcnthrow): Add support -fno-sjlj-exceptions -fPIC exception ↵Mike Stump1-3/+3
handling on the SPARC. * libgcc2.c (__eh_pcnthrow): Add support -fno-sjlj-exceptions -fPIC exception handling on the SPARC. * sparc.h (DONT_ACCESS_GBLS_AFTER_EPILOGUE): Likewise. * libgcc2.c (__eh_ffetmnpc): Remove. From-SVN: r14252
1997-06-06libgcc2.c (__eh_ffetmnpc): Add support for machines that cannot access ↵Mike Stump1-0/+10
globals after throw's epilogue when... * libgcc2.c (__eh_ffetmnpc): Add support for machines that cannot access globals after throw's epilogue when -fno-sjlj-exceptions is used. * rs6000.c (DONT_ACCESS_GBLS_AFTER_EPILOGUE): Likewise. * mips.h (DONT_ACCESS_GBLS_AFTER_EPILOGUE): Likewise. (INITIAL_ELIMINATION_OFFSET): Fix RETURN_ADDRESS_POINTER_REGNUM for 64 bit words, with 32 bit pointers and variable endianness. Fixes throwing across shared library lines (useful at times on mips and rs6000) From-SVN: r14168
1997-05-18(atexit): Cast malloc and realloc calls.Richard Kenner1-3/+4
From-SVN: r14077
1997-05-07except.c (start_dynamic_handler): Fix so that we can use __builtin_setjmp...Mike Stump1-4/+12
* except.c (start_dynamic_handler): Fix so that we can use __builtin_setjmp, and default to using __builtin_setjmp instead of setjmp. * expr.c (expand_builtin_setjmp): New routine, split out from existing inline code from expand_builtin. (expand_builtin): Split out code into expand_builtin_setjmp. * expr.h (expand_builtin_setjmp): Add declaration. * libgcc2.c (__sjthrow): Default to using __builtin_setjmp instead of setjmp. (__sjpopnthrow): Likewise. * optabs.c (init_optabs): Likewise. From-SVN: r14045
1997-05-06reformat a little to match GNU coding standards.Mike Stump1-14/+14
From-SVN: r14024
1997-04-23Add setjmp/longjmp exception handling.Mike Stump1-0/+166
From-SVN: r13968
1997-04-13(L_bb, L_exit): Use 0 rather than NULL for null pointers.Richard Kenner1-5/+5
From-SVN: r13883
1997-04-02libgcc2.c (find_exception_table): Fix to logic to deal with functions that ↵Mike Stump1-45/+43
are in their own section... * libgcc2.c (find_exception_table): Fix to logic to deal with functions that are in their own section, such as template instantiations, that cause overlapping EH tables. From-SVN: r13830
1997-03-28* libgcc2.c (__bb_exit_func): Support gcov style output.Doug Evans1-6/+127
From-SVN: r13818
1997-02-16(__negdi2, __lshrdi3, __ashldi3, __ashrdi3, __ffsdi2):Richard Kenner1-94/+44
Use ANSI style definition with full prototype. (__muldi3, __udiv_w_sdiv, __udivmoddi4, __divdi3, __moddi3) : Likewise. (__udivmoddi4, __udivdi3, __cmpdi2, __ucmpdi2) : Likewise. (__fixunstfdi, __fixtfdi, __fixunsxfdi, __fixxfdi) : Likewise. (__fixunsdfdi, __fixdfdi, __floatdixf, __floatditf) : Likewise. (__floatdidf, __floatdisf, __fixunsxfsi, __fixunsdfsi) : Likewise. (__gcc_bcmp, __eprintf, gopen, gclose, __bb_init_file) : Likewise. (__bb_init_trace_func, __clear_cache, mprotect) : Likewise. (__enable_execute_stack, cacheflush, exit) : Likewise. (find_exception_table, __find_first_exception_table_match) : Likewise. From-SVN: r13658
1997-02-07i formatting tweaksMike Stump1-14/+9
From-SVN: r13614
1997-01-31* libgcc2.c: Remove extern for malloc and realloc.Mike Stump1-3/+0
From-SVN: r13573
1996-12-11(cacheflush): Add SONY NEWS-OS 4.2 version.Richard Kenner1-0/+28
From-SVN: r13279
1996-11-11xJason Merrill1-1/+1
From-SVN: r13122
1996-10-24crtstuff.c (__do_global_dtors_aux): Allow finalization code to be run more ↵Mike Stump1-3/+6
than once. * crtstuff.c (__do_global_dtors_aux): Allow finalization code to be run more than once. * libgcc2.c (__do_global_dtors): Ditto. From-SVN: r13023
1996-10-16irix6 ctorsJason Merrill1-5/+10
From-SVN: r12971
1996-08-16libgcc2.c (__throw): New routine.Mike Stump1-0/+15
* libgcc2.c (__throw): New routine. (__eh_pc): New data object for exception handling. * except.c (eh_saved_pc): New object so we can call assemble_external. (expand_internal_throw_indirect): Call assemble_external for __eh_pc. (end_eh_unwinder): Ditto. (init_eh): Initialize eh_saved_pc. fixes eh6.C on rs6000 and alpha From-SVN: r12646
1996-07-23install EH codeMike Stump1-14/+22
From-SVN: r12549
1996-07-03formatting tweaksMike Stump1-73/+71
From-SVN: r12390
1996-03-20(__dummy): New function.Richard Kenner1-0/+5
From-SVN: r11574
1996-03-04(L_bb/atexit, onexit): Declarations replaced by #include'ing "gbl-ctors.h".Richard Kenner1-14/+55
(L_exit/atexit): New function. (L_exit/exit): Call any registered functions. From-SVN: r11432
1996-02-03Make libgcc2 build under AIX3.2.5Michael Meissner1-2/+2
From-SVN: r11171
1995-12-27(_bb_init_prg): Cast arg to bzero to (char *).Richard Kenner1-1/+1
From-SVN: r10889
1995-12-24(struct bb): Add flags field.Richard Kenner1-2/+732
(HAVE_POPEN): Test new define. (struct __bb, struct bb_{edge,func}): New structs. (__bb_init_{prg,file},__bb_{init,exit}_trace_func,__bb_trace_ret, (__bb_trace_func{,_ret},gopen,gclose): New functions. From-SVN: r10850
1995-12-18libgcc2.c (__empty): An empty function used by the C++ frontend for ↵Mike Stump1-0/+5
defaulting cleanup actions. * libgcc2.c (__empty): An empty function used by the C++ frontend for defaulting cleanup actions. * tree.c (save_tree_status, restore_tree_status): Save and restore temporary_firstobj, so that in progress objects that live on the temporary obstack are not reallocated, if we save and restore the tree status in their lifetime. From-SVN: r10799