[PATCH, ARM] memchr for ARM

David Gilbert david.gilbert@linaro.org
Tue Oct 11 17:42:00 GMT 2011


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



More information about the Newlib mailing list