public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: Will Newton <will.newton@linaro.org>
To: Richard Henderson <rth@twiddle.net>
Cc: libc-ports@sourceware.org, Patch Tracking <patches@linaro.org>
Subject: Re: [PATCH v2] ARM: Add Cortex-A15 optimized NEON and VFP memcpy routines, with IFUNC.
Date: Wed, 17 Apr 2013 15:53:00 -0000	[thread overview]
Message-ID: <CANu=DmgZjMZdijjjsxnECU9CMJmNkUqTbYctp+WA_VxmTN=O-A@mail.gmail.com> (raw)
In-Reply-To: <516EC27E.8080502@twiddle.net>

On 17 April 2013 16:40, Richard Henderson <rth@twiddle.net> wrote:

Hi Richard,

Thanks for the review!

> On 2013-04-16 11:25, Will Newton wrote:
>>
>>   ports/sysdeps/arm/armv7/multiarch/Makefile         |   3 +
>
>
> Does this really require v7?  From a brief read I didn't see anything in the
> _arm version that didn't work since v5te (ldrd and pld).  Any reason not to
> put this into armv6 instead?

From reading the comments of the code v7 is required for NEON, v6 is
required for VFP and unaligned access is required. The unaligned
access requirement may be a problem on v5 I'm not sure. NB: I did not
write the memcpy code so I have not looked at it in great detail.

I also had trouble building an armv6 glibc. I only have armv7 systems
to test on and it doesn't seem possible to build for armv6 on an armv7
system as far as I can tell.

>> +ENTRY(memcpy)
>> +       .type   memcpy, %gnu_indirect_function
>> +       ldr     r1, .Lmemcpy_arm
>> +       tst     r0, #HWCAP_ARM_NEON
>> +       it      ne
>> +       ldrne   r1, .Lmemcpy_neon
>> +       bne     1f
>
>
> Swap vfp and neon tests and you don't need the branch.

True, I'll do that.

>> +.Lreturn:
>
>
> Unused label?

Yes, thanks, will fix.

>> +       ldr     tmp1, [src, #-60]       /* 15 words to go.  */
>> +       str     tmp1, [dst, #-60]
>
>
> These negative offsets mean thumb2 doesn't work.  That's fine, but it means
> that you need care for this in the _arm case.
>
> You have two choices: either do the swapping to arm mode by hand in the impl
> file, or force the entire memcpy.o to arm mode by using #define NO_THUMB at
> the top, before the #include <sysdep.h>.

It sounds like switching it all to arm mode is the best option, I'll do that.

--
Will Newton
Toolchain Working Group, Linaro

  reply	other threads:[~2013-04-17 15:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-16  9:25 Will Newton
2013-04-17 15:40 ` Richard Henderson
2013-04-17 15:53   ` Will Newton [this message]
2013-04-18  7:42     ` Richard Henderson
2013-04-18  7:47       ` Siddhesh Poyarekar
2013-04-18  7:54         ` Will Newton
2013-04-18  8:26           ` Siddhesh Poyarekar
2013-04-18  8:38             ` Will Newton
2013-04-18 17:58             ` Siddhesh Poyarekar
2013-04-22  8:27               ` Will Newton
2013-04-17 17:51 ` Carlos O'Donell
2013-04-18  8:01   ` Will Newton
2013-04-19 21:47 ` Joseph S. Myers
2013-04-22  8:32   ` Will Newton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANu=DmgZjMZdijjjsxnECU9CMJmNkUqTbYctp+WA_VxmTN=O-A@mail.gmail.com' \
    --to=will.newton@linaro.org \
    --cc=libc-ports@sourceware.org \
    --cc=patches@linaro.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).