(INITIALIZE_TRAMPOLINE): Delete #ifndef/#endif.
authorJim Wilson <wilson@gcc.gnu.org>
Tue, 5 Oct 1993 20:25:03 +0000 (13:25 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 5 Oct 1993 20:25:03 +0000 (13:25 -0700)
(INITIALIZE_TRAMPOLINE): Delete #ifndef/#endif.  Change
function name from __enable_execute_stack to __gcc_flush_cache.
(TRANSFER_FROM_TRAMPOLINE): Likewise.  Delete code calling
mprotect.  Uncomment code calling cacheflush.

From-SVN: r5614

gcc/config/mips/mips.h

index c717ad6..001bd3b 100644 (file)
@@ -1982,45 +1982,28 @@ typedef struct mips_args {
    RTX for the static chain value that should be passed to the
    function when it is called.  */
 
-#ifndef INITIALIZE_TRAMPOLINE
 #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 make stack executable */                                   \
-  emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__enable_execute_stack"), \
+  /* Flush the instruction cache.  */                                      \
+  emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__gcc_flush_cache"), \
                     0, VOIDmode, 1, addr, Pmode);                          \
 }
-#endif /* INITIALIZE_TRAMPOLINE */
 
+/* Flush the instruction cache.  */
 
-/* Attempt to turn on access permissions for the stack.  */
-
-#ifndef TRANSFER_FROM_TRAMPOLINE
 #define TRANSFER_FROM_TRAMPOLINE                                       \
                                                                        \
 void                                                                   \
-__enable_execute_stack (addr)                                          \
+__gcc_flush_cache (addr)                                               \
      char *addr;                                                       \
 {                                                                      \
-  int size = getpagesize ();                                           \
-  int mask = ~(size-1);                                                        \
-  char *page = (char *) (((int) addr) & mask);                         \
-  char *end  = (char *) ((((int) (addr + TRAMPOLINE_SIZE)) & mask) + size); \
-                                                                       \
-  /* 7 is PROT_READ | PROT_WRITE | PROT_EXEC */                                \
-  if (mprotect (page, end - page, 7) < 0)                              \
-    perror ("mprotect of trampoline code");                            \
-                                                                       \
-/*                                                                     \
   if (cacheflush (addr, TRAMPOLINE_SIZE, 1) < 0)                       \
     perror ("cacheflush of trampoline code");                          \
- */                                                                    \
 }
-#endif /* TRANSFER_FROM_TRAMPOLINE */
-
 \f
 /* Addressing modes, and classification of registers for them.  */