[cfe-commits] [llvm-commits] [PATCH] ARM strexd and ldrexd intrinsics

Jim Grosbach grosbach at apple.com
Wed May 25 11:28:34 PDT 2011


On May 25, 2011, at 11:21 AM, Renato Golin wrote:

> On 25 May 2011 19:01, Jim Grosbach <grosbach at apple.com> wrote:
>> This gets ugly for ARM because i64 isn't a legal type, but we have these 64-bit instructions. So it's hard to match them effectively.
> 
> What about long long? I think there is support, at least at the IR
> level. Anyway, ARM does support long long, so if there isn't yet, we
> should add.
> 

Right, but 64-bit arithmetic is split up into 32-bit chunks by the type legalizer (add and add-with-carry, for example).

> 
>> For additional builtins that map directly to ldrex/strex, which I'm given to understand ARM's compiler supports, we would indeed need new intrinsics (one for each data size).
> 
> You mean ARM specific ones?
> 

Yes, beyond the __sync* style builtins from GCC.


> 
>> We also want to use these instructions for the 64-bit versions of the __sync* builtins. Those currently generate a libcall, but they don't really need to.
> 
> Yup, they can be a Custom lowering in ARMISelLowering...




More information about the cfe-commits mailing list