This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/49881] [AVR] Inefficient stack manipulation around calls
- From: "eric.weddington at atmel dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 27 Jul 2011 23:14:40 +0000
- Subject: [Bug target/49881] [AVR] Inefficient stack manipulation around calls
- Auto-submitted: auto-generated
- References: <bug-49881-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49881
--- Comment #1 from Eric Weddington <eric.weddington at atmel dot com> 2011-07-27 23:13:31 UTC ---
(In reply to comment #0)
> Created attachment 24848 [details]
> Hack to set ACCUMULATE_OUTGOING_ARGS
>
> While looking at PR49864 I noticed some awful code.
>
> First, the argument setup code doesn't use push:
>
> rcall .
> rcall .
> rcall .
Please note that the rcall instruction has a side effect of subtracting 2 bytes
from the SP (or 3 bytes if the avr device has a 22-bit PC). This side effect is
used in doing the "rcall ." instructions as an optimization to avoid doing 2
pushes (the rcall and push instructions are the same size).
But I agree that the code looks bad, and you show an improvement.
Where is this test case that you're referring to? I can only find your patch at
this PR, and only a patch at PR49864.
Thanks,
Eric Weddington