diff options
author | Richard Henderson <rth@redhat.com> | 2009-09-22 08:12:48 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2009-09-22 08:12:48 -0700 |
commit | e9d5fdb247ff82213dc32745d68c52314881057f (patch) | |
tree | 8073602242bbeedc4a33217e7c762603aa539f17 /gcc/config/frv | |
parent | 98689f5ecea084b5311ed2f57fb7955f5265cbf7 (diff) | |
download | gcc-e9d5fdb247ff82213dc32745d68c52314881057f.zip gcc-e9d5fdb247ff82213dc32745d68c52314881057f.tar.gz gcc-e9d5fdb247ff82213dc32745d68c52314881057f.tar.bz2 |
frv.c (TARGET_TRAMPOLINE_INIT): New.
* config/frv/frv.c (TARGET_TRAMPOLINE_INIT): New.
(frv_trampoline_init): Rename from frv_initialize_trampoline;
make static, adjust arguments for TARGET_TRAMPOLINE_INIT hook.
* config/frv/frv.h (INITIALIZE_TRAMPOLINE): Remove.
* config/frv/frv-protos.h (frv_initialize_trampoline): Remove.
From-SVN: r151992
Diffstat (limited to 'gcc/config/frv')
-rw-r--r-- | gcc/config/frv/frv-protos.h | 1 | ||||
-rw-r--r-- | gcc/config/frv/frv.c | 10 | ||||
-rw-r--r-- | gcc/config/frv/frv.h | 7 |
3 files changed, 8 insertions, 10 deletions
diff --git a/gcc/config/frv/frv-protos.h b/gcc/config/frv/frv-protos.h index 8734694..2bfdc65 100644 --- a/gcc/config/frv/frv-protos.h +++ b/gcc/config/frv/frv-protos.h @@ -100,7 +100,6 @@ extern void frv_ifcvt_modify_final (ce_if_block_t *); extern void frv_ifcvt_modify_cancel (ce_if_block_t *); #endif extern int frv_trampoline_size (void); -extern void frv_initialize_trampoline (rtx, rtx, rtx); extern enum reg_class frv_secondary_reload_class (enum reg_class, enum machine_mode, rtx); diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c index 63e65fb..d8901e9 100644 --- a/gcc/config/frv/frv.c +++ b/gcc/config/frv/frv.c @@ -383,6 +383,7 @@ static bool frv_secondary_reload (bool, rtx, enum reg_class, secondary_reload_info *); static bool frv_frame_pointer_required (void); static bool frv_can_eliminate (const int, const int); +static void frv_trampoline_init (rtx, tree, rtx); /* Allow us to easily change the default for -malloc-cc. */ #ifndef DEFAULT_NO_ALLOC_CC @@ -479,6 +480,9 @@ static bool frv_can_eliminate (const int, const int); #undef TARGET_CAN_ELIMINATE #define TARGET_CAN_ELIMINATE frv_can_eliminate +#undef TARGET_TRAMPOLINE_INIT +#define TARGET_TRAMPOLINE_INIT frv_trampoline_init + struct gcc_target targetm = TARGET_INITIALIZER; #define FRV_SYMBOL_REF_TLS_P(RTX) \ @@ -6300,9 +6304,11 @@ frv_trampoline_size (void) sethi #0, <static_chain> jmpl @(gr0,<jmp_reg>) */ -void -frv_initialize_trampoline (rtx addr, rtx fnaddr, rtx static_chain) +static void +frv_trampoline_init (rtx m_tramp, tree fndecl, rtx static_chain) { + rtx addr = XEXP (m_tramp, 0); + rtx fnaddr = XEXP (DECL_RTL (fndecl), 0); rtx sc_reg = force_reg (Pmode, static_chain); emit_library_call (gen_rtx_SYMBOL_REF (SImode, "__trampoline_setup"), diff --git a/gcc/config/frv/frv.h b/gcc/config/frv/frv.h index 0516ecf..53966de 100644 --- a/gcc/config/frv/frv.h +++ b/gcc/config/frv/frv.h @@ -1840,13 +1840,6 @@ typedef struct frv_stack { aligning trampolines. */ #define TRAMPOLINE_ALIGNMENT (TARGET_FDPIC ? 64 : 32) -/* A C statement to initialize the variable parts of a trampoline. ADDR is an - RTX for the address of the trampoline; FNADDR is an RTX for the address of - the nested function; STATIC_CHAIN is an RTX for the static chain value that - should be passed to the function when it is called. */ -#define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, STATIC_CHAIN) \ - frv_initialize_trampoline (ADDR, FNADDR, STATIC_CHAIN) - /* Define this macro if trampolines need a special subroutine to do their work. The macro should expand to a series of `asm' statements which will be compiled with GCC. They go in a library function named |