diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-09-24 11:21:39 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-09-24 11:21:39 +0200 |
commit | 9f62cb922fdb83cd32244f3dd7b537d369557a3e (patch) | |
tree | 0c79112ec645e731d0045fca38a62354054c2798 /gcc/config | |
parent | 78605f0a685eddfb20bcf786f7a004747cc705e8 (diff) | |
download | gcc-9f62cb922fdb83cd32244f3dd7b537d369557a3e.zip gcc-9f62cb922fdb83cd32244f3dd7b537d369557a3e.tar.gz gcc-9f62cb922fdb83cd32244f3dd7b537d369557a3e.tar.bz2 |
cgraphunit.c (cgraph_lower_function): Revert last change.
* cgraphunit.c (cgraph_lower_function): Revert last change.
* targhooks.c (default_static_chain): Use !DECL_STATIC_CHAIN
instead of DECL_NO_STATIC_CHAIN.
* tree-cfg.c (verify_gimple_call): Likewise.
* tree-nested.c (get_chain_decl, get_chain_field,
convert_tramp_reference_op, convert_gimple_call): Likewise.
(convert_all_function_calls): Likewise. Always set or clear
DECL_STATIC_CHAIN initially, for !n->outer clear it.
(lower_nested_functions): Remove DECL_NO_STATIC_CHAIN checking code.
* c-parser.c (c_parser_declaration_or_fndef): Set DECL_STATIC_CHAIN
if nested.
* print-tree.c (print_node): Handle DECL_STATIC_CHAIN instead of
DECL_NO_STATIC_CHAIN.
* config/i386/i386.c (ix86_static_chain): Use !DECL_STATIC_CHAIN
instead of DECL_NO_STATIC_CHAIN.
(ix86_function_regparm, find_drap_reg): Likewise. Don't test
decl_function_context.
* varasm.c (initializer_constant_valid_p): Likewise.
* tree.h (DECL_NO_STATIC_CHAIN): Renamed to ...
(DECL_STATIC_CHAIN): ... this.
* config/moxie/moxie.c (moxie_static_chain): Use !DECL_STATIC_CHAIN
instead of DECL_NO_STATIC_CHAIN.
* method.c (make_thunk, make_alias_for): Don't set
DECL_NO_STATIC_CHAIN.
* decl.c (builtin_function_1, grokfndecl): Likewise.
* lex.c (build_lang_decl): Likewise.
* gcc-interface/utils.c (gnat_pushdecl): Don't set
DECL_NO_STATIC_CHAIN, set DECL_STATIC_CHAIN for
nested functions.
* testsuite/gcc.target/i386/pr12329.c: Adjust.
From-SVN: r152114
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/i386/i386.c | 14 | ||||
-rw-r--r-- | gcc/config/moxie/moxie.c | 2 |
2 files changed, 5 insertions, 11 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 7c21542..3b11b91 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -4508,9 +4508,7 @@ ix86_function_regparm (const_tree type, const_tree decl) /* We don't want to use regparm(3) for nested functions as these use a static chain pointer in the third argument. */ - if (local_regparm == 3 - && decl_function_context (decl) - && !DECL_NO_STATIC_CHAIN (decl)) + if (local_regparm == 3 && DECL_STATIC_CHAIN (decl)) local_regparm = 2; /* Each fixed register usage increases register pressure, @@ -8128,9 +8126,7 @@ find_drap_reg (void) Since function with tail call may use any caller-saved registers in epilogue, DRAP must not use caller-saved register in such case. */ - if ((decl_function_context (decl) - && !DECL_NO_STATIC_CHAIN (decl)) - || crtl->tail_call_emit) + if (DECL_STATIC_CHAIN (decl) || crtl->tail_call_emit) return R13_REG; return R10_REG; @@ -8141,9 +8137,7 @@ find_drap_reg (void) Since function with tail call may use any caller-saved registers in epilogue, DRAP must not use caller-saved register in such case. */ - if ((decl_function_context (decl) - && !DECL_NO_STATIC_CHAIN (decl)) - || crtl->tail_call_emit) + if (DECL_STATIC_CHAIN (decl) || crtl->tail_call_emit) return DI_REG; /* Reuse static chain register if it isn't used for parameter @@ -19811,7 +19805,7 @@ ix86_static_chain (const_tree fndecl, bool incoming_p) { unsigned regno; - if (DECL_NO_STATIC_CHAIN (fndecl)) + if (!DECL_STATIC_CHAIN (fndecl)) return NULL; if (TARGET_64BIT) diff --git a/gcc/config/moxie/moxie.c b/gcc/config/moxie/moxie.c index 215bbdf..7515fa2 100644 --- a/gcc/config/moxie/moxie.c +++ b/gcc/config/moxie/moxie.c @@ -460,7 +460,7 @@ moxie_static_chain (const_tree fndecl, bool incoming_p) { rtx addr, mem; - if (DECL_NO_STATIC_CHAIN (fndecl)) + if (!DECL_STATIC_CHAIN (fndecl)) return NULL; if (incoming_p) |