From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3597 invoked by alias); 17 Apr 2013 17:51:07 -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 3587 invoked by uid 89); 17 Apr 2013 17:51:07 -0000 X-Spam-SWARE-Status: No, score=-8.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_CP,TW_HW autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 17 Apr 2013 17:51:07 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3HHp4Be012796 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 17 Apr 2013 13:51:05 -0400 Received: from [10.3.113.77] (ovpn-113-77.phx2.redhat.com [10.3.113.77]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3HHp4aD004329; Wed, 17 Apr 2013 13:51:04 -0400 Message-ID: <516EE108.2030501@redhat.com> Date: Wed, 17 Apr 2013 17:51:00 -0000 From: "Carlos O'Donell" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Will Newton CC: libc-ports@sourceware.org, patches@linaro.org Subject: Re: [PATCH v2] ARM: Add Cortex-A15 optimized NEON and VFP memcpy routines, with IFUNC. References: <516D18F0.4060009@linaro.org> In-Reply-To: <516D18F0.4060009@linaro.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-04/txt/msg00080.txt.bz2 On 04/16/2013 02:25 AM, Will Newton wrote: > +size_t > +__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, > + __memcpy_neon) > + IFUNC_IMPL_ADD (array, i, memcpy, hwcap & HWCAP_ARM_VFPv3, > + __memcpy_vfp) > + IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_arm)); > + > + return i; > +} If unaligned access is a requirement why not check for it here? While unaligned access is virtually free on ARMv6 or higher it is still possible for the U-bit to be disabled and for this to crash on such systems. Cheers, Carlos.