This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc 4.1 implements compiler builtins for atomic ops

David S. Miller wrote:

> If, as a not-so-hypothetical example, some years from now the
> Pentium-1000 has some subtle atomic operation bug that needs a proper
> workaround,

In this case, what would happen is that you update the microcode and the
processor should behave correctly again.

But the real problem with your argumentation is that there is no reason
why the locking code should have a higher probability of defects in the
processor than all the other parts combined.  Hence to help with
processor bugs we must not ever generate any asm code again (for
application).  Only byte code since then we only have to replace the

The ppc405 problem is not a minority issue with ppc again the rest.
It's even a problem in ppc405 against ppc all-the-others.  It's some
obscure embedded thing (these days).  You compile special software
stacks for it.  There is no real mixing with the "real" ppc code.  I.e.,
adding an indirection layer for just this cause is a punishment even for
almost all ppc users.

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

â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â

Attachment: signature.asc
Description: OpenPGP digital signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]