This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Sibcall arguments passed on the stack
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: rth at redhat dot com (Richard Henderson)
- Cc: dalej at apple dot com, gcc at gcc dot gnu dot org
- Date: Wed, 1 Oct 2003 12:22:16 -0400 (EDT)
- Subject: Re: Sibcall arguments passed on the stack
> On Tue, Sep 30, 2003 at 11:10:58PM -2800, John David Anglin wrote:
> > Yes, that appears to be the best fix. What had bothered me about it
> > was there appears to have been a concious decision not to add stack
> > slots to the CALL_INSN_FUNCTION_USAGE.
>
> For non-const functions, there is no need, since "all memory" is
> considered clobberable. For const functions, what we have now is
> partially a mistake -- iirc Dale found that we add the use when
> we're adding libcall notes, but I think we should do it all the time.
Ok, it looks as if we may have a problem in determining when a function
is non-const (PR 12372). It would appear that the following function
in gcc.c-torture/execute/20030307-1.c is treated as a const function:
int fcntl_lock(int fd, int op, long long offset, long long count, int type)
{
return type;
}
This allows stack arguments to be deleted. However, because of the
number and size of the arguments, the argument `type' has to be passed
on the stack (i.e., in global memory) on the 32-bit pa ports. Thus,
the function must be non-const in this case as it has to read global
memory.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)