[PATCH] D13729: [TSAN, PowerPC] Setjmp/longjmp handling for PowerPC

Bill Schmidt via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 2 12:45:24 PST 2015


wschmidt added inline comments.

================
Comment at: lib/tsan/rtl/ppc-regs.h:1
@@ +1,2 @@
+#define r0 0
+#define r1 1
----------------
dvyukov wrote:
> all tsan source file names currently start with tsan_, please keep this convention
OK, will do.

================
Comment at: test/tsan/race_on_mutex.c:36
@@ -35,3 +35,3 @@
 // CHECK:      WARNING: ThreadSanitizer: data race
-// CHECK-NEXT:   Atomic read of size 1 at {{.*}} by thread T2:
+// CHECK-NEXT:   Atomic read of size {{.*}} at {{.*}} by thread T2:
 // CHECK-NEXT:     #0 pthread_mutex_lock
----------------
dvyukov wrote:
> How does it happen that the access is not 1 byte?
> This memory access is emulated in __tsan::MutexLock, and it explicitly coded as 1-byte.
> 
> This test change is unrelated to setjmp/longjmp and should go into a separate patch.
Hm, I need to look into this again.  We are seeing an 8-byte access, which I thought was due to not having a single-byte lock instruction implemented.  But now that I look at it, the lbarx instruction is in our machine description now.  So it's a good question why we're getting a different size.  I'll drop this from this patch for now, and at some point we'll have to sort this out.


Repository:
  rL LLVM

http://reviews.llvm.org/D13729





More information about the llvm-commits mailing list