[cfe-dev] FYI, Intel folks might be looking to add the __iso_volatile_Xxx family for MSVC STL <atomic> soon
Reid Kleckner via cfe-dev
cfe-dev at lists.llvm.org
Thu Mar 28 14:27:04 PDT 2019
On Thu, Mar 28, 2019 at 2:20 PM Billy O'Neal (VC LIBS) <bion at microsoft.com>
wrote:
> > all they do is emit a volatile load
>
> If I understand correctly the point of these is to make an ordinary
> volatile load/store happen on ARM under /volatile:ms
> <https://docs.microsoft.com/en-us/cpp/build/reference/volatile-volatile-keyword-interpretation?view=vs-2017>.
> We asked for the intrinsic to also be provided on Intel because it reduces
> the amount of macro-tastic-ness we need in <atomic>.
>
That makes sense, but I'm left wondering in what context a plain volatile
load is useful for implementing <atomic>. I went in assuming that, to
implement atomic, you need to use intrinsics to emit atomic memory
operations.
Are you sure we shouldn't be marking these as atomic instead of volatile?
Volatile is usually not suitable for anything except
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190328/9bb496c0/attachment.html>
More information about the cfe-dev
mailing list