This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Allow passing arrays in registers on AArch64
- From: Michael Hudson-Doyle <michael dot hudson at linaro dot org>
- To: Jakub Jelinek <jakub at redhat dot com>, Marcus Shawcroft <marcus dot shawcroft at gmail dot com>
- Cc: ramrad01 at arm dot com, Richard Earnshaw <rearnsha at arm dot com>, Ian Lance Taylor <iant at golang dot org>, Yufeng Zhang <Yufeng dot Zhang at arm dot com>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 19 Feb 2014 11:08:29 +1300
- Subject: Re: Allow passing arrays in registers on AArch64
- Authentication-results: sourceware.org; auth=none
- References: <52D97B6C dot 8010107 at arm dot com> <CAJ8wqtcTRrYyMdRMZV1-X+an6uFj-mtHmJ23vi2C2b3j=DMg9A at mail dot gmail dot com> <CAKOQZ8z+L4=rG9SDzNsjXm7EPxhDkqCwn7WvO6giXWZodOEvVA at mail dot gmail dot com> <87eh46nowk dot fsf at canonical dot com> <52DCF158 dot 8060708 at arm dot com> <874n4ynxkc dot fsf at canonical dot com> <87ppn3fwwy dot fsf at canonical dot com> <CAJA7tRYV=pJ2OnMyVidxUZEG2+GypLVkbstZ3hO0vKRRMA-z7Q at mail dot gmail dot com> <8738jvzwge dot fsf at canonical dot com> <CAFqB+PxP8ZFH4jeHTP9eXiNdp80d8w=Gpdm++VorL=CZ2wOpcA at mail dot gmail dot com> <20140211145315 dot GV20378 at tucnak dot redhat dot com>
Jakub Jelinek <jakub@redhat.com> writes:
> On Tue, Feb 11, 2014 at 02:51:08PM +0000, Marcus Shawcroft wrote:
>> On 6 February 2014 22:51, Michael Hudson-Doyle
>> <michael.hudson@canonical.com> wrote:
>>
>> > diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
>> > index 16c51a8..958c667 100644
>> > --- a/gcc/config/aarch64/aarch64.c
>> > +++ b/gcc/config/aarch64/aarch64.c
>> > @@ -1187,14 +1187,10 @@ aarch64_pass_by_reference (cumulative_args_t pcum ATTRIBUTE_UNUSED,
>> > size = (mode == BLKmode && type)
>> > ? int_size_in_bytes (type) : (int) GET_MODE_SIZE (mode);
>> >
>> > - if (type)
>> > + /* Aggregates are passed by reference based on their size. */
>> > + if (type && AGGREGATE_TYPE_P (type))
>> > {
>> > - /* Arrays always passed by reference. */
>> > - if (TREE_CODE (type) == ARRAY_TYPE)
>> > - return true;
>> > - /* Other aggregates based on their size. */
>> > - if (AGGREGATE_TYPE_P (type))
>> > - size = int_size_in_bytes (type);
>> > + size = int_size_in_bytes (type);
>> > }
>> >
>> > /* Variable sized arguments are always returned by reference. */
>>
>> This version of the patch looks fine. Since this is a bug I think it
>> should be committed now in stage 4. This is OK if release manager
>> agrees.
>
> Ok.
So, um, can someone commit this please?
Cheers,
mwh