This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Enabling -O2 option of GCC]
- From: Jonathan Larmour <jlarmour at redhat dot com>
- To: David Webster <dwebster at lanergy dot com>
- Cc: "'Andrew Lunn'" <andrew dot lunn at ascom dot ch>,"'N.Suresh'" <nsuresh at cdotb dot ernet dot in>,ecos-discuss at sources dot redhat dot com, rprakash at cdotb dot ernet dot in,bshiva at cdotb dot ernet dot in
- Date: Thu, 13 Dec 2001 14:01:52 +0000
- Subject: Re: [ECOS] Enabling -O2 option of GCC]
- References: <000801c18310$b14885c0$4103a8c0@LANERGY05>
David Webster wrote:
>
> An efficient memcpy is something that is processor specific (sometimes
> even target specific depending on memory widths etc) - so it's most
> sensible for eCos infra to supply a generic memcpy that's adequate and
> let the compiler/processor/target override it with its own if necessary.
Yes it should, and there's no good reason it hasn't except for lack of
time, and in the past a certain amount of disagreement about where such
optimized standard functions should live. The latter problem is greatly
helped now that the isoinfra package exists.
You can get an efficient hand-written assembler memcpy for ARM from newlib
for example. The same is true for most other architectures. We can use
these versions freely in eCos.
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/newlib/libc/machine/xscale/memcpy.c?rev=1.1&content-type=text/x-cvsweb-markup&cvsroot=src
( yes I know it says xscale, but it's ARM too really - it's just that
xscale.h defines away PRELOADSTR).
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine