aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mips
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/mips')
-rw-r--r--gcc/config/mips/mips.h9
-rw-r--r--gcc/config/mips/mips.md12
-rw-r--r--gcc/config/mips/news4.h6
-rw-r--r--gcc/config/mips/ultrix.h12
-rw-r--r--gcc/config/mips/xm-iris5.h8
5 files changed, 43 insertions, 4 deletions
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 348a4250b55..557fb09878c 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -2349,6 +2349,13 @@ typedef struct mips_args {
#define TRAMPOLINE_ALIGNMENT (TARGET_LONG64 ? 64 : 32)
+/* INITIALIZE_TRAMPOLINE calls this library function to flush
+ program and data caches. */
+
+#ifndef CACHE_FLUSH_FUNC
+#define CACHE_FLUSH_FUNC "_flush_cache"
+#endif
+
/* A C statement to initialize the variable parts of a trampoline.
ADDR is an RTX for the address of the trampoline; FNADDR is an
RTX for the address of the nested function; STATIC_CHAIN is an
@@ -2372,7 +2379,7 @@ typedef struct mips_args {
/* Flush both caches. We need to flush the data cache in case \
the system has a write-back cache. */ \
/* ??? Should check the return value for errors. */ \
- emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "_flush_cache"), \
+ emit_library_call (gen_rtx (SYMBOL_REF, Pmode, CACHE_FLUSH_FUNC), \
0, VOIDmode, 3, addr, Pmode, \
GEN_INT (TRAMPOLINE_SIZE), TYPE_MODE (integer_type_node),\
GEN_INT (3), TYPE_MODE (integer_type_node)); \
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index 1a3e2ce22ce..8b81221ea3f 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -6459,6 +6459,18 @@ move\\t%0,%z4\\n\\
{
emit_insn (gen_blockage ());
}")
+
+;; For n32/n64, we need to restore gp after a builtin setjmp. We do this
+;; by making use of the fact that we've just called __dummy.
+
+(define_expand "builtin_setjmp_receiver"
+ [(const_int 0)]
+ "TARGET_ABICALLS && mips_abi != ABI_32"
+ "
+{
+ emit_insn (gen_loadgp (gen_rtx (SYMBOL_REF, Pmode, \"__dummy\")));
+ emit_insn (gen_blockage ());
+}")
;;
;; ....................
diff --git a/gcc/config/mips/news4.h b/gcc/config/mips/news4.h
index f7c464cf353..9f816c19258 100644
--- a/gcc/config/mips/news4.h
+++ b/gcc/config/mips/news4.h
@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler. Sony RISC NEWS (mips)
- Copyright (C) 1991 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -33,4 +33,8 @@ Boston, MA 02111-1307, USA. */
#define MACHINE_TYPE "RISC NEWS-OS"
+/* INITIALIZE_TRAMPOLINE calls this library function to flush
+ program and data caches. */
+#define CACHE_FLUSH_FUNC "cacheflush"
+
#include "mips/mips.h"
diff --git a/gcc/config/mips/ultrix.h b/gcc/config/mips/ultrix.h
index cb18a5d4eba..7fb101a9151 100644
--- a/gcc/config/mips/ultrix.h
+++ b/gcc/config/mips/ultrix.h
@@ -1,5 +1,5 @@
-/* Definitions of target machine for GNU compiler. DECstation (ultrix) version.
- Copyright (C) 1991 Free Software Foundation, Inc.
+/* Definitions of target machine for GNU compiler; DECstation (Ultrix) version.
+ Copyright (C) 1991, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -46,4 +46,12 @@ Boston, MA 02111-1307, USA. */
/* Generate calls to memcpy, etc., not bcopy, etc. */
#define TARGET_MEM_FUNCTIONS
+/* Work around assembler forward label references generated in exception
+ handling code. */
+#define DWARF2_UNWIND_INFO 0
+
+/* INITIALIZE_TRAMPOLINE calls this library function to flush
+ program and data caches. */
+#define CACHE_FLUSH_FUNC "cacheflush"
+
#include "mips/mips.h"
diff --git a/gcc/config/mips/xm-iris5.h b/gcc/config/mips/xm-iris5.h
index 448b7ac80bb..f3eb9cdb753 100644
--- a/gcc/config/mips/xm-iris5.h
+++ b/gcc/config/mips/xm-iris5.h
@@ -1,3 +1,11 @@
#include "mips/xm-mips.h"
#define USG
+
+/* On SGI IRIX 5.3, inttypes.h clashes with sys/types.h, but the clash
+ (when compiled with GCC) is a warning, so configure.in thinks it's OK
+ to use it. Work around this problem. */
+
+#ifdef HAVE_INTTYPES_H
+#undef HAVE_INTTYPES_H
+#endif