aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMike Stump <mrs@gcc.gnu.org>1997-06-06 23:18:36 +0000
committerMike Stump <mrs@gcc.gnu.org>1997-06-06 23:18:36 +0000
commit28174a1465662ce918c1625e33fcaf5a93457827 (patch)
treee1ac1e967ef794bea51ee8cff6e71c8cf9964543 /gcc
parent7ec189f2ec5af35774c5bda252dd09fc61698f71 (diff)
downloadgcc-28174a1465662ce918c1625e33fcaf5a93457827.zip
gcc-28174a1465662ce918c1625e33fcaf5a93457827.tar.gz
gcc-28174a1465662ce918c1625e33fcaf5a93457827.tar.bz2
libgcc2.c (__eh_ffetmnpc): Add support for machines that cannot access globals after throw's epilogue when...
* libgcc2.c (__eh_ffetmnpc): Add support for machines that cannot access globals after throw's epilogue when -fno-sjlj-exceptions is used. * rs6000.c (DONT_ACCESS_GBLS_AFTER_EPILOGUE): Likewise. * mips.h (DONT_ACCESS_GBLS_AFTER_EPILOGUE): Likewise. (INITIAL_ELIMINATION_OFFSET): Fix RETURN_ADDRESS_POINTER_REGNUM for 64 bit words, with 32 bit pointers and variable endianness. Fixes throwing across shared library lines (useful at times on mips and rs6000) From-SVN: r14168
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/mips/mips.h9
-rw-r--r--gcc/config/rs6000/rs6000.h4
-rw-r--r--gcc/libgcc2.c10
3 files changed, 22 insertions, 1 deletions
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 3ae6e9a..f1e985a 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -1966,7 +1966,9 @@ extern struct mips_frame_info current_frame_info;
else if ((FROM) == RETURN_ADDRESS_POINTER_REGNUM \
&& ((TO) == FRAME_POINTER_REGNUM \
|| (TO) == STACK_POINTER_REGNUM)) \
- (OFFSET) = current_frame_info.gp_sp_offset; \
+ (OFFSET) = current_frame_info.gp_sp_offset \
+ + ((UNITS_PER_WORD - (POINTER_SIZE / BITS_PER_UNIT)) \
+ * (BYTES_BIG_ENDIAN != 0)); \
else \
abort (); \
}
@@ -4047,3 +4049,8 @@ while (0)
#define NO_BUILTIN_PTRDIFF_TYPE
#define PTRDIFF_TYPE (TARGET_LONG64 ? "long int" : "int")
#endif
+
+/* See mips_expand_prologue's use of loadgp for when this should be
+ true. */
+
+#define DONT_ACCESS_GBLS_AFTER_EPILOGUE (TARGET_ABICALLS && mips_abi != ABI_32)
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index 3071726..f469061 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -3126,3 +3126,7 @@ extern int rs6000_valid_type_attribute_p ();
extern void rs6000_set_default_type_attributes ();
extern struct rtx_def *rs6000_dll_import_ref ();
extern struct rtx_def *rs6000_longcall_ref ();
+
+/* See nonlocal_goto_receiver for when this must be set. */
+
+#define DONT_ACCESS_GBLS_AFTER_EPILOGUE (TARGET_TOC && TARGET_MINIMAL_TOC)
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index 0d53b10..c32a7e0 100644
--- a/gcc/libgcc2.c
+++ b/gcc/libgcc2.c
@@ -3436,6 +3436,16 @@ __throw ()
void *__eh_pc;
+/* See expand_builtin_throw for details. */
+
+void **__eh_ffetmnpc () {
+ static void *buf[2] = {
+ &__find_first_exception_table_match,
+ &__eh_pc
+ };
+ return buf;
+}
+
void
__empty ()
{