diff options
| -rw-r--r-- | gcc/ada/init.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/gcc/ada/init.c b/gcc/ada/init.c index 9e33079..35dffd3 100644 --- a/gcc/ada/init.c +++ b/gcc/ada/init.c @@ -447,11 +447,11 @@ __gnat_machine_state_length (void) return sizeof (struct sigcontext); } -/********************/ -/* PA HP-UX section */ -/********************/ +/*****************/ +/* HP-UX section */ +/*****************/ -#elif defined (__hppa__) && defined (__hpux__) +#elif defined (__hpux__) #include <signal.h> #include <sys/ucontext.h> @@ -459,6 +459,8 @@ __gnat_machine_state_length (void) static void __gnat_error_handler (int sig, siginfo_t *siginfo, void *ucontext); +#if defined (__hppa__) + /* __gnat_adjust_context_for_raise - see comments along with the default version later in this file. */ @@ -475,6 +477,8 @@ __gnat_adjust_context_for_raise (int signo ATTRIBUTE_UNUSED, void *ucontext) mcontext->ss_narrow.ss_pcoq_head ++; } +#endif + static void __gnat_error_handler (int sig, siginfo_t *siginfo ATTRIBUTE_UNUSED, void *ucontext) @@ -1627,7 +1631,8 @@ __gnat_install_handler () exceptions. Make sure that the handler isn't interrupted by another signal that might cause a scheduling event! */ - act.sa_handler = __gnat_error_handler; + act.sa_sigaction + = (void (*)(int, struct __siginfo *, void*)) __gnat_error_handler; act.sa_flags = SA_NODEFER | SA_RESTART | SA_SIGINFO; (void) sigemptyset (&act.sa_mask); @@ -1805,6 +1810,12 @@ __gnat_init_float (void) asm ("mtfsb0 26"); #endif +#if (defined (__i386__) || defined (i386)) && !defined (VTHREADS) + /* This is used to properly initialize the FPU on an x86 for each + process thread. */ + asm ("finit"); +#endif + /* Similarly for sparc64. Achieved by masking bits in the Trap Enable Mask field of the Floating-point Status Register (see the SPARC Architecture Manual Version 9, p 48). */ |
