diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-19 13:30:34 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-19 13:30:34 +0000 |
commit | 8d54d6a02be288addf25cba1c3e053de6c019de3 (patch) | |
tree | ad9460795e6afe6279fd142b74f0096d38d6fcc3 /gcc/config/moxie/moxie.c | |
parent | 9d06a15ba84f1243ec37d8ce55d166c12786f4a2 (diff) | |
download | gcc-8d54d6a02be288addf25cba1c3e053de6c019de3.tar.gz |
Make TARGET_STATIC_CHAIN allow a function type
As opposed to always being a decl. This is a prerequisite
to allowing the static chain to be loaded for indirect calls.
* targhooks.c (default_static_chain): Remove check for
DECL_STATIC_CHAIN.
* config/moxie/moxie.c (moxie_static_chain): Likewise.
* config/i386/i386.c (ix86_static_chain): Allow decl or type
as the first argument.
* config/xtensa/xtensa.c (xtensa_static_chain): Change the name
of the unused first parameter.
* doc/tm.texi (TARGET_STATIC_CHAIN): Document the first parameter
may be a type.
* target.def (static_chain): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217769 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/moxie/moxie.c')
-rw-r--r-- | gcc/config/moxie/moxie.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/config/moxie/moxie.c b/gcc/config/moxie/moxie.c index d4688d9c2f8..148d26be1f5 100644 --- a/gcc/config/moxie/moxie.c +++ b/gcc/config/moxie/moxie.c @@ -528,13 +528,10 @@ moxie_arg_partial_bytes (cumulative_args_t cum_v, /* Worker function for TARGET_STATIC_CHAIN. */ static rtx -moxie_static_chain (const_tree fndecl, bool incoming_p) +moxie_static_chain (const_tree ARG_UNUSED (fndecl_or_type), bool incoming_p) { rtx addr, mem; - if (!DECL_STATIC_CHAIN (fndecl)) - return NULL; - if (incoming_p) addr = plus_constant (Pmode, arg_pointer_rtx, 2 * UNITS_PER_WORD); else |