This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/53735] thumb1 spill failure with -Os
- From: "zhenqiang.chen at linaro dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 26 Jul 2012 07:50:25 +0000
- Subject: [Bug target/53735] thumb1 spill failure with -Os
- Auto-submitted: auto-generated
- References: <bug-53735-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53735
zhenqiang.chen at linaro dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |zhenqiang.chen at linaro
| |dot org
--- Comment #4 from zhenqiang.chen at linaro dot org 2012-07-26 07:50:25 UTC ---
Root cause: r8-r11 is not available for THUMB1 with -Os.
In function arm_conditional_register_usage (arm.c), you can find the code
if (TARGET_THUMB1 && optimize_size)
{
/* When optimizing for size on Thumb-1, it's better not
to use the HI regs, because of the overhead of
stacking them. */
for (regno = FIRST_HI_REGNUM;
regno <= LAST_HI_REGNUM; ++regno)
fixed_regs[regno] = call_used_regs[regno] = 1;
}
If removing the code, the result is OK (r8 is used).