This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/60300] [avr] Suboptimal stack pointer manipulation for frame setup


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]