avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] New strlcpy()


From: E. Weddington
Subject: Re: [avr-libc-dev] New strlcpy()
Date: Mon, 05 Aug 2002 09:58:01 -0600

On 3 Aug 2002 at 23:44, Joerg Wunsch wrote:

> 
> Thanks Eric for your contribution!  And it even already includes
> doxygen documentation, great.

I just included the doxygen comments in the source code from the 
latest (at that time) CVS.

> I could have a look at the C versions, but i'm not very familiar with
> including complete assembler sources into avr-libc (register usage
> etc.), so i'd prefer if someone else could review them.
> 

Basically, I optimized the C code for strlcpy() and strlcat(), 
compiled with -O2 and -O3 (looking for the most optimized compile), 
and then made sure the assembler conformed to /doc/register-
usage.txt, used #defines to name registers, and used macros where 
appropriate. I essentially styled it after other assembly string 
functions in the library. I also made sure there wasn't anything else 
that I could see to optimize in the assembler; I much prefer to make 
tight code in C that then gets compiled to optimized assembler.

If the 2 functions are double-checked as correct. Do you know if 
other open source projects would be interested in them? I know that 
these functions originally came from OpenBSD, and that newlib is 
targeted to embedded systems.

Which speaking of newlib, I saw in the todo list an item to finish 
porting newlib to avrlibc. What was the reason for not using newlib 
itself  (and instead starting avrlibc) for the AVR C library?

> If people agree this is useful (and correct code), i can volunteer to
> include them (unless Marek or Theodore prefer to do it theirselves, of
> course).
> 

Thanks.


Eric



reply via email to

[Prev in Thread] Current Thread [Next in Thread]