This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/60300] [avr] Suboptimal stack pointer manipulation for frame setup
- From: "senthil_kumar.selvaraj at atmel dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 12 May 2014 13:30:07 +0000
- Subject: [Bug target/60300] [avr] Suboptimal stack pointer manipulation for frame setup
- Auto-submitted: auto-generated
- References: <bug-60300-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60300
Senthil Kumar Selvaraj <senthil_kumar.selvaraj at atmel dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |senthil_kumar.selvaraj@atme
| |l.com
--- Comment #4 from Senthil Kumar Selvaraj <senthil_kumar.selvaraj at atmel dot com> ---
It doesn't actually get to that - avr_sp_immediate_operand returns false if the
operand is not IN_RANGE(-6,6). The comments are a bit misleading though - the
shortest sequence only applies if the addend is within that range.
Like Johann said, it must be a deliberate decision in favor of speed - the
attached program with a stub implementation of bar and main calling foo clocks
a couple of cycles lesser with DSIZE=7 than with DSIZE=6(as measured with
avrtest), although the code is 6 bytes longer. If RCALLs and PUSH had been
generated, the code would be 4 bytes shorter, but would need 4 more clock
cycles.