]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commit
atomic asm snippets: Replace "memory" clobber with "Q" constraint
authorOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:31 +0000 (11:23 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:31 +0000 (11:23 -0700)
commit81fec44ea5303efa27fb0f04ba06f162ffdfb2df
tree8154b03ef197acf7e3f62b25aceff1a593cdd9f1
parent24bb7361bb1ed63201030841282369e571490f8b
atomic asm snippets: Replace "memory" clobber with "Q" constraint

In our atomic asm snippets, using the "Q" constraint,
(https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html tells gcc
which exact memory is modified i.e. the bytes covered by the atomic variable),
is better than using the "memory" clobber (tells gcc that all memory is
modified, effectively a compiler memory barrier which prevents compiler
optimizations).
open-vm-tools/lib/include/vm_atomic.h