[cfe-dev] Intrinsics without builtin

Eric Christopher echristo at apple.com
Fri Apr 1 15:00:01 PDT 2011


On Apr 1, 2011, at 2:56 PM, Damien Vincent wrote:

> Thank you for the patch. Though I finally decided to go for builtins (this seems to be a cleaner solution).
> My worry is that I don't know how standard, compiler dependant is the following declaration:
> extern int llvm_cas(volatile int*, int, int) asm("llvm.atomic.cmp.swap.i32");
> 

That's about as compiler dependent as you can get.

> Do you have any idea of the pros/cons of using either builtins or the previous declaration ?
> 

Use documented APIs if at all possible.

-eric



More information about the cfe-dev mailing list