diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-26 09:28:14 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-26 09:28:14 +0000 |
commit | 3f7165099139b983fa8efc57496cb134b86ea0d0 (patch) | |
tree | 549d728b2d31a9a843361ff2b3f424e4299f4897 /gcc/ada/init.c | |
parent | 724539ddb0e521ba3db2023e0da3cea60def1013 (diff) | |
download | gcc-3f7165099139b983fa8efc57496cb134b86ea0d0.tar.gz |
2015-05-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch7.adb (Install_Private_Declarations,
Swap_Private_Dependents): Ensure that both views of the dependent
subtype are immediately visible if we are within their scope. This
may be needed when a procedure body is both the parent of an
instantiated child unit, and is itself used to inline a local
function.
2015-05-26 Gary Dismukes <dismukes@adacore.com>
* exp_prag.adb, gnat1drv.adb: Minor reformatting.
2015-05-26 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch4.adb (Expand_N_Indexed_Component): In the circuit
detecting exceptions to the rewriting, deal with implicit
dereferences in the selected component case.
2015-05-26 Bob Duff <duff@adacore.com>
* sem_ch13.adb (Analyze_One_Aspect): Do not
require the expression of the Disable_Controlled aspect to be
static in a generic template, because 'Enabled is not known
until the instance.
2015-05-26 Doug Rupp <rupp@adacore.com>
* init-vxsim.c: New file for vxsim ZCX
* sigtramp-vxworks-vxsim.c: Likewise.
* sigtramp-vxworks.c: Factor out target dependent bits into ...
* sigtramp-vxworks-target.inc: ... here.
* sigtramp.h: Add vxsim zcx protos.
* init.c [vxworks...] (sysLib.h): Include.
(__gnat_map_signal): Make global.
[...i386] (__gnat_error_handler): Call __gnat_vxsim_error_handler if
on vxsim.
[...i386] (__gnat_install_handler): Test if on vxsim.
2015-05-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification): For an element
iterator over an array, if the component is aliased, the loop
variable is aliased as well.
2015-05-26 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Actuals): For a function call with in-out
parameters that is rewritten as an expression_with_actions,
we preserve the original function call node for further use by
the caller (typically Expand_Call). In the presence of validity
checks, that function call, though it is labelled Analyzed to
prevent an infinite recursion, may be rewritten as a temporary
by Remove_Side_Effects. Ensure that the caller has access to
the original function call to continue expansion.
* atree.ads: Minor typo in comment.
2015-05-26 Javier Miranda <miranda@adacore.com>
* sem_util.adb (Check_Function_Writable_Actuals):
Add missing support to check the violation of writable actuals
in array aggregates that have a nonstatic range.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223672 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/init.c')
-rw-r--r-- | gcc/ada/init.c | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/gcc/ada/init.c b/gcc/ada/init.c index 3738b71b170..4731959b019 100644 --- a/gcc/ada/init.c +++ b/gcc/ada/init.c @@ -1702,6 +1702,7 @@ __gnat_install_handler () #include <signal.h> #include <taskLib.h> +#include <sysLib.h> #ifndef __RTP__ #include <intLib.h> @@ -1758,8 +1759,8 @@ __gnat_clear_exception_count (void) } /* Handle different SIGnal to exception mappings in different VxWorks - versions. */ -static void + versions. */ +void __gnat_map_signal (int sig, siginfo_t *si ATTRIBUTE_UNUSED, void *sc ATTRIBUTE_UNUSED) { @@ -1895,6 +1896,13 @@ __gnat_map_signal (int sig, siginfo_t *si ATTRIBUTE_UNUSED, Raise_From_Signal_Handler (exception, msg); } +#if defined (i386) || defined (__i386__) +extern void +__gnat_vxsim_error_handler (int sig, siginfo_t *si, void *sc); + +static int is_vxsim = 0; +#endif + /* Tasking and Non-tasking signal handler. Map SIGnal to Ada exception propagation after the required low level adjustments. */ @@ -1911,14 +1919,22 @@ __gnat_error_handler (int sig, siginfo_t *si, void *sc) sigdelset (&mask, sig); sigprocmask (SIG_SETMASK, &mask, NULL); -#if defined (__ARMEL__) || defined (__PPC__) - /* On ARM and PowerPC, kernel mode, we process signals through a Call Frame +#if defined (__ARMEL__) || defined (__PPC__) || defined (i386) || defined (__i386__) + /* On certain targets, kernel mode, we process signals through a Call Frame Info trampoline, voiding the need for myriads of fallback_frame_state variants in the ZCX runtime. We have no simple way to distinguish ZCX from SJLJ here, so we do this for SJLJ as well even though this is not necessary. This only incurs a few extra instructions and a tiny amount of extra stack usage. */ +#if defined (i386) || defined (__i386__) + /* On x86, the vxsim signal context is subtly different and is processeed + by a handler compiled especially for vxsim. */ + + if (is_vxsim) + __gnat_vxsim_error_handler (sig, si, sc); +#endif + #include "sigtramp.h" __gnat_sigtramp (sig, (void *)si, (void *)sc, @@ -1952,6 +1968,7 @@ void __gnat_install_handler (void) { struct sigaction act; + char *model ATTRIBUTE_UNUSED; /* Setup signal handler to map synchronous signals to appropriate exceptions. Make sure that the handler isn't interrupted by another @@ -2002,6 +2019,15 @@ __gnat_install_handler (void) trap_0_entry->inst_fourth = 0xa1480000; #endif +#if defined (i386) || defined (__i386__) + /* By experiment, found that sysModel () returns the following string + prefix for vxsim when running on Linux and Windows. */ + model = sysModel (); + if ((strncmp (model, "Linux", 5) == 0) + || (strncmp (model, "Windows", 7) == 0)) + is_vxsim = 1; +#endif + __gnat_handler_installed = 1; } |