This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: PATCH to load_register_parameters for empty structs and sibcalls
- From: Bernd Schmidt <bschmidt at redhat dot com>
- To: Jason Merrill <jason at redhat dot com>, gcc-patches List <gcc-patches at gcc dot gnu dot org>, Richard Biener <richard dot guenther at gmail dot com>, Iain Sandoe <iain at codesourcery dot com>
- Date: Wed, 16 Mar 2016 20:04:01 +0100
- Subject: Re: RFA: PATCH to load_register_parameters for empty structs and sibcalls
- Authentication-results: sourceware.org; auth=none
- References: <56E9A9BE dot 8090009 at redhat dot com>
On 03/16/2016 07:45 PM, Jason Merrill wrote:
Discussion of empty class parameter passing ABI led me to notice that
r162402 broke sibcalls with arguments of size 0 in some cases. Before
that commit, the code read
else if ((partial == 0 || args[i].pass_on_stack)
&& size != 0)
{
[...]
if (is_sibcall
&& mem_overlaps_already_clobbered_arg_p (XEXP (args[i].value,
0), size))
*sibcall_failure = 1;
and after,
if (is_sibcall
&& (size == 0
|| mem_overlaps_already_clobbered_arg_p
(XEXP (args[i].value, 0),
size)))
So now we set *sibcall_failure if size==0, whereas before we didn't
enter the outer block. The comment also contradicts the code.
The patch looks ok. I was trying to research the earlier change, but I
can't find a message in the archives. Cc'ing Iain in case he has input.
Bernd