This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH, ARM] memchr for ARM
- From: David Gilbert <david dot gilbert at linaro dot org>
- To: Greta Yorsh <Greta dot Yorsh at arm dot com>
- Cc: newlib at sourceware dot org, nickc at redhat dot com, michael dot hope at linaro dot org, patches at linaro dot org
- Date: Tue, 11 Oct 2011 17:32:18 +0100
- Subject: Re: [PATCH, ARM] memchr for ARM
- References: <20111010181029.GA11966@davesworkthinkpad> <B393A6715F47FC43935D96EA15105EFF20B3B8E291@GEORGE.Emea.Arm.com> <CA+1XiSeCd9wjPoqwd0fgOU0MhV=5MPoB3n6Vdy-ETkegd3xGAA@mail.gmail.com> <4e94396f.04d1e30a.7123.21f5SMTPIN_ADDED@mx.google.com>
On 11 October 2011 13:41, Greta Yorsh <Greta.Yorsh@arm.com> wrote:
> Thanks for the explanations.
>
>> Perhaps; in other libraries I'd had it in a .S file and just marked
>> the function and file as being assembled in thumb;
>> it's a little more tricky to do here if I'm sometimes #including the .c
>> file.
>
> I had a similar problem with memcpy for ARM in newlib. Also, the long inline
> assembly is a bit hard to read. I created a stub .c file for the include and
> .S for the actual code. Is there a better way?
>
> http://sourceware.org/ml/newlib/2011/msg00474.html
Yes; I was trying to follow the style of the other files in that
directory - but you're
right; it's much better to ditch the quoted asm and just use a .S (which is what
I had to start with from other libs).
I'll flip it around to that and fix up the few comments; that also
means I can force
it to thumb2 mode and leave the cbz/cbnz in.
I'll also drop the ldrd in - I've done some benchmarks on a8 and a9
and there is no
difference between the ldrd and the ldmia in the main loop on a8 and a9; I'd be
interested to know what difference they make on an a15.
Dave