[patch?] Linux ARM atomics

Rafael EspĂ­ndola rafael.espindola at gmail.com
Mon Apr 15 11:12:02 PDT 2013

> The use of a library function is ABI and therefore a natural frontend responsibility.
> Among other things:
>   - the atomic library functions are not guaranteed to be atomic w.r.t. the processor's
>     primitive atomics and
>   - different targets may require us to use a different set of atomic library functions
>     or provide slightly different semantics to them.
> So it makes sense for the backend to require that the frontend just not emit
> illegal primitive atomic operations.

I see. I was reading http://gcc.gnu.org/wiki/Atomic/GCCMM/LIbrary and
got the impression that the atomic operations had to be implemented in
a shared library so that new atomic support in a processor could be
utilized. I guess the document is out of date and the atomic
operations that are available in portable code are just locked when an
ABI for an architecture is defined, correct?

If that is the case,  the comment

// FIXME: Set MaxAtomicInlineWidth if we have the feature v6e

is incorrect, no? The correct fix for this case is to set
MaxAtomicInlineWidth when using the hard float ABI variant.

> John.


More information about the cfe-commits mailing list