This is the mail archive of the
mailing list for the GCC project.
Re: who owns stack args?
- From: Jeff Law <law at redhat dot com>
- To: Alexander Monakov <amonakov at ispras dot ru>, DJ Delorie <dj at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 24 Feb 2016 13:54:20 -0700
- Subject: Re: who owns stack args?
- Authentication-results: sourceware.org; auth=none
- References: <201602241920 dot u1OJKXXL022846 at greed dot delorie dot com> <alpine dot LNX dot 2 dot 20 dot 1602242304460 dot 20973 at monopod dot intra dot ispras dot ru>
On 02/24/2016 01:42 PM, Alexander Monakov wrote:
Which would imply that the outgoing argument stack slots must always be
considered clobbered by a call.
On Wed, 24 Feb 2016, DJ Delorie wrote:
The real question is: are stack arguments call-clobbered or
call-preserved? Does the answer depend on the "pure" attribute?
Stack area holding stack arguments should belong to the callee for tail-calls
to work (the callee will trash that area when laying out arguments for the
tail call; thanks to Rich Felker for pointing that out to me).
Thus it cannot depend on attribute-pure.
FWIW, I'm fine with that interpretation ;-)