[AArch64] Implement vset_lane intrinsics in C
Andrew Pinski
pinskia@gmail.com
Fri Sep 13 23:07:00 GMT 2013
On Fri, Sep 13, 2013 at 11:57 AM, James Greenhalgh
<james.greenhalgh@arm.com> wrote:
> On Fri, Sep 13, 2013 at 07:39:08PM +0100, Andrew Pinski wrote:
>> I don't think this works for big-endian due to the way ARM decided the
>> lanes don't match up with array entry there.
>
> Hi Andrew,
>
> Certainly for the testcase I've added in this patch there are no issues.
>
> Vector indexing should work consistently between big and little endian
> AArch64 targets. So,
>
> int32_t foo[4] = {0, 1, 2, 3};
> int32x4_t a = vld1q_s32 (foo);
> int b = foo[1];
> return b;
>
> Should return '1' whatever your endianness. Throwing together a quick
> test case, that is the case for current trunk. Do you have a testcase
> where this goes wrong?
I was not thinking of that but rather the definition of lanes in ARM64
is different than from element due to memory ordering of endian.
That is lane 0 is element 3 in big-endian. Or is this only for
aarch32 where the issue is located?
Thanks,
Andrew Pinski
>
> Thanks,
> James
>
More information about the Gcc-patches
mailing list