[PATCH v2] ARM: Add Cortex-A15 optimized NEON and VFP memcpy routines, with IFUNC.

Will Newton will.newton@linaro.org
Thu Apr 18 08:01:00 GMT 2013


On 17 April 2013 18:51, Carlos O'Donell <carlos@redhat.com> wrote:
> On 04/16/2013 02:25 AM, Will Newton wrote:
>> +size_t
>> +__libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
>> +                     size_t max)
>> +{
>> +  size_t i = 0;
>> +  int hwcap;
>> +
>> +  hwcap = GLRO(dl_hwcap);
>> +
>> +  IFUNC_IMPL (i, name, memcpy,
>> +           IFUNC_IMPL_ADD (array, i, memcpy, hwcap & HWCAP_ARM_NEON,
>> +                           __memcpy_neon)
>> +           IFUNC_IMPL_ADD (array, i, memcpy, hwcap & HWCAP_ARM_VFPv3,
>> +                           __memcpy_vfp)
>> +           IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_arm));
>> +
>> +  return i;
>> +}
>
> If unaligned access is a requirement why not check for it here?
>
> While unaligned access is virtually free on ARMv6 or higher it
> is still possible for the U-bit to be disabled and for this to
> crash on such systems.

Does glibc support building for this type of system? The compiler will
emit unaligned accesses by default on armv6 and above.

Also there isn't a HWCAP bit for unaligned as far as I can tell.

--
Will Newton
Toolchain Working Group, Linaro



More information about the Libc-ports mailing list