summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2016-05-22 14:17:10 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2016-05-22 14:17:10 +0000
commitbf1e4faaa6e4b82b4beb63ebe67e064364cc9af8 (patch)
tree56e7ad95e941162f5416db2774fc0ea8bdb4551c
parent39fb8112a098bcb13c83ed2b127e54caa5384e50 (diff)
downloadcompiler-rt-bf1e4faaa6e4b82b4beb63ebe67e064364cc9af8.tar.gz
Merging r263000:
------------------------------------------------------------------------ r263000 | mohit.bhakkad | 2016-03-09 07:57:20 +0000 (Wed, 09 Mar 2016) | 7 lines [Compiler-rt][MIPS] Defining macros for MIPS archs Reviewers: samsonov Subscribers: filcab, jaydeep, sagar, llvm-commits Differential Revision: http://reviews.llvm.org/D17881 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_38@270361 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/sanitizer_common/sanitizer_platform.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_platform.h b/lib/sanitizer_common/sanitizer_platform.h
index 841cceb51..c31e63110 100644
--- a/lib/sanitizer_common/sanitizer_platform.h
+++ b/lib/sanitizer_common/sanitizer_platform.h
@@ -81,6 +81,21 @@
# define SANITIZER_X32 0
#endif
+#if defined(__mips__)
+# define SANITIZER_MIPS 1
+# if defined(__mips64)
+# define SANITIZER_MIPS32 0
+# define SANITIZER_MIPS64 1
+# else
+# define SANITIZER_MIPS32 1
+# define SANITIZER_MIPS64 0
+# endif
+#else
+# define SANITIZER_MIPS 0
+# define SANITIZER_MIPS32 0
+# define SANITIZER_MIPS64 0
+#endif
+
// By default we allow to use SizeClassAllocator64 on 64-bit platform.
// But in some cases (e.g. AArch64's 39-bit address space) SizeClassAllocator64
// does not work well and we need to fallback to SizeClassAllocator32.