This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: PATCH to load_register_parameters for empty structs and sibcalls


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]