On Sat, Sep 11, 2010 at 1:59 PM, Peter Stuge peter@stuge.se wrote:
Marc Jones wrote:
doesn't really explain why gcc doesn't do a rep stos or rep mov (which should hit the cache)/ That should be an easy optimization for gcc.
Except I don't think it's an optimization performance-wise. But if you enable -Os then I would expect it to use rep stosb.
It is an optimzation over a byte copy, which is what the code does. We don't have optimized mem functions.
It also doesn't address why coreboot has a functions when we could use gcc intrinsic that should be optimized for the architecture they are built for.
Good point! I guess we rolled our own to be less dependent on gcc. I think it would be OK to use gcc's implementations though.
Good point, but most compilers have intrinsics for these functions, Do we need a compiler intrinsics layer?
Marc