This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Re: V3: use generic atomic ops, move atomic-ops detection into , configure.target


> The generic stub implementations aren't actually atomic, e.g., __atomic_add
> is done with "*__mem += __val;" rather than assembly.

Riiiiight. Kind of hard to write in generic assembly, no?

> So on the plus side, we allow the library to build on J. Random Platform
> even though it hasn't been specifically ported.  On the minus side, we lose
> a few clock cycles of performance, and maybe some correctness, since the
> "atomic operations" aren't.  It's the correctness part that worries me.
> A lot.

...the file is not atomic on generic platforms. It's a placeholder, 
it's not supposed to be correct. All it has to do is allow building the 
library.

Your patch looks fine.

-benjamin

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