diff options
author | Roland McGrath <roland@hack.frob.com> | 2013-06-18 10:11:02 -0700 |
---|---|---|
committer | Roland McGrath <roland@hack.frob.com> | 2013-06-18 10:11:02 -0700 |
commit | d7dffa6a558cc3305cb6b51c4153da67af1f374c (patch) | |
tree | 86335c5865c9abad6aa01d856f7c255644b81e3a /ports/sysdeps | |
parent | 18e5cc3a828b21d1a40b8b5ec0c666e6e01c47de (diff) | |
download | glibc-d7dffa6a558cc3305cb6b51c4153da67af1f374c.tar glibc-d7dffa6a558cc3305cb6b51c4153da67af1f374c.tar.gz glibc-d7dffa6a558cc3305cb6b51c4153da67af1f374c.tar.bz2 glibc-d7dffa6a558cc3305cb6b51c4153da67af1f374c.zip |
ARM: Clean up __libc_ifunc_impl_list
Diffstat (limited to 'ports/sysdeps')
-rw-r--r-- | ports/sysdeps/arm/armv7/multiarch/ifunc-impl-list.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/ports/sysdeps/arm/armv7/multiarch/ifunc-impl-list.c b/ports/sysdeps/arm/armv7/multiarch/ifunc-impl-list.c index 9c2487fd22..4a9a25c767 100644 --- a/ports/sysdeps/arm/armv7/multiarch/ifunc-impl-list.c +++ b/ports/sysdeps/arm/armv7/multiarch/ifunc-impl-list.c @@ -16,6 +16,7 @@ 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> @@ -29,21 +30,25 @@ __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, + 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)); |