This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch committed] SH: Use fs->signal_frame in *_fallback_frame_state


I've committed the attached patch on trunk which makes SH
*_fallback_frame_state routines use fs->signal_frame which
was introduced by Jakub Jelinek in

http://gcc.gnu.org/ml/gcc-patches/2006-02/msg01986.html

Tested on sh4-unknown-linux-gnu with bootstrap and the toplevel
"make -k check" with no new failures.

Regards,
	kaz
--
[gcc/ChangeLog]
2006-03-16  Kaz Kojima  <kkojima@gcc.gnu.org>

	* config/sh/linux-unwind.h (shmedia_fallback_frame_state): Set
	fs->signal_frame.
	(sh_fallback_frame_state): Likewise.

[libjava/ChangeLog]
2006-03-16  Kaz Kojima  <kkojima@gcc.gnu.org>

	* include/sh-signal.h (MAKE_THROW_FRAME): Change into empty
	macro.
	
diff -uprN ORIG/trunk/gcc/config/sh/linux-unwind.h LOCAL/trunk/gcc/config/sh/linux-unwind.h
--- ORIG/trunk/gcc/config/sh/linux-unwind.h	2005-10-29 06:52:01.000000000 +0900
+++ LOCAL/trunk/gcc/config/sh/linux-unwind.h	2006-03-15 21:02:48.000000000 +0900
@@ -1,5 +1,5 @@
 /* DWARF2 EH unwinding support for SH Linux.
-   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -137,6 +137,7 @@ shmedia_fallback_frame_state (struct _Un
   fs->regs.reg[63].loc.offset
     = (long)&(sc->sc_pc) - new_cfa;
   fs->retaddr_column = 63;
+  fs->signal_frame = 1;
   return _URC_NO_REASON;
 }
 
@@ -246,6 +247,7 @@ sh_fallback_frame_state (struct _Unwind_
   fs->regs.reg[SH_DWARF_FRAME_PC].loc.offset
     = (long)&(sc->sc_pc) - new_cfa;
   fs->retaddr_column = SH_DWARF_FRAME_PC;
+  fs->signal_frame = 1;
   return _URC_NO_REASON;
 }
 #endif /* defined (__SH5__) */
diff -uprN ORIG/trunk/libjava/include/sh-signal.h LOCAL/trunk/libjava/include/sh-signal.h
--- ORIG/trunk/libjava/include/sh-signal.h	2005-11-04 14:28:05.000000000 +0900
+++ LOCAL/trunk/libjava/include/sh-signal.h	2006-03-15 21:03:08.000000000 +0900
@@ -1,7 +1,7 @@
 // sh-signal.h - Catch runtime signals and turn them into exceptions
 // on a SuperH based Linux system.
 
-/* Copyright (C) 2004  Free Software Foundation
+/* Copyright (C) 2004, 2006  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -33,28 +33,7 @@ typedef struct _sig_ucontext {
 #define SIGNAL_HANDLER(_name)						\
   static void _name (int , siginfo_t *, sig_ucontext_t *_uc)
 
-/* SH either leaves PC pointing at a faulting instruction or the
-   following instruction, depending on the signal.  SEGV always does
-   the former, so we adjust the saved PC to point to the following
-   instruction. This is what the handler in libgcc expects.  */
-
-#ifdef __SH5__
-#define MAKE_THROW_FRAME(_exception)					\
-do									\
-  {									\
-    volatile struct sigcontext *_sc = &_uc->uc_mcontext;		\
-    _sc->sc_pc += 4;							\
-  }									\
-while (0)
-#else
-#define MAKE_THROW_FRAME(_exception)					\
-do									\
-  {									\
-    volatile struct sigcontext *_sc = &_uc->uc_mcontext;		\
-    _sc->sc_pc += 2;							\
-  }									\
-while (0)
-#endif
+#define MAKE_THROW_FRAME(_exception)
 
 /* For an explanation why we cannot simply use sigaction to
    install the handlers, see i386-signal.h.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]