[Bug rtl-optimization/66626] [4.9/5/6 Regression] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3
hjl.tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Jun 30 20:30:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66626
--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
ix86_function_regparm has
/* 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_STATIC_CHAIN (target->decl))
local_regparm = 2;
/* Save a register for the split stack. */
if (local_regparm == 3 && flag_split_stack)
local_regparm = 2;
/* Each fixed register usage increases register pressure,
so less registers should be used for argument passing.
This functionality can be overriden by an explicit
regparm value. */
for (regno = AX_REG; regno <= DI_REG; regno++)
if (fixed_regs[regno])
globals++;
local_regparm
= globals < local_regparm ? local_regparm - globals : 0;
if (local_regparm > regparm)
^^^ Shouldn't it be "<"?
regparm = local_regparm;
}
More information about the Gcc-bugs
mailing list