aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mips/iris3.h
diff options
context:
space:
mode:
authormeissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>1993-04-16 20:37:41 +0000
committermeissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>1993-04-16 20:37:41 +0000
commitc82677825766d268dc1671c0cfdb4ea6c3f88844 (patch)
tree60b7012eeda3d9e98d8cb1f6a427fd094d517fd4 /gcc/config/mips/iris3.h
parent4f950ec9cd042c6ea6ff130ea22674cb5fd998b3 (diff)
Allow iris to have its version of the trampoline code.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4162 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mips/iris3.h')
-rw-r--r--gcc/config/mips/iris3.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/config/mips/iris3.h b/gcc/config/mips/iris3.h
index 7fe40a8b7a8..079da38d2b8 100644
--- a/gcc/config/mips/iris3.h
+++ b/gcc/config/mips/iris3.h
@@ -96,4 +96,35 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Plain char is unsigned in the SGI compiler. */
#define DEFAULT_SIGNED_CHAR 0
+
+/* 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
+ RTX for the static chain value that should be passed to the
+ function when it is called.
+
+ Silicon Graphics machines are supposed to not have a mprotect
+ function to enable execute protection, but the stack already
+ has execute protection turned on. Because the MIPS chips have
+ no method to flush the icache without a system call, this can lose
+ if the same address is used for multiple trampolines. */
+
+#define INITIALIZE_TRAMPOLINE(ADDR, FUNC, CHAIN) \
+{ \
+ rtx addr = ADDR; \
+ emit_move_insn (gen_rtx (MEM, SImode, plus_constant (addr, 28)), FUNC); \
+ emit_move_insn (gen_rtx (MEM, SImode, plus_constant (addr, 32)), CHAIN); \
+}
+
+
+/* Attempt to turn on access permissions for the stack. */
+
+#define TRANSFER_FROM_TRAMPOLINE \
+ \
+void \
+__enable_execute_stack (addr) \
+ char *addr; \
+{ \
+}
+
#include "mips/mips.h"