This is the mail archive of the
mailing list for the GCC project.
Re: [MIPS64] Problems when Passing TImode Parameters in EABI
- From: Richard Sandiford <richard at codesourcery dot com>
- To: "Chao-ying Fu" <fu at mips dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>, "Thekkath, Radhika" <radhika at mips dot com>, "Stephens, Nigel" <nigel at mips dot com>
- Date: Sat, 07 Oct 2006 08:35:35 +0100
- Subject: Re: [MIPS64] Problems when Passing TImode Parameters in EABI
- References: <3CB54817FDF733459B230DD27C690CEC012BB144@Exchange.mips.com> <email@example.com> <firstname.lastname@example.org> <001101c6e98e$e4a193a0$a914a8c0@MIPS.COM>
"Chao-ying Fu" <email@example.com> writes:
> 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
I don't want to both redefine the ABI and break backward compatibility
for performance reasons alone. At least not without compelling reasons.