[PATCH] [TSan][MIPS] Adding support for MIPS64
Dmitry Vyukov
dvyukov at google.com
Wed Jan 14 05:31:33 PST 2015
LGTM with nits
REPOSITORY
rL LLVM
================
Comment at: lib/tsan/rtl/tsan_interceptors.cc:43
@@ +42,3 @@
+#ifdef __mips__
+const int kSigCount = 128;
+#else
----------------
In mips linux kernel:
#define SIGRTMAX _NSIG
#define _NSIG 128
So signal 128 is a valid signal. kSigCount is size of an array indexed with signo. So this constant must be 129.
================
Comment at: lib/tsan/rtl/tsan_platform.h:57
@@ -43,1 +56,3 @@
+#if defined(__mips64)
+const uptr kMetaShadowBeg = 0x3000000000ull;
----------------
Please move the __x86_64__ constants on top of __mips64 constants to be consistent with order of archs in the comment above.
Or even better group comment with constants for a single arch:
#if defined(__x86_64__)
/*
C/C++ on linux/x86_64 and freebsd/x86_64
0000 0000 1000 - 0100 0000 0000: main binary and/or MAP_32BIT mappings
...
*/
const uptr kMetaShadowBeg = 0x300000000000ull;
...
#elif defined(__mips64)
/*
C/C++ on linux/mips64
0100 0000 00 - 0200 0000 00: main binary
...
*/
const uptr kMetaShadowBeg = 0x3000000000ull;
...
#endif
http://reviews.llvm.org/D6291
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list