aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-06-28 14:06:52 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1996-06-28 14:06:52 -0400
commitcd2b3e6bf4637aaa94ca25ac51697738016ce363 (patch)
tree5f7cff7633392db2e244ec82db813e26b7aba4de /gcc
parent800e920a338b6a1fe40290d3c2ec4d99fdbc58cd (diff)
downloadgcc-cd2b3e6bf4637aaa94ca25ac51697738016ce363.zip
gcc-cd2b3e6bf4637aaa94ca25ac51697738016ce363.tar.gz
gcc-cd2b3e6bf4637aaa94ca25ac51697738016ce363.tar.bz2
(INITIALIZE_TRAMPOLINE): New definition.
From-SVN: r12355
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/alpha/linux.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/config/alpha/linux.h b/gcc/config/alpha/linux.h
index 9dfab6e..8e3f9e6 100644
--- a/gcc/config/alpha/linux.h
+++ b/gcc/config/alpha/linux.h
@@ -70,3 +70,30 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define TARGET_PROFILING_NEEDS_GP
#undef ASM_FINAL_SPEC
+
+/* Emit RTL insns to initialize the variable parts of a trampoline.
+ FNADDR is an RTX for the address of the function's pure code.
+ CXT is an RTX for the static chain value for the function.
+
+ This differs from the standard version in that:
+
+ We do not initialize the "hint" field because it is not the case
+ that the target is in range of something on the stack. We save
+ a bogus branch-prediction cache line load by not setting "hint".
+
+ Linux always has an executable stack -- no need for a system call.
+ */
+
+#undef INITIALIZE_TRAMPOLINE
+#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
+{ \
+ rtx _addr; \
+ \
+ _addr = memory_address (Pmode, plus_constant ((TRAMP), 16)); \
+ emit_move_insn (gen_rtx (MEM, Pmode, _addr), (FNADDR)); \
+ _addr = memory_address (Pmode, plus_constant ((TRAMP), 24)); \
+ emit_move_insn (gen_rtx (MEM, Pmode, _addr), (CXT)); \
+ \
+ emit_insn (gen_rtx (UNSPEC_VOLATILE, VOIDmode, \
+ gen_rtvec (1, const0_rtx), 0)); \
+}