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

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 23 05:20:37 PST 2017


dberris 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);
----------------
Looking at this, why not just `sizeof(T)`?


================
Comment at: lib/sanitizer_common/sanitizer_atomic_clang.h:69
+  typedef typename T::Type Type;
+  if (sizeof(*a) == 8) {
+    Type volatile *val_ptr = const_cast<Type volatile *>(&a->val_dont_use);
----------------
Same here.


Repository:
  rL LLVM

https://reviews.llvm.org/D40385





More information about the llvm-commits mailing list