[patch?] Linux ARM atomics

Charles Davis cdavis5x at gmail.com
Sun Apr 14 19:07:40 PDT 2013

On Apr 14, 2013, at 6:32 PM, Rafael EspĂ­ndola wrote:
> Why is clang in the business of deciding what gets compiled into a
> libgcc/compilerrt call? Shouldn't it always produce IL that uses the
> atomic operations and let LLVM produce the compiler-rt calls when it
> knows the backend can't handle it?
I'd tend to agree... but then again, I'm just a lowly recent graduate who doesn't work all that often on the backends, so what do I know?

> diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
> index 95334e0..6a251bd 100644
> --- a/lib/Basic/Targets.cpp
> +++ b/lib/Basic/Targets.cpp
> @@ -3536,6 +3536,7 @@ public:
>      // ARM has atomics up to 8 bytes
>      // FIXME: Set MaxAtomicInlineWidth if we have the feature v6e
>      MaxAtomicPromoteWidth = 64;
> +    MaxAtomicInlineWidth = 64;
You might want to consider addressing the FIXME above, only setting this variable if we're compiling for a v6e chip.
>      // Do force alignment of members that follow zero length bitfields.  If
>      // the alignment of the zero-length bitfield is greater than the member 


More information about the cfe-commits mailing list