[PATCH] D12277: [X86] Add intrinsic support for clac, stac, lgdt and sgdt

PaX Team via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 25 01:18:29 PDT 2015


On 25 Aug 2015 at 6:45, Kuperstein, Michael M wrote:

> I don't think we can do better than a readwrite function call, really.
> 
> A readwrite function call ought to be a barrier to just about anything
> that reorders memory accesses, and if it's not enough - I don't think
> we have a stronger one available in the IR. A volatile asm block should
> probably be equivalent, right? 

yes, that's how linux uses clac/stac at least, with a memory clobber thrown
in as that's what makes it a real compiler barrier for gcc (and i think clang
too).



More information about the llvm-commits mailing list