summaryrefslogtreecommitdiff
path: root/gcc/target-def.h
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-22 15:11:37 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-22 15:11:37 +0000
commit82c7907c61991be035c7cd5bbc8227b80ea98b22 (patch)
tree78521a0ca34823fbb38443911cb1b76f4bd93d6c /gcc/target-def.h
parentafff72577d338d0202f923b9d0d94530c282b2a3 (diff)
downloadlinaro-gcc-82c7907c61991be035c7cd5bbc8227b80ea98b22.tar.gz
linaro-gcc-82c7907c61991be035c7cd5bbc8227b80ea98b22.tar.bz2
linaro-gcc-82c7907c61991be035c7cd5bbc8227b80ea98b22.zip
PR target/41246
* target.h (struct gcc_target): Add asm_out.trampoline_template, calls.static_chain, calls.trampoline_init, calls.trampoline_adjust_address. * target-def.h (TARGET_ASM_TRAMPOLINE_TEMPLATE): New. (TARGET_STATIC_CHAIN, TARGET_TRAMPOLINE_INIT): New. (TARGET_TRAMPOLINE_ADJUST_ADDRESS): New. * builtins.c (expand_builtin_setjmp_receiver): Use targetm.calls.static_chain; only clobber registers. (expand_builtin_init_trampoline): Use targetm.calls.trampoline_init; set up memory attributes properly for the trampoline block. (expand_builtin_adjust_trampoline): Use targetm.calls.trampoline_adjust_address. * calls.c (prepare_call_address): Add fndecl argument. Use targetm.calls.static_chain. * df-scan.c (df_need_static_chain_reg): Remove. (df_get_entry_block_def_set): Use targetm.calls.static_chain; consolodate static chain handling. * doc/tm.texi: Document new hooks. * emit-rtl.c (static_chain_rtx, static_chain_incoming_rtx): Remove. (init_emit_regs): Don't initialize them. * expr.h (prepare_call_address): Update decl. * final.c (profile_function): Use targetm.calls.static_chain. * function.c (expand_function_start): Likewise. * rtl.h (static_chain_rtx, static_chain_incoming_rtx): Remove. * stmt.c (expand_nl_goto_receiver): Use targetm.calls.static_chain; only clobber registers. * targhooks.c (default_static_chain): New. (default_asm_trampoline_template, default_trampoline_init): New. (default_trampoline_adjust_address): New. * targhooks.h: Declare them. * varasm.c (assemble_trampoline_template): Use targetm.asm_out.trampoline_template. Make the memory block const and set its size. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151983 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/target-def.h')
-rw-r--r--gcc/target-def.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/gcc/target-def.h b/gcc/target-def.h
index 728e018f71d..2ccdc667f62 100644
--- a/gcc/target-def.h
+++ b/gcc/target-def.h
@@ -247,6 +247,12 @@
#define TARGET_ASM_RECORD_GCC_SWITCHES_SECTION ".GCC.command.line"
#endif
+#ifdef TRAMPOLINE_TEMPLATE
+# define TARGET_ASM_TRAMPOLINE_TEMPLATE default_asm_trampoline_template
+#else
+# define TARGET_ASM_TRAMPOLINE_TEMPLATE NULL
+#endif
+
#define TARGET_ASM_ALIGNED_INT_OP \
{TARGET_ASM_ALIGNED_HI_OP, \
TARGET_ASM_ALIGNED_SI_OP, \
@@ -296,7 +302,8 @@
TARGET_ASM_RECORD_GCC_SWITCHES_SECTION, \
TARGET_ASM_OUTPUT_ANCHOR, \
TARGET_ASM_OUTPUT_DWARF_DTPREL, \
- TARGET_ASM_FINAL_POSTSCAN_INSN}
+ TARGET_ASM_FINAL_POSTSCAN_INSN, \
+ TARGET_ASM_TRAMPOLINE_TEMPLATE }
/* Scheduler hooks. All of these default to null pointers, which
haifa-sched.c looks for and handles. */
@@ -607,6 +614,14 @@
#define TARGET_UPDATE_STACK_BOUNDARY NULL
#define TARGET_GET_DRAP_RTX NULL
#define TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS hook_bool_void_true
+#define TARGET_STATIC_CHAIN default_static_chain
+#define TARGET_TRAMPOLINE_INIT default_trampoline_init
+
+#ifdef TRAMPOLINE_ADJUST_ADDRESS
+# define TARGET_TRAMPOLINE_ADJUST_ADDRESS default_trampoline_adjust_address
+#else
+# define TARGET_TRAMPOLINE_ADJUST_ADDRESS NULL
+#endif
#define TARGET_CALLS { \
TARGET_PROMOTE_FUNCTION_MODE, \
@@ -629,7 +644,10 @@
TARGET_INTERNAL_ARG_POINTER, \
TARGET_UPDATE_STACK_BOUNDARY, \
TARGET_GET_DRAP_RTX, \
- TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS \
+ TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS, \
+ TARGET_STATIC_CHAIN, \
+ TARGET_TRAMPOLINE_INIT, \
+ TARGET_TRAMPOLINE_ADJUST_ADDRESS \
}
#ifndef TARGET_UNWIND_TABLES_DEFAULT