Commit dd629845 by Ian Lance Taylor Committed by Ian Lance Taylor

i386.c (ix86_function_regparm): Save an extra register for -fsplit-stack with DECL_STATIC_CHAIN.

	* config/i386/i386.c (ix86_function_regparm): Save an extra
	register for -fsplit-stack with DECL_STATIC_CHAIN.

From-SVN: r246286
parent 8026a5ae
2017-03-20 Ian Lance Taylor <iant@google.com>
* config/i386/i386.c (ix86_function_regparm): Save an extra
register for -fsplit-stack with DECL_STATIC_CHAIN.
2017-03-17 Palmer Dabbelt <palmer@dabbelt.com>
PR target/79912
......
......@@ -7975,8 +7975,14 @@ ix86_function_regparm (const_tree type, const_tree decl)
local_regparm = 2;
/* Save a register for the split stack. */
if (local_regparm == 3 && flag_split_stack)
local_regparm = 2;
if (flag_split_stack)
{
if (local_regparm == 3)
local_regparm = 2;
else if (local_regparm == 2
&& DECL_STATIC_CHAIN (target->decl))
local_regparm = 1;
}
/* Each fixed register usage increases register pressure,
so less registers should be used for argument passing.
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