From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24469 invoked by alias); 17 Jun 2013 20:55:46 -0000 Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org Received: (qmail 24448 invoked by uid 89); 17 Jun 2013 20:55:42 -0000 X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,TW_CP,TW_HW,TW_VF autolearn=no version=3.3.1 Received: from toast.topped-with-meat.com (HELO topped-with-meat.com) (204.197.218.159) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 17 Jun 2013 20:55:41 +0000 Received: by topped-with-meat.com (Postfix, from userid 5281) id 06E142C09B; Mon, 17 Jun 2013 13:55:40 -0700 (PDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: libc-ports@sourceware.org Subject: [PATCH roland/arm-ifunc-test] ARM: Clean up __libc_ifunc_impl_list Message-Id: <20130617205540.06E142C09B@topped-with-meat.com> Date: Mon, 17 Jun 2013 20:55:00 -0000 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=LYSvtFvi c=1 sm=1 tr=0 a=WkljmVdYkabdwxfqvArNOQ==:117 a=14OXPxybAAAA:8 a=GMVTapeH3WwA:10 a=Z6MIti7PxpgA:10 a=kj9zAlcOel0A:10 a=hOe2yjtxAAAA:8 a=YkxmvHqoxZEA:10 a=mDV3o1hIAAAA:8 a=elxsUqeOHByP1hLK7DYA:9 a=CjuIK1q_8ugA:10 X-SW-Source: 2013-06/txt/msg00025.txt.bz2 This cleans up the test code for memcpy so that it does not refer to hwcap bits when the actual memcpy code will not. Thanks, Roland ports/ChangeLog.arm 2013-06-17 Roland McGrath * 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. --- 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 . */ +#include #include #include #include @@ -29,21 +30,22 @@ __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); + bool use_neon = true; +#ifndef __ARM_NEON__ + use_neon = (GLRO(dl_hwcap) & HWCAP_ARM_NEON) != 0; +# define __memcpy_neon memcpy +#endif - IFUNC_IMPL (i, name, memcpy, - IFUNC_IMPL_ADD (array, i, memcpy, hwcap & HWCAP_ARM_NEON, -#ifdef __ARM_NEON__ - memcpy -#else - __memcpy_neon + bool use_vfp = true; +#ifdef __SOFTFP__ + use_neon = (GLRO(dl_hwcap) & HWCAP_ARM_VFP) != 0; #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));