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: [MIPS64] Problems when Passing TImode Parameters in EABI


"Chao-ying Fu" <fu@mips.com> writes:
> Hello,
>
>   Thanks for the patch!  But from this patch, TImode parameters will be
> passed by reference.  Could we test 64-bit targets and
> TImode to return false, so that TImode parameters can be passed by value?

Well, like I say...

>> > As it is, the EABI uses stack passing as the fallback case for
>> > "parameters not otherwise handled above".  So I think the type
>> > != NULL case is doing the right thing.  Sticking with it also
>> > has the advantage that it wouldn't break backward compatiblity
>> > for cases that currently work.  I don't think this particular
>> > case has ever worked for libcalls.

In other words,

  (a) The ABI spec says we should pass by reference.

  (b) TImode values have always been passed by reference in the cases
      that worked -- i.e. those not involving libcalls.  If you pass
      TImode values to normal C functions, earlier versions of gcc
      would pass them by reference, and those cases worked.

  (c) The fact that the code didn't work for libcalls was a bug
      that was dormant until recently.  TImode libcalls a fairly
      new thing.

I don't want to both redefine the ABI and break backward compatibility
for performance reasons alone.  At least not without compelling reasons.

Richard


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