[coreboot] rfc - gcc builtins and memset memcpy memmove memcmp
c-d.hailfinger.devel.2006 at gmx.net
Fri Sep 10 01:10:17 CEST 2010
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
> 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.
> 1. Why isn't gcc generating the rep stosb itself? This should be a
> standard optimization.
> 2. 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.
More information about the coreboot