summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1994-10-28 23:07:48 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1994-10-28 23:07:48 +0000
commit36f90d33fb2858456a198612d2c4f1a0deb48cbf (patch)
treee4483dae831c76967f560dfe282095898223a977 /gcc
parent21fde8a9ad14a3c031d01fdebbd785712b9613a2 (diff)
downloadgcc-36f90d33fb2858456a198612d2c4f1a0deb48cbf.tar.gz
(TRAMPOLINE_SIZE): Install real implementation.
(INITIALIZE_TRAMPOLINE, TRAMPOLINE_TEMPLATE): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@8356 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/pdp11/pdp11.h31
1 files changed, 25 insertions, 6 deletions
diff --git a/gcc/config/pdp11/pdp11.h b/gcc/config/pdp11/pdp11.h
index 4ae42034c45..b0cab19fa4a 100644
--- a/gcc/config/pdp11/pdp11.h
+++ b/gcc/config/pdp11/pdp11.h
@@ -1242,19 +1242,38 @@ fprintf (FILE, "$help$: . = .+8 ; space for tmp moves!\n") \
#define ASM_OUTPUT_DOUBLE_INT(a,b) fprintf(a,"%d", b)
-/* trampoline - how should i do it in separate i+d ? */
-#define TRAMPOLINE_SIZE 0
+/* trampoline - how should i do it in separate i+d ?
+ have some allocate_trampoline magic???
-#define INITIALIZE_TRAMPOLINE(x,y,z) \
+ the following should work for shared I/D: */
+
+/* lets see whether this works as trampoline:
+MV #STATIC, $4 0x940Y 0x0000 <- STATIC; Y = STATIC_CHAIN_REGNUM
+JMP FUNCTION 0x0058 0x0000 <- FUNCTION
+*/
+
+#define TRAMPOLINE_TEMPLATE(FILE) \
{ \
-abort(); \
+ ASM_OUTPUT_INT (FILE, gen_rtx(CONST_INT, VOIDmode, 0x9400+STATIC_CHAIN_REGNUM)); \
+ ASM_OUTPUT_INT (FILE, const0_rtx); \
+ ASM_OUTPUT_INT (FILE, gen_rtx(CONST_INT, VOIDmode, 0x0058)); \
+ ASM_OUTPUT_INT (FILE, const0_rtx); \
}
-#define TRAMPOLINE_TEMPLATE(FILE) \
+#define TRAMPOLINE_SIZE 8
+#define TRAMPOLINE_ALIGN 16
+
+/* 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. */
+
+#define INITIALIZE_TRAMPOLINE(TRAMP,FNADDR,CXT) \
{ \
-abort(); \
+ emit_move_insn (gen_rtx (MEM, HImode, plus_constant (TRAMP, 2)), CXT); \
+ emit_move_insn (gen_rtx (MEM, HImode, plus_constant (TRAMP, 6)), FNADDR); \
}
+
/* Some machines may desire to change what optimizations are
performed for various optimization levels. This macro, if
defined, is executed once just after the optimization level is