From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5687 invoked by alias); 1 May 2013 17:01:36 -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 5678 invoked by uid 89); 1 May 2013 17:01:36 -0000 X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,TW_CP 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; Wed, 01 May 2013 17:01:35 +0000 Received: by topped-with-meat.com (Postfix, from userid 5281) id 265AC2C096; Wed, 1 May 2013 10:01:34 -0700 (PDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: Will Newton Cc: libc-ports@sourceware.org, Patch Tracking Subject: Re: [PATCH, v5] ARM: Add Cortex-A15 optimized NEON and VFP memcpy routines, with IFUNC. In-Reply-To: Will Newton's message of Wednesday, 1 May 2013 16:26:04 +0100 References: <517FF73E.5020509@linaro.org> <20130430171818.697972C08A@topped-with-meat.com> Message-Id: <20130501170134.265AC2C096@topped-with-meat.com> Date: Wed, 01 May 2013 17:01: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=cFfnH-CuOakA:10 a=Z6MIti7PxpgA:10 a=kj9zAlcOel0A:10 a=hOe2yjtxAAAA:8 a=_hi65yC6-YUA:10 a=iwLe3At7FjL8FWYxDcgA:9 a=CjuIK1q_8ugA:10 X-SW-Source: 2013-05/txt/msg00016.txt.bz2 > > If __SOFTFP__ is predefined by the compiler, then the compiler is presuming > > VFP support anyway. So you can make this: > > > > #ifdef __SOFTFP__ > > ldr r1, .Lmemcpy_arm > > tst r0, #HWCAP_ARM_VFP > > ldrne r1, .Lmemcpy_vfp > > #else > > ldr r1, .Lmemcpy_vfp > > #endif > > > > (and also conditionalize .Lmemcpy_arm, below). > > I'm not sure I follow the logic here, could you elaborate? I dropped a "not" in my first sentence, which might have been confusing. The compiler predefines __SOFTFP__ unless it's presuming VFP support. If __SOFTFP__ is not defined, then the compiler is already generating code that effectively presumes HWCAP_ARM_VFP will be set, so you might as well just elide any code testing it at runtime and statically do whatever you would do if HWCAP_ARM_VFP were set at runtime. Thanks, Roland