aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/init.c')
-rw-r--r--gcc/ada/init.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/gcc/ada/init.c b/gcc/ada/init.c
index 57b02a1..06e366d 100644
--- a/gcc/ada/init.c
+++ b/gcc/ada/init.c
@@ -1974,7 +1974,7 @@ __gnat_error_handler (int sig, siginfo_t *si, void *sc)
sigdelset (&mask, sig);
sigprocmask (SIG_SETMASK, &mask, NULL);
-#if defined (__ARMEL__) || defined (__PPC__) || (defined (__i386__) && _WRS_VXWORKS_MAJOR < 7)
+#if defined (__ARMEL__) || defined (__PPC__) || defined (__i386__) || defined (__x86_64__)
/* 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
@@ -1982,19 +1982,23 @@ __gnat_error_handler (int sig, siginfo_t *si, void *sc)
necessary. This only incurs a few extra instructions and a tiny
amount of extra stack usage. */
-#if defined (__i386__) && !defined (VTHREADS)
+#ifdef HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE
+ /* We need to sometimes to adjust the PC in case of signals so that it
+ doesn't reference the exception that actually raised the signal but the
+ instruction before it. */
+ __gnat_adjust_context_for_raise (sig, sc);
+#endif
+
+#if defined (__i386__) && !defined (VTHREADS) && (__WRS_VXWORKS_MAJOR < 7)
/* On x86, the vxsim signal context is subtly different and is processeed
- by a handler compiled especially for vxsim. */
+ by a handler compiled especially for vxsim.
+ Vxsim is not supported anymore on our vxworks-7 port. */
if (is_vxsim)
__gnat_vxsim_error_handler (sig, si, sc);
#endif
-#ifdef HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE
- __gnat_adjust_context_for_raise (sig, sc);
-#endif
-
-#include "sigtramp.h"
+# include "sigtramp.h"
__gnat_sigtramp (sig, (void *)si, (void *)sc,
(__sigtramphandler_t *)&__gnat_map_signal);