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 canonical dot com>
- To: Ian Lance Taylor <iant at golang dot org>
- Cc: Yufeng Zhang <Yufeng dot Zhang at arm dot com>, Richard Earnshaw <richard dot earnshaw at arm dot com>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 18 Jan 2014 12:56:27 +1300
- Subject: Re: Allow passing arrays in registers on AArch64
- Authentication-results: sourceware.org; auth=none
- References: <87ha93nhl1 dot fsf at canonical dot com> <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>
Ian Lance Taylor <iant@golang.org> writes:
> On Fri, Jan 17, 2014 at 11:32 AM, Michael Hudson-Doyle
> <michael.hudson@canonical.com> wrote:
>>
>> On 18 Jan 2014 07:50, "Yufeng Zhang" <Yufeng.Zhang@arm.com> wrote:
>>>
>>> Also can you please try to add some new test(s)? It may not be that
>>> straightforward to add non-C/C++ tests, but give it a try.
>>
>> Can you give some hints? Like at least where in the tree such a test would
>> go? I don't know this code at all.
>
> There is already a test in libgo, of course.
>
> I think it would be pretty hard to write a test that doesn't something
> like what libgo does. The problem is that GCC is entirely consistent
> with and without your patch. You could add a Go test that passes an
> array in gcc/testsuite/go.go-torture/execute/ easily enough, but it
> would be quite hard to add a test that doesn't pass whether or not
> your patch is applied.
I think it would have to be a code generation test, i.e. that compiling
something like
func second(e [2]int64) int64 {
return e[1]
}
does not access memory or something along those lines. I'll have a look
next week.
Cheers,
mwh