mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
17314cd9eb
commit
6b4428ecb6
|
|
@ -1,3 +1,14 @@
|
||||||
|
2009-12-08 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2009-12-07 Eric Botcazou <ebotcazou@adacore.com>
|
2009-12-07 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* configure.ac (net/if.h check): Include sys/socket.h if present.
|
* configure.ac (net/if.h check): Include sys/socket.h if present.
|
||||||
|
|
|
||||||
|
|
@ -340,6 +340,10 @@ EOF
|
||||||
can_unwind_signal=yes
|
can_unwind_signal=yes
|
||||||
DIVIDESPEC=-fuse-divide-subroutine
|
DIVIDESPEC=-fuse-divide-subroutine
|
||||||
;;
|
;;
|
||||||
|
sparc*-sun-solaris2.*)
|
||||||
|
slow_pthread_self=
|
||||||
|
can_unwind_signal=yes
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "${host}" in
|
case "${host}" in
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// dwarf2-signal.h - Catch runtime signals and turn them into exceptions.
|
// dwarf2-signal.h - Catch runtime signals and turn them into exceptions.
|
||||||
|
|
||||||
/* Copyright (C) 2000, 2001 Free Software Foundation
|
/* Copyright (C) 2000, 2001, 2009 Free Software Foundation
|
||||||
|
|
||||||
This file is part of libgcj.
|
This file is part of libgcj.
|
||||||
|
|
||||||
|
|
@ -58,61 +58,7 @@ do \
|
||||||
_sc->sc_ip++; \
|
_sc->sc_ip++; \
|
||||||
} \
|
} \
|
||||||
while (0)
|
while (0)
|
||||||
#elif defined(__sparc__)
|
|
||||||
/* We could do the unwind of the signal frame quickly by hand here like
|
|
||||||
sparc-signal.h does under Solaris, but that makes debugging unwind
|
|
||||||
failures almost impossible. */
|
|
||||||
#if !defined(__arch64__)
|
|
||||||
#define MAKE_THROW_FRAME(_exception) \
|
|
||||||
do \
|
|
||||||
{ \
|
|
||||||
/* Sparc-32 leaves PC pointing at a faulting instruction \
|
|
||||||
always. \
|
|
||||||
We advance the PC one instruction past the exception causing PC. \
|
|
||||||
This is done because FDEs are found with "context->ra - 1" in the \
|
|
||||||
unwinder. \
|
|
||||||
Also, the dwarf2 unwind machinery is going to add 8 to the \
|
|
||||||
PC it uses on Sparc. So we adjust the PC here. We do it here \
|
|
||||||
because we run once for such an exception, however the Sparc specific\
|
|
||||||
unwind can run multiple times for the same exception and it would \
|
|
||||||
adjust the PC more than once resulting in a bogus value. */ \
|
|
||||||
struct sig_regs { \
|
|
||||||
unsigned int psr, pc, npc, y, u_regs[16]; \
|
|
||||||
} *regp; \
|
|
||||||
unsigned int insn; \
|
|
||||||
__asm__ __volatile__("ld [%%i7 + 8], %0" : "=r" (insn)); \
|
|
||||||
/* mov __NR_sigaction, %g1; Old signal stack layout */ \
|
|
||||||
if (insn == 0x821020d8) \
|
|
||||||
regp = (struct sig_regs *) _sip; \
|
|
||||||
else \
|
|
||||||
/* mov __NR_rt_sigaction, %g1; New signal stack layout */ \
|
|
||||||
regp = (struct sig_regs *) (_sip + 1); \
|
|
||||||
regp->pc = ((regp->pc + 4) - 8); \
|
|
||||||
} \
|
|
||||||
while (0)
|
|
||||||
#else
|
|
||||||
#define MAKE_THROW_FRAME(_exception) \
|
|
||||||
do \
|
|
||||||
{ \
|
|
||||||
/* Sparc-64 leaves PC pointing at a faulting instruction \
|
|
||||||
always. \
|
|
||||||
We advance the PC one instruction past the exception causing PC. \
|
|
||||||
This is done because FDEs are found with "context->ra - 1" in the \
|
|
||||||
unwinder. \
|
|
||||||
Also, the dwarf2 unwind machinery is going to add 8 to the \
|
|
||||||
PC it uses on Sparc. So we adjust the PC here. We do it here \
|
|
||||||
because we run once for such an exception, however the Sparc specific\
|
|
||||||
unwind can run multiple times for the same exception and it would \
|
|
||||||
adjust the PC more than once resulting in a bogus value. */ \
|
|
||||||
struct pt_regs { \
|
|
||||||
unsigned long u_regs[16]; \
|
|
||||||
unsigned long tstate, tpc, tnpc; \
|
|
||||||
unsigned int y, fprs; \
|
|
||||||
} *regp = (struct pt_regs *) (_sip + 1); \
|
|
||||||
regp->tpc = ((regp->tpc + 4) - 8); \
|
|
||||||
} \
|
|
||||||
while (0)
|
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
#define MAKE_THROW_FRAME(_exception) \
|
#define MAKE_THROW_FRAME(_exception) \
|
||||||
do \
|
do \
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// sparc-signal.h - Catch runtime signals and turn them into exceptions.
|
// 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.
|
This file is part of libgcj.
|
||||||
|
|
||||||
|
|
@ -12,43 +12,22 @@ details. */
|
||||||
#define JAVA_SIGNAL_H 1
|
#define JAVA_SIGNAL_H 1
|
||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <ucontext.h>
|
|
||||||
|
|
||||||
#define HANDLE_SEGV 1
|
#define HANDLE_SEGV 1
|
||||||
#define HANDLE_FPE 1
|
#define HANDLE_FPE 1
|
||||||
|
|
||||||
#define SIGNAL_HANDLER(_name) \
|
#define SIGNAL_HANDLER(_name) \
|
||||||
static void _name (int _dummy __attribute__ ((__unused__)), \
|
static void _Jv_##_name (int, \
|
||||||
siginfo_t *_info __attribute__ ((__unused__)), \
|
siginfo_t *_si __attribute__ ((__unused__)), \
|
||||||
void *arg __attribute__ ((__unused__)))
|
void *_uc __attribute__ ((__unused__)))
|
||||||
|
|
||||||
#ifdef __arch64__
|
#define MAKE_THROW_FRAME(_exception)
|
||||||
#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 INIT_SEGV \
|
#define INIT_SEGV \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
struct sigaction act; \
|
struct sigaction act; \
|
||||||
act.sa_sigaction = catch_segv; \
|
act.sa_sigaction = _Jv_catch_segv; \
|
||||||
act.sa_flags = SA_SIGINFO | SA_NODEFER; \
|
act.sa_flags = SA_SIGINFO | SA_NODEFER; \
|
||||||
sigemptyset (&act.sa_mask); \
|
sigemptyset (&act.sa_mask); \
|
||||||
sigaction (SIGSEGV, &act, NULL); \
|
sigaction (SIGSEGV, &act, NULL); \
|
||||||
|
|
@ -59,8 +38,8 @@ while (0)
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
struct sigaction act; \
|
struct sigaction act; \
|
||||||
|
act.sa_sigaction = _Jv_catch_fpe; \
|
||||||
act.sa_flags = SA_SIGINFO | SA_NODEFER; \
|
act.sa_flags = SA_SIGINFO | SA_NODEFER; \
|
||||||
act.sa_sigaction = catch_fpe; \
|
|
||||||
sigemptyset (&act.sa_mask); \
|
sigemptyset (&act.sa_mask); \
|
||||||
sigaction (SIGFPE, &act, NULL); \
|
sigaction (SIGFPE, &act, NULL); \
|
||||||
} \
|
} \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue