aboutsummaryrefslogtreecommitdiff
path: root/gcc/targhooks.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2009-09-23 15:24:42 -0700
committerRichard Henderson <rth@gcc.gnu.org>2009-09-23 15:24:42 -0700
commit2b4fa409a97f9d398698dff291e4e7176747d6b4 (patch)
tree321b9eb874c077b9b7674eb07850055b8825fc48 /gcc/targhooks.c
parent9193312a099c192f134768d0567fb5d29107a796 (diff)
downloadgcc-2b4fa409a97f9d398698dff291e4e7176747d6b4.zip
gcc-2b4fa409a97f9d398698dff291e4e7176747d6b4.tar.gz
gcc-2b4fa409a97f9d398698dff291e4e7176747d6b4.tar.bz2
tm.texi (STATIC_CHAIN, [...]): Remove.
* doc/tm.texi (STATIC_CHAIN, STATIC_CHAIN_INCOMING): Remove. (TARGET_STATIC_CHAIN): Mention that this hook must be used for static chain passed in memory. * system.h (STATIC_CHAIN, STATIC_CHAIN_INCOMING): Poison. * targhooks.c (default_static_chain): Don't handle STATIC_CHAIN, STATIC_CHAIN_INCOMING. Issue a sorry if there's no STATIC_CHAIN_REGNUM defined. * config/picochip/picochip-protos.h: s/class/klass/. * config/picochip/picochip.c (TARGET_STATIC_CHAIN): New. (picochip_static_chain): New. * config/picochip/picochip.h (STATIC_CHAIN): Remove. (STATIC_CHAIN_INCOMING): Remove. * config/xtensa/xtensa.c (TARGET_STATIC_CHAIN): New. (xtensa_static_chain): New. * config/xtensa/xtensa.h (STATIC_CHAIN, STATIC_CHAIN_INCOMING): * Remove. From-SVN: r152104
Diffstat (limited to 'gcc/targhooks.c')
-rw-r--r--gcc/targhooks.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index 16f481e..8a2e56b 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -636,22 +636,27 @@ default_static_chain (const_tree fndecl, bool incoming_p)
if (incoming_p)
{
-#ifdef STATIC_CHAIN_INCOMING
- return STATIC_CHAIN_INCOMING;
-#endif
#ifdef STATIC_CHAIN_INCOMING_REGNUM
return gen_rtx_REG (Pmode, STATIC_CHAIN_INCOMING_REGNUM);
#endif
}
-#ifdef STATIC_CHAIN
- return STATIC_CHAIN;
-#endif
#ifdef STATIC_CHAIN_REGNUM
return gen_rtx_REG (Pmode, STATIC_CHAIN_REGNUM);
#endif
- gcc_unreachable ();
+ {
+ static bool issued_error;
+ if (!issued_error)
+ {
+ issued_error = true;
+ sorry ("nested functions not supported on this target");
+ }
+
+ /* It really doesn't matter what we return here, so long at it
+ doesn't cause the rest of the compiler to crash. */
+ return gen_rtx_MEM (Pmode, stack_pointer_rtx);
+ }
}
void