From 9e168987b9b94d15c60d39d47bc78b34f8737201 Mon Sep 17 00:00:00 2001 From: "Mohit K. Bhakkad" Date: Wed, 9 Mar 2016 07:57:20 +0000 Subject: [PATCH] [Compiler-rt][MIPS] Defining macros for MIPS archs Reviewers: samsonov Subscribers: filcab, jaydeep, sagar, llvm-commits Differential Revision: http://reviews.llvm.org/D17881 llvm-svn: 263000 --- compiler-rt/lib/sanitizer_common/sanitizer_platform.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h index c95c8f4..72240ae 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform.h @@ -93,6 +93,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. -- 2.7.4