Commit 163d9996 by Kresten Krab Thorup

(INITIALIZE_TRAMPOLINE): Append call to __enable_execute_stack.

(INITIALIZE_TRAMPOLINE): Append call to
__enable_execute_stack.
(CLEAR_INSN_CACHE): New macro.

From-SVN: r5395
parent c1381fd3
...@@ -181,3 +181,26 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ ...@@ -181,3 +181,26 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define OBJC_FORWARDING_STACK_OFFSET 8 #define OBJC_FORWARDING_STACK_OFFSET 8
#define OBJC_FORWARDING_MIN_OFFSET 8 #define OBJC_FORWARDING_MIN_OFFSET 8
/* INITIALIZE_TRAMPOLINE is changed so that it also enables executable
stack. The __enable_execute_stack also clears the insn cache. */
/* NOTE: part of this is copied from m68k.h */
#undef INITIALIZE_TRAMPOLINE
#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
{ \
rtx _addr, _func; \
emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 2)), TRAMP); \
emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 18)), CXT); \
emit_move_insn (gen_rtx (MEM, SImode, plus_constant (TRAMP, 22)), FNADDR); \
_addr = memory_address (SImode, (TRAMP)); \
_func = gen_rtx (SYMBOL_REF, Pmode, "__enable_execute_stack"); \
emit_library_call (_func, 0, VOIDmode, 1, _addr, Pmode); \
}
/* A C expression used to clear the instruction cache from
address BEG to address END. On NeXTSTEP this i a system trap. */
#define CLEAR_INSN_CACHE(BEG, END) \
asm volatile ("trap #2")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment