On 10.09.2010 00:45, Marc Jones wrote:
Now that we have addressed the CAR/MMIO ROM copy issue (thanks Scott and Arne), I wanted to revisit the other change that Arne proposed for memset.
http://article.gmane.org/gmane.linux.bios/57707
Some people didn't like the architecture specific code for memset. I don't have a problem with it, but it did bring up a few questions.
- Why isn't gcc generating the rep stosb itself? This should be a
standard optimization.
- Why do we have functions for memset, memcpy, etc, when gcc has
builtins that could be used? Is this a remnant from romcc?
Please note that the AMD and Intel manuals explicitly mention that some instructions which would be used by a fast memcpy will bypass the cache, and as such are unsuitable to copy CAR contents to RAM.
Regards, Carl-Daniel