From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6975 invoked by alias); 18 Jun 2013 17:12:04 -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 6956 invoked by uid 89); 18 Jun 2013 17:12:01 -0000 X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,TW_CP,TW_HW,TW_VF autolearn=ham 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; Tue, 18 Jun 2013 17:11:59 +0000 Received: by topped-with-meat.com (Postfix, from userid 5281) id B123B2C0E0; Tue, 18 Jun 2013 10:11:55 -0700 (PDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: "Joseph S. Myers" Cc: Subject: Re: [PATCH roland/arm-ifunc-test] ARM: Clean up __libc_ifunc_impl_list In-Reply-To: Joseph S. Myers's message of Monday, 17 June 2013 22:59:52 +0000 References: <20130617205540.06E142C09B@topped-with-meat.com> <20130617220623.D50E72C07D@topped-with-meat.com> Message-Id: <20130618171155.B123B2C0E0@topped-with-meat.com> Date: Tue, 18 Jun 2013 17:12: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=I4yfAwi1Wu8A:10 a=Z6MIti7PxpgA:10 a=kj9zAlcOel0A:10 a=hOe2yjtxAAAA:8 a=_p-NhPATzh8A:10 a=mDV3o1hIAAAA:8 a=65L-NIZYe-e6gtys9dQA:9 a=CjuIK1q_8ugA:10 X-SW-Source: 2013-06/txt/msg00033.txt.bz2 > On Mon, 17 Jun 2013, Roland McGrath wrote: > > > +#ifndef __ARM_NEON__ > > + bool use_vfp = true; > > +# ifdef __SOFTFP__ > > + use_neon = (GLRO(dl_hwcap) & HWCAP_ARM_VFP) != 0; > > That looks like it should be setting use_vfp, not use_neon.... Sigh. ports/ChangeLog.arm 2013-06-18 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,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));