Andrew Paulsen <andrew.paul...@gmail.com> writes:

> On 12/10/05, Dmitry <di...@spec.ru> wrote:
>> This is strange...
>> This bug has been fixed a while ago ...
>> Try to lower optimization to -O
>
> I tried this and it did not help. Any other suggestions?

In my slightly hacked libc, I've replaced that over-engineered (at
least for MSP430) memcpy implementation with the following:

#include <string.h>

void *
memcpy(void *dst0, const void *src0, size_t len)
{
        char *dst = (char *)dst0;
        const char *src = (const char *)src0;
        void *ret = dst0;

        for (; len > 0; len--)
                *dst++ = *src++;

        return ret;
}
It works fine, and is 10 times smaller too.


Regards,
-- 
Daniel Néri
Sigicom AB, Stockholm, Sweden

Reply via email to