-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/03/11 08:07, Georg-Johann Lay wrote:
> Georg-Johann Lay wrote:
>> Richard Henderson wrote:
>>> On 08/01/2011 11:42 AM, Georg-Johann Lay wrote:
>>>> Is there a specific reason not to define 
>>>> ACCUMULATE_OUTGOING_ARGS on AVR?
>>> Yes.  So that you can use PUSH.  But as I said in PR49881, you
>>> probably want to provide -maccumulate-outgoing-args.
>>> 
>>> I have a follow-up patch to the last one in that PR...
>>> 
>>> 
>>> r~
>> 
>> PUSH is fine but what about POP?
>> 
>> It's very expensive to pop several bytes, i.e. disabling IRQs,
>> loading and storing SP and the like. Usung store+displacement has
>> not this drawback and as I wrote, come code degradations you
>> explained in PR49881 are artifacts of PR46278, i.e. fake X
>> addressing.
>> 
>> Johann
>> 
> 
> Tried this test case:
> 
> #include <stdio.h>
> 
> void foo () { printf ("%d %d %d", 1, 2, 3); printf ("%d %d %d", 3, 4,
> 5); printf ("%d %d %d", 1, 4, 5); }
> 
> Attached the output: The compiler happily pushes onto the stack but
> pops only at the end of the function. So in a function with many such
> calls that would eat up great deal of RAM. It that what we want?
> 
> RETURN_POPS_ARGS cannot help here.
Popping arguments is deferred until the accumulated size of the deferred
argument pops reaches a particular threshold or certain other conditions
are met (see NO_DEFER_POP).

I don't recall the parameters used to determine when the accumulated
size is large enough to force pops, but I'm sure you can find it with a
little searching in the GCC sources.

Ahhh, memories of the m68k...

jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOOXY4AAoJEBRtltQi2kC79VkH/Ar4NFKpU9mMXS+Pswz3vuOT
6Mv0pWGmuACBz7r69NZ9WNb2PQBXTJUp/vQJUbvKxIBFWmtEc6wRO1kYz3NuZ9FX
MRTXO+Mo3TWkFtzr5krq6d3r0CYVwa3ta/U/XNwvoo+XAUVkuYQgJi0C85yBQBwM
M9Q8nzWaJxAohSh+r6tOIBBdFG66YnfmZAYxLnsOaS5akm4tMuS6D5KFnJVJZbc7
btjNYzLvjCBXuekuHCyaq3HxpTTmhKWCFXuy55fUiOZGJJabPfTfbXlRaM5pGkPk
eo6gR9ydvMIt0RbYCSpqNy1RE+bOfeawqnoE/Mx86ZIzJZuLWOz+3K8UI5cINJ4=
=2Kgl
-----END PGP SIGNATURE-----

Reply via email to