gcc 4.1 implements compiler builtins for atomic ops

Benjamin Herrenschmidt benh@kernel.crashing.org
Mon Jun 27 00:56:00 GMT 2005


> Not generating the code in the compiler means that people who are mainly
> interested in the architectures with easy use of atomic operations look
> at the code and think we on earth they should pay such a high price for
> the operation if they can do it much cheaper when inlining the code.  It
> is not me saying that this is what should happen.  It is what will
> happen regardless of my opinion.  The result is reduced portability of
> sources and, as I said before, the archs with the diverging APIs will
> suffer.

I think you have no idea of the cost of an lwarx/stwcx. pair compared to
a library call ...

Ben.




More information about the Libc-alpha mailing list