OSDN Git Service

2001-05-29 Andrew Haley <aph@redhat.com>
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 May 2001 17:50:50 +0000 (17:50 +0000)
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 May 2001 17:50:50 +0000 (17:50 +0000)
        * include/i386-signal.h (MAKE_THROW_FRAME): Don't fix up frame
        pointer: the dwarf unwinder in libgcc will do everything that's
        needed.
        (HANDLE_DIVIDE_OVERFLOW): Tidy.  Don't mess with stack frames any
        more than we absolutely need to.
        * configure.host (EXCEPTIONSPEC): Remove libgcj_sjlj on Alpha.
        * configure.in (SIGNAL_HANDLER): Use include/dwarf2-signal.h on
        Alpha.
        (SIGNAL_HANDLER): Test "$enable_sjlj_exceptions", not
        "$libgcj_sjlj".
        * configure: Rebuilt.
        * include/dwarf2-signal.h (MAKE_THROW_FRAME): Adjust PC
        for Alpha.
        (SIGNAL_HANDLER): Use siginfo style handler.
        (INIT_SEGV): Likewise.
        (INIT_FPE): Likewise.
        * include/ppc-signal.h: Delete whole file.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42691 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/configure
libjava/configure.in
libjava/include/dwarf2-signal.h
libjava/include/i386-signal.h
libjava/include/ppc-signal.h [deleted file]

index 37d924a..2e88c1b 100644 (file)
@@ -1,3 +1,23 @@
+2001-05-29  Andrew Haley  <aph@redhat.com>
+
+        * include/i386-signal.h (MAKE_THROW_FRAME): Don't fix up frame
+        pointer: the dwarf unwinder in libgcc will do everything that's
+        needed.
+        (HANDLE_DIVIDE_OVERFLOW): Tidy.  Don't mess with stack frames any
+        more than we absolutely need to.
+        * configure.host (EXCEPTIONSPEC): Remove libgcj_sjlj on Alpha.
+        * configure.in (SIGNAL_HANDLER): Use include/dwarf2-signal.h on
+        Alpha.
+        (SIGNAL_HANDLER): Test "$enable_sjlj_exceptions", not
+        "$libgcj_sjlj".
+        * configure: Rebuilt.
+        * include/dwarf2-signal.h (MAKE_THROW_FRAME): Adjust PC
+        for Alpha.
+        (SIGNAL_HANDLER): Use siginfo style handler.
+        (INIT_SEGV): Likewise.
+        (INIT_FPE): Likewise.
+        * include/ppc-signal.h: Delete whole file.
+
 2001-05-24  Tom Tromey  <tromey@redhat.com>
 
        * java/lang/natString.cc (init): Throw
index 34226ad..9576bfc 100755 (executable)
@@ -5871,13 +5871,16 @@ case "${host}" in
  powerpc-*-linux*)
     SIGNAL_HANDLER=include/dwarf2-signal.h
     ;;
+ alpha*-*-linux*)
+    SIGNAL_HANDLER=include/dwarf2-signal.h
+    ;;
  *)
     SIGNAL_HANDLER=include/default-signal.h
     ;;
 esac
 
 # If we're using sjlj exceptions, forget what we just learned.
-if test "$libgcj_sjlj" = yes; then
+if test "$enable_sjlj_exceptions" = yes; then
    SIGNAL_HANDLER=include/default-signal.h
 fi
 
@@ -5896,7 +5899,7 @@ fi
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:5900: checking for X" >&5
+echo "configure:5903: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -5958,12 +5961,12 @@ if test "$ac_x_includes" = NO; then
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 5962 "configure"
+#line 5965 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6032,14 +6035,14 @@ if test "$ac_x_libraries" = NO; then
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6036 "configure"
+#line 6039 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:6043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -6145,17 +6148,17 @@ else
     case "`(uname -sr) 2>/dev/null`" in
     "SunOS 5"*)
       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
-echo "configure:6149: checking whether -R must be followed by a space" >&5
+echo "configure:6152: checking whether -R must be followed by a space" >&5
       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
       cat > conftest.$ac_ext <<EOF
-#line 6152 "configure"
+#line 6155 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:6159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -6171,14 +6174,14 @@ rm -f conftest*
       else
        LIBS="$ac_xsave_LIBS -R $x_libraries"
        cat > conftest.$ac_ext <<EOF
-#line 6175 "configure"
+#line 6178 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:6182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -6210,7 +6213,7 @@ rm -f conftest*
     # libraries were built with DECnet support.  And karl@cs.umb.edu says
     # the Alpha needs dnet_stub (dnet does not exist).
     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:6214: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:6217: checking for dnet_ntoa in -ldnet" >&5
 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6218,7 +6221,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6222 "configure"
+#line 6225 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6229,7 +6232,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:6233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6251,7 +6254,7 @@ fi
 
     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:6255: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:6258: checking for dnet_ntoa in -ldnet_stub" >&5
 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6259,7 +6262,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldnet_stub  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6263 "configure"
+#line 6266 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6270,7 +6273,7 @@ int main() {
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:6274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6299,12 +6302,12 @@ fi
     # The nsl library prevents programs from opening the X display
     # on Irix 5.2, according to dickey@clark.net.
     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:6303: checking for gethostbyname" >&5
+echo "configure:6306: checking for gethostbyname" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6308 "configure"
+#line 6311 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -6327,7 +6330,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -6348,7 +6351,7 @@ fi
 
     if test $ac_cv_func_gethostbyname = no; then
       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:6352: checking for gethostbyname in -lnsl" >&5
+echo "configure:6355: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6356,7 +6359,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6360 "configure"
+#line 6363 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6367,7 +6370,7 @@ int main() {
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:6371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6397,12 +6400,12 @@ fi
     # -lsocket must be given before -lnsl if both are needed.
     # We assume that if connect needs -lnsl, so does gethostbyname.
     echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:6401: checking for connect" >&5
+echo "configure:6404: checking for connect" >&5
 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6406 "configure"
+#line 6409 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -6425,7 +6428,7 @@ connect();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -6446,7 +6449,7 @@ fi
 
     if test $ac_cv_func_connect = no; then
       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:6450: checking for connect in -lsocket" >&5
+echo "configure:6453: checking for connect in -lsocket" >&5
 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6454,7 +6457,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6458 "configure"
+#line 6461 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6465,7 +6468,7 @@ int main() {
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:6469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6489,12 +6492,12 @@ fi
 
     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
     echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:6493: checking for remove" >&5
+echo "configure:6496: checking for remove" >&5
 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6498 "configure"
+#line 6501 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -6517,7 +6520,7 @@ remove();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
@@ -6538,7 +6541,7 @@ fi
 
     if test $ac_cv_func_remove = no; then
       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:6542: checking for remove in -lposix" >&5
+echo "configure:6545: checking for remove in -lposix" >&5
 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6546,7 +6549,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lposix  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6550 "configure"
+#line 6553 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6557,7 +6560,7 @@ int main() {
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:6561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6581,12 +6584,12 @@ fi
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:6585: checking for shmat" >&5
+echo "configure:6588: checking for shmat" >&5
 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6590 "configure"
+#line 6593 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -6609,7 +6612,7 @@ shmat();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
@@ -6630,7 +6633,7 @@ fi
 
     if test $ac_cv_func_shmat = no; then
       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:6634: checking for shmat in -lipc" >&5
+echo "configure:6637: checking for shmat in -lipc" >&5
 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6638,7 +6641,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lipc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6642 "configure"
+#line 6645 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6649,7 +6652,7 @@ int main() {
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:6653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6682,7 +6685,7 @@ fi
   # libraries we check for below, so use a different variable.
   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:6686: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:6689: checking for IceConnectionNumber in -lICE" >&5
 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6690,7 +6693,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6694 "configure"
+#line 6697 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6701,7 +6704,7 @@ int main() {
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:6705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
index ac71c71..0c36ee1 100644 (file)
@@ -757,13 +757,16 @@ case "${host}" in
  powerpc-*-linux*)
     SIGNAL_HANDLER=include/dwarf2-signal.h
     ;;
+ alpha*-*-linux*)
+    SIGNAL_HANDLER=include/dwarf2-signal.h
+    ;;
  *)
     SIGNAL_HANDLER=include/default-signal.h
     ;;
 esac
 
 # If we're using sjlj exceptions, forget what we just learned.
-if test "$libgcj_sjlj" = yes; then
+if test "$enable_sjlj_exceptions" = yes; then
    SIGNAL_HANDLER=include/default-signal.h
 fi
 
index ec32a7b..3a662ae 100644 (file)
@@ -4,9 +4,8 @@
 
    This file is part of libgcj.
 
-   Use this file for every target for which the dwarf2 unwinder in
-   libgcc can unwind through signal handlers and no special actions
-   are needed.
+   Use this file for a target for which the dwarf2 unwinder in libgcc
+   can unwind through signal handlers.
 
 This software is copyrighted work licensed under the terms of the
 Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
@@ -22,29 +21,43 @@ details.  */
 #undef HANDLE_FPE
 
 #define SIGNAL_HANDLER(_name)  \
-static void _Jv_##_name (int)
+static void _Jv_##_name (int, siginfo_t *, void *_p)
 
 class java::lang::Throwable;
 
 // Unwind the stack to the point at which the signal was generated and
-// then throw an exception.  With the dwarf2 unwinder we don't need to
-// do anything.
-
+// then throw an exception.  With the dwarf2 unwinder we don't usually
+// need to do anything, with some minor exceptions.
+
+#ifdef __alpha__
+#define MAKE_THROW_FRAME(_exception)                                   \
+do                                                                     \
+{                                                                      \
+  /* Alpha 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.  */                \
+  struct sigcontext *_sc = (struct sigcontext *)_p;                    \
+  _sc->sc_pc += 4;                                                     \
+}                                                                      \
+while (0)
+#else
 #define MAKE_THROW_FRAME(_exception)           \
 do                                             \
 {                                              \
+  (void)_p;                                    \
 }                                              \
 while (0)
-
+#endif
 
 #define INIT_SEGV                                              \
 do                                                             \
   {                                                            \
     nullp = new java::lang::NullPointerException ();           \
     struct sigaction act;                                      \
-    act.sa_handler = _Jv_catch_segv;                           \
+    act.sa_sigaction = _Jv_catch_segv;                         \
     sigemptyset (&act.sa_mask);                                        \
-    act.sa_flags = 0;                                          \
+    act.sa_flags = SA_SIGINFO;                                 \
     syscall (SYS_sigaction, SIGSEGV, &act, NULL);              \
   }                                                            \
 while (0)  
@@ -55,9 +68,9 @@ do                                                            \
     arithexception = new java::lang::ArithmeticException       \
       (JvNewStringLatin1 ("/ by zero"));                       \
     struct sigaction act;                                      \
-    act.sa_handler = _Jv_catch_fpe;                            \
+    act.sa_sigaction = _Jv_catch_fpe;                          \
     sigemptyset (&act.sa_mask);                                        \
-    act.sa_flags = 0;                                          \
+    act.sa_flags = SA_SIGINFO;                                 \
     syscall (SYS_sigaction, SIGFPE, &act, NULL);               \
   }                                                            \
 while (0)  
index dc3c112..f89a0b1 100644 (file)
@@ -31,16 +31,11 @@ do                                                                  \
   void **_p = (void **)&_dummy;                                                \
   struct sigcontext_struct *_regs = (struct sigcontext_struct *)++_p;  \
                                                                        \
-  register unsigned long _ebp = _regs->ebp;                            \
-  register unsigned char *_eip = (unsigned char *)_regs->eip;          \
-                                                                       \
   /* Advance the program counter so that it is after the start of the  \
      instruction:  the x86 exception handler expects                   \
      the PC to point to the instruction after a call. */               \
-  _eip += 2;                                                           \
+  _regs->eip += 2;                                                     \
                                                                        \
-  asm volatile ("mov %0, (%%ebp); mov %1, 4(%%ebp)"                    \
-               : : "r"(_ebp), "r"(_eip));                              \
 }                                                                      \
 while (0)
 
@@ -63,7 +58,7 @@ do                                                                    \
    * As the instructions are variable length it is necessary to do a   \
    * little calculation to figure out where the following instruction  \
    * actually is.                                                      \
-                                                                       \
+                                                                       \
    */                                                                  \
                                                                        \
   if (_eip[0] == 0xf7)                                                 \
@@ -104,6 +99,9 @@ do                                                                   \
                                                                        \
          _eip = (unsigned char *)_ebp[1];                              \
          _ebp = (unsigned long *)_ebp[0];                              \
+                                                                       \
+         asm volatile ("mov %0, (%%ebp); mov %1, 4(%%ebp)"             \
+                       : : "r"(_ebp), "r"(_eip));                      \
        }                                                               \
       else                                                             \
        {                                                               \
@@ -111,12 +109,9 @@ do                                                                 \
             of the instruction: this is because the x86 exception      \
             handler expects the PC to point to the instruction after a \
             call. */                                                   \
-         _eip += 2;                                                    \
+         _regs->eip += 2;                                              \
        }                                                               \
     }                                                                  \
-                                                                       \
-  asm volatile ("mov %0, (%%ebp); mov %1, 4(%%ebp)"                    \
-               : : "r"(_ebp), "r"(_eip));                              \
 }                                                                      \
 while (0)
 
diff --git a/libjava/include/ppc-signal.h b/libjava/include/ppc-signal.h
deleted file mode 100644 (file)
index 003a760..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-// ppc-signal.h - Catch runtime signals and turn them into exceptions.
-
-/* Copyright (C) 2000  Free Software Foundation
-
-   This file is part of libgcj.
-
-This software is copyrighted work licensed under the terms of the
-Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
-details.  */
-
-#ifndef JAVA_SIGNAL_H
-#define JAVA_SIGNAL_H 1
-
-#include <signal.h>
-#include <ucontext.h>
-
-#define HANDLE_SEGV 1
-#undef HANDLE_FPE
-
-#define SIGNAL_HANDLER(_name)                  \
-__asm ("\t.section\t\".text\"\n"               \
-       "\t.align 2\n"                          \
-       "_Jv_" #_name ":\n"                     \
-       "\tmr 3, 1\n"                           \
-       "\tb _Jv_stub_" #_name "\n");           \
-extern "C" void _Jv_##_name (int _dummy);      \
-extern "C" void _Jv_stub_##_name (char *_sp)   \
-
-class java::lang::Throwable;
-
-// Unwind the stack to the point at which the signal was generated and
-// then throw an exception.
-
-#define MAKE_THROW_FRAME(_exception)                                   \
-do                                                                     \
-{                                                                      \
-  struct sigcontext_struct *_context                                   \
-    = (struct sigcontext_struct *)(_sp + __SIGNAL_FRAMESIZE);          \
-  long int regs [34];                                                  \
-  memcpy (regs, &_context->regs->gpr[0], 32 * sizeof (long int));      \
-  regs[32] = _context->regs->nip + sizeof (long int);                  \
-  regs[33] = _context->regs->link;                                     \
-                                                                       \
-  __asm volatile (                                                     \
-       "\tmr 31,%0\n"                                                  \
-        "\tmr 3,%1              # exception to throw\n"                        \
-        "\tlwz 0,128(31)        # ip\n"                                        \
-        "\tmtlr 0\n"                                                   \
-        "\tlwz 1,4(31)          # previous r1\n"                       \
-        "\tlwz 0,132(31)        # previous lr\n"                       \
-        "\tlwz 2,0(1)           # previous previous r1\n"              \
-        "\tstw 0,4(2)           # save previous lr\n"                  \
-       "\tlwz 0,0(31)\n"                                               \
-       "\tlwz 2,8(31)\n"                                               \
-       "\tlwz 4,16(31)\n"                                              \
-       "\tlwz 5,20(31)\n"                                              \
-       "\tlwz 6,24(31)\n"                                              \
-       "\tlwz 7,28(31)\n"                                              \
-       "\tlwz 8,32(31)\n"                                              \
-       "\tlwz 9,36(31)\n"                                              \
-       "\tlwz 10,40(31)\n"                                             \
-       "\tlwz 11,44(31)\n"                                             \
-       "\tlwz 12,48(31)\n"                                             \
-       "\tlwz 13,52(31)\n"                                             \
-       "\tlwz 14,56(31)\n"                                             \
-       "\tlwz 15,60(31)\n"                                             \
-       "\tlwz 16,64(31)\n"                                             \
-       "\tlwz 17,68(31)\n"                                             \
-       "\tlwz 18,72(31)\n"                                             \
-       "\tlwz 19,76(31)\n"                                             \
-       "\tlwz 20,80(31)\n"                                             \
-       "\tlwz 21,84(31)\n"                                             \
-       "\tlwz 22,88(31)\n"                                             \
-       "\tlwz 23,92(31)\n"                                             \
-       "\tlwz 24,96(31)\n"                                             \
-       "\tlwz 25,100(31)\n"                                            \
-       "\tlwz 26,104(31)\n"                                            \
-       "\tlwz 27,108(31)\n"                                            \
-       "\tlwz 28,112(31)\n"                                            \
-       "\tlwz 29,116(31)\n"                                            \
-       "\tlwz 30,120(31)\n"                                            \
-       "\tlwz 31,124(31)\n"                                            \
-       "\tb _Jv_ThrowSignal\n"                                         \
-                 : : "r"(regs), "r"(_exception)                        \
-                 : "r31", "r3");                                       \
-}                                                                      \
-while (0)  
-
-
-#define INIT_SEGV                                              \
-do                                                             \
-  {                                                            \
-    nullp = new java::lang::NullPointerException ();           \
-    struct sigaction act;                                      \
-    act.sa_handler = _Jv_catch_segv;                           \
-    sigemptyset (&act.sa_mask);                                        \
-    act.sa_flags = 0;                                          \
-    __sigaction (SIGSEGV, &act, NULL);                         \
-  }                                                            \
-while (0)  
-
-#define INIT_FPE                                               \
-do                                                             \
-  {                                                            \
-    arithexception = new java::lang::ArithmeticException       \
-      (JvNewStringLatin1 ("/ by zero"));                       \
-    struct sigaction act;                                      \
-    act.sa_handler = _Jv_catch_fpe;                            \
-    sigemptyset (&act.sa_mask);                                        \
-    act.sa_flags = 0;                                          \
-    __sigaction (SIGFPE, &act, NULL);                          \
-  }                                                            \
-while (0)  
-
-#endif /* JAVA_SIGNAL_H */