This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Use backend (ie gcc) exception mechanism for gnat1


Before this patch, gnat1 was using frontend exception mechanism. This is
a mechanism based on setjmp/longjmp (the builtin variant), so it is not
known by the backend. This mechanism is known to be fragile and can
create huge BB graph (as the backend doesn't know the target of a longjmp).
No functional change.

Tested on x86_64-pc-linux-gnu, committed on trunk

2017-04-27  Tristan Gingold  <gingold@adacore.com>

	* raise.c (__gnat_builtin_longjmp): Remove.
	(__gnat_bracktrace):
	Add a dummy definition for the compiler (__gnat_eh_personality,
	__gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
	__gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
	__gnat_rcheck_31, __gnat_rcheck_32): Likewise.
	* a-exexpr.adb: Renamed from a-exexpr-gcc.adb
	* a-except.ads, a-except.adb: Renamed from a-except-2005.ads
	and a-except-2005.adb.
	* raise-gcc.c: Allow build in compiler, compiled as a C++
	file.
	(__gnat_Unwind_ForcedUnwind): Adjust prototype.
	(db): Constify msg_format.
	(get_call_site_action_for): Don't use void arithmetic.
	* system.ads (Frontend_Exceptions): Set to False.
	(ZCX_By_Default): Set to True.
	(GCC_ZC_Support): Set to True.
	* gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
	a-except.ad[sb].
	* gcc-interface/Make-lang.in: Add support for backend zcx exceptions
	in gnat1 and gnatbind.
	* gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
	s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
	* s-excmac.ads, s-excmac.adb: Copy of variants.
	* a-except.o: Adjust preequisites.
	Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]