[PATCH, resend] ARM: fix inline atomic handling ldrex/strex
llvm at quasiparticle.net
Mon Jul 7 13:13:22 PDT 2014
Currently, clang emits atomic instructions only for Windows, Linux and
some BSDs, but not for other OSes (even if hardware supports atomics).
The test whether ldrex/strex are available at all is also a bit wrong
and excludes e.g. the entire M profile.
This patch allows atomics on hardware that supports them for all OSes,
including "no OS" (aka bare metal), which was excluded without good
reason. Instead of allowing inline atomics only on some OSes, let's
allow them everywhere and have those that *don't* want them explicitly
Also, since the M profile does not support 8byte atomics, disable those
for that profile.
Previously, there was some disagreement about whether this should be
handled by adding more OSes to the list of allowed atomic users, but
that still excludes some profiles and unfairly excludes a lot of OSes
from fast atomics. I still think the "atomics/no atomics" decision
should not be this pessimistic.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2194 bytes
Desc: not available
More information about the cfe-commits