This is the mail archive of the
mailing list for the newlib project.
RE: Update newlib to support efficient string operation functions for Thumb.
- From: "Hale Wang" <Hale dot Wang at arm dot com>
- To: <newlib at sourceware dot org>, <vinschen at redhat dot com>
- Date: Fri, 15 Aug 2014 13:41:35 +0800
- Subject: RE: Update newlib to support efficient string operation functions for Thumb.
- Authentication-results: sourceware.org; auth=none
- References: <000601cfb776$33efa100$9bcee300$ at arm dot com> <20140814082817 dot GB17310 at calimero dot vinschen dot de>
I agree. I just need to leave the wrapper blank. The libc/string/ will be automatically pulled in as the default definition.
Thanks for your command. I will update this patch and do some testing locally before I send it out.
Thanks and Best Regards,
> -----Original Message-----
> From: firstname.lastname@example.org [mailto:newlib-
> email@example.com] On Behalf Of Corinna Vinschen
> Sent: 2014å8æ14æ 16:28
> To: firstname.lastname@example.org
> Subject: Re: Update newlib to support efficient string operation functions for
> Hi Hale,
> On Aug 14 12:14, Hale Wang wrote:
> > Hi,
> > The source files in newlib/libc/machine/arm/ are not so efficient
> > enough to sopport Thumb.
> > For Cortex-M0, if we don't define '__OPTIMIZE_SIZE__' or
> > 'PREFER_SIZE_OVER_SPEED' which means size is not preferred,
> > inefficient code will be used. This may result in pool benchmark
> > In this case, we can include newlib/libc/string/strcmp.c to improve
> > the performance. And if size is preferred, the original code will be used.
> > I have done some tests on Dhrystone benchmark, and the performance of
> > Cortex-M0 can be improved to 13% with this solution.
> > The strlen.c can be improved in the similar way.
> > Bootstrap and no make check regression on X86-64.
> This patch is a bit complicated. You're explicitely including ../../string/*.c, but
> that's not necessary. What you should do is this: Use #if to define the
> scenario in which the assembler code should not be used:
> # if [thumb1 && no-size-opimization]
> [code here]
> The result is that the strlen/strcmp functions won't be defined in the
> assembler-optimized files, and that will automatically pull in the default C
> definitions of strlen/strcmp from libc/string. No reason to include them
> Along the same lines, the strcmp-stub.c file should not be necessary.
> Just don't define the strcmp() function in the assembler file in the scenario
> you don't want it, and newlib will fall back to the C function defined in
> Corinna Vinschen
> Cygwin Maintainer
> Red Hat