Commit ad90e28f by Dan Nicolaescu Committed by Dan Nicolaescu

re PR target/23828 (local calling convention not used when using --combine)

PR 23828
* config/i386/i386.c (ix86_function_regparm): Fix the test for
a nested function.

From-SVN: r104623
parent f6326c19
2005-09-25 Dan Nicolaescu <dann@ics.uci.edu>
PR 23828
* config/i386/i386.c (ix86_function_regparm): Fix the test for
a nested function.
2005-09-25 Richard Henderson <rth@redhat.com> 2005-09-25 Richard Henderson <rth@redhat.com>
* config/alpha/alpha.c (tls_symbolic_operand_1): Trust * config/alpha/alpha.c (tls_symbolic_operand_1): Trust
......
...@@ -2158,7 +2158,8 @@ ix86_function_regparm (tree type, tree decl) ...@@ -2158,7 +2158,8 @@ ix86_function_regparm (tree type, tree decl)
/* We can't use regparm(3) for nested functions as these use /* We can't use regparm(3) for nested functions as these use
static chain pointer in third argument. */ static chain pointer in third argument. */
if (local_regparm == 3 if (local_regparm == 3
&& DECL_CONTEXT (decl) && !DECL_NO_STATIC_CHAIN (decl)) && decl_function_context (decl)
&& !DECL_NO_STATIC_CHAIN (decl))
local_regparm = 2; local_regparm = 2;
/* Each global register variable increases register preassure, /* Each global register variable increases register preassure,
so the more global reg vars there are, the smaller regparm so the more global reg vars there are, the smaller regparm
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment