summaryrefslogtreecommitdiff
path: root/libsanitizer/tsan/tsan_platform.h
diff options
context:
space:
mode:
authorkcc <kcc@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-23 14:46:25 +0000
committerkcc <kcc@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-23 14:46:25 +0000
commit0d996a11d9b5be7a52d77016de51910146ceaa90 (patch)
treea354102cd1c27b09eefe0b04f517d4ecac5bc566 /libsanitizer/tsan/tsan_platform.h
parenta46419387192ae39f45cfeca2ec0afe6f872956e (diff)
downloadgcc-0d996a11d9b5be7a52d77016de51910146ceaa90.tar.gz
[libsanitizer] merge from upstream r168514
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193756 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libsanitizer/tsan/tsan_platform.h')
-rw-r--r--libsanitizer/tsan/tsan_platform.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/libsanitizer/tsan/tsan_platform.h b/libsanitizer/tsan/tsan_platform.h
index d7a4cf7b0e9..f849182503c 100644
--- a/libsanitizer/tsan/tsan_platform.h
+++ b/libsanitizer/tsan/tsan_platform.h
@@ -15,13 +15,17 @@
#include "tsan_rtl.h"
-#if __LP64__
+#if defined(__LP64__) || defined(_WIN64)
namespace __tsan {
#if defined(TSAN_GO)
static const uptr kLinuxAppMemBeg = 0x000000000000ULL;
static const uptr kLinuxAppMemEnd = 0x00fcffffffffULL;
+# if defined(_WIN32)
+static const uptr kLinuxShadowMsk = 0x010000000000ULL;
+# else
static const uptr kLinuxShadowMsk = 0x100000000000ULL;
+# endif
// TSAN_COMPAT_SHADOW is intended for COMPAT virtual memory layout,
// when memory addresses are of the 0x2axxxxxxxxxx form.
// The option is enabled with 'setarch x86_64 -L'.
@@ -93,7 +97,7 @@ void GetThreadStackAndTls(bool main, uptr *stk_addr, uptr *stk_size,
} // namespace __tsan
-#else // __LP64__
+#else // defined(__LP64__) || defined(_WIN64)
# error "Only 64-bit is supported"
#endif