+2013-06-18 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/arm/armv7/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list)
+ [__ARM_NEON__]: Do not refer to HWCAP_ARM_NEON.
+ [!__SOFTFP__]: Do not refer to HWCAP_ARM_VFP.
+
2013-06-18 Joseph Myers <joseph@codesourcery.com>
* sysdeps/arm/fpu_control.h [!(_LIBC && !_LIBC_TEST) &&
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <stdbool.h>
#include <string.h>
#include <ldsodefs.h>
#include <sysdep.h>
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,
+ bool use_neon = true;
#ifdef __ARM_NEON__
- memcpy
+# define __memcpy_neon memcpy
#else
- __memcpy_neon
+ use_neon = (GLRO(dl_hwcap) & HWCAP_ARM_NEON) != 0;
#endif
- )
+
+#ifndef __ARM_NEON__
+ bool use_vfp = true;
+# ifdef __SOFTFP__
+ use_vfp = (GLRO(dl_hwcap) & HWCAP_ARM_VFP) != 0;
+# endif
+#endif
+
+ IFUNC_IMPL (i, name, memcpy,
+ IFUNC_IMPL_ADD (array, i, memcpy, use_neon, __memcpy_neon)
#ifndef __ARM_NEON__
- IFUNC_IMPL_ADD (array, i, memcpy, hwcap & HWCAP_ARM_VFP,
- __memcpy_vfp)
+ IFUNC_IMPL_ADD (array, i, memcpy, use_vfp, __memcpy_vfp)
#endif
IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_arm));