[PATCH] D40385: [mips][compiler-rt] Provide 64bit atomic add and sub

Simon Dardis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 23 05:27:50 PST 2017


sdardis added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_atomic_clang.h:53
+  typedef typename T::Type Type;
+  if (sizeof(*a) == 8) {
+    Type volatile *val_ptr = const_cast<Type volatile *>(&a->val_dont_use);
----------------
dberris wrote:
> Looking at this, why not just `sizeof(T)`?
When I saw the linking error, I was reminded of D31803, so I cribbed the implementation of this change from atomic_compare_exchange_strong below. I adjust shortly.


Repository:
  rL LLVM

https://reviews.llvm.org/D40385





More information about the llvm-commits mailing list