diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2009-12-08 18:38:23 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2009-12-08 18:38:23 +0000 |
commit | 6b4428ecb642c5ed065e3b5b11799630753cb5db (patch) | |
tree | c5e1e5b7b8e2661973f0b1ea0292a938d9e5415d /libjava/include/sparc-signal.h | |
parent | 17314cd9eb95fd1d2390cf6bceed6c329194ddf8 (diff) | |
download | gcc-6b4428ecb642c5ed065e3b5b11799630753cb5db.zip gcc-6b4428ecb642c5ed065e3b5b11799630753cb5db.tar.gz gcc-6b4428ecb642c5ed065e3b5b11799630753cb5db.tar.bz2 |
configure.host (sparc*-sun-solaris2.*): New case.
* configure.host (sparc*-sun-solaris2.*): New case.
* include/dwarf2-signal.h (MAKE_THROW_FRAME, SPARC case): Make dummy.
* include/sparc-signal.h: Do not include ucontext.h.
(SIGNAL_HANDLER): Rename symbol.
(FLUSH_REGISTER_WINDOWS): Delete.
(MAKE_THROW_FRAME): Make dummy.
(INIT_SEGV): Adjust for above renaming.
(INIT_FPE): Likewise.
From-SVN: r155092
Diffstat (limited to 'libjava/include/sparc-signal.h')
-rw-r--r-- | libjava/include/sparc-signal.h | 37 |
1 files changed, 8 insertions, 29 deletions
diff --git a/libjava/include/sparc-signal.h b/libjava/include/sparc-signal.h index eb7f2b3..a936afe 100644 --- a/libjava/include/sparc-signal.h +++ b/libjava/include/sparc-signal.h @@ -1,6 +1,6 @@ // sparc-signal.h - Catch runtime signals and turn them into exceptions. -/* Copyright (C) 1998, 1999, 2000 Free Software Foundation +/* Copyright (C) 1998, 1999, 2000, 2009 Free Software Foundation This file is part of libgcj. @@ -12,43 +12,22 @@ details. */ #define JAVA_SIGNAL_H 1 #include <signal.h> -#include <ucontext.h> #define HANDLE_SEGV 1 #define HANDLE_FPE 1 -#define SIGNAL_HANDLER(_name) \ -static void _name (int _dummy __attribute__ ((__unused__)), \ - siginfo_t *_info __attribute__ ((__unused__)), \ - void *arg __attribute__ ((__unused__))) +#define SIGNAL_HANDLER(_name) \ +static void _Jv_##_name (int, \ + siginfo_t *_si __attribute__ ((__unused__)), \ + void *_uc __attribute__ ((__unused__))) -#ifdef __arch64__ -#define FLUSH_REGISTER_WINDOWS \ - asm volatile ("flushw"); -#else -#define FLUSH_REGISTER_WINDOWS \ - asm volatile ("ta 3"); -#endif - -#define MAKE_THROW_FRAME(_exception) \ -do \ -{ \ - ucontext_t *_context = (ucontext_t *) arg; \ - (void)_dummy; \ - (void)_info; \ - register long sp = _context->uc_mcontext.gregs[REG_SP]; \ - register long retaddr = _context->uc_mcontext.gregs[REG_O7]; \ - FLUSH_REGISTER_WINDOWS; \ - asm volatile ("mov %0, %%i6; mov %1, %%i7" \ - : : "r"(sp), "r"(retaddr)); \ -} \ -while (0) +#define MAKE_THROW_FRAME(_exception) #define INIT_SEGV \ do \ { \ struct sigaction act; \ - act.sa_sigaction = catch_segv; \ + act.sa_sigaction = _Jv_catch_segv; \ act.sa_flags = SA_SIGINFO | SA_NODEFER; \ sigemptyset (&act.sa_mask); \ sigaction (SIGSEGV, &act, NULL); \ @@ -59,8 +38,8 @@ while (0) do \ { \ struct sigaction act; \ + act.sa_sigaction = _Jv_catch_fpe; \ act.sa_flags = SA_SIGINFO | SA_NODEFER; \ - act.sa_sigaction = catch_fpe; \ sigemptyset (&act.sa_mask); \ sigaction (SIGFPE, &act, NULL); \ } \ |