From 2b4fa409a97f9d398698dff291e4e7176747d6b4 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 23 Sep 2009 15:24:42 -0700 Subject: 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 --- gcc/targhooks.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'gcc/targhooks.c') 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 -- cgit v1.1