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

mats petersson via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 09:37:16 PDT 2015


On 24 August 2015 at 17:30, Reid Kleckner via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> rnk added a comment.
>
> In http://reviews.llvm.org/D12277#231179, @majnemer wrote:
>
> > Are these intrinsics supposed to be compiler barriers? Seems like bad
> stuff could happen if we speculated or sunk around them.
>
>
> They have no constraints, which means they are equivalent to a normal
> external function call. Isn't that enough of a barrier? I think most users
> (kernels, hypervisors) are fine with LLVM reordering identified object
> memory accesses across such a barrier.
>

Surely at least LGDT would be sensitive to reordering of both execution and
data accesses, given that you MAY have changed the meaning of code and data
segments (although not until they are re-loaded, so that's probably
separate intrinsic call, so maybe that's fine?) SGDT is obviously
reasonably benign.

--
Mats

>
>
> http://reviews.llvm.org/D12277
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150824/364a122a/attachment.html>


More information about the llvm-commits mailing list