[compiler-rt] r331646 - [sanitizer] Add definitions for Myriad RTEMS platform

Walter Lee via llvm-commits llvm-commits at lists.llvm.org
Mon May 7 09:37:56 PDT 2018


Author: waltl
Date: Mon May  7 09:37:55 2018
New Revision: 331646

URL: http://llvm.org/viewvc/llvm-project?rev=331646&view=rev
Log:
[sanitizer] Add definitions for Myriad RTEMS platform

Introduce two definitions to be used by the Myriad RTEMS port of the
ASan run-time: SANITIZER_MYRIAD2 for the platform and SANITIZER_RTEMS
for the OS.  We expect to use SANITIZER_MYRIAD2 to guard the portion
of the port corresponding to Myriad's unique memory map, and
SANITIZER_RTEMS for most of the rest.

Differential Revision: https://reviews.llvm.org/D46453

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform.h

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform.h?rev=331646&r1=331645&r2=331646&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform.h Mon May  7 09:37:55 2018
@@ -104,6 +104,12 @@
 # define SANITIZER_FUCHSIA 0
 #endif
 
+#if defined(__rtems__)
+# define SANITIZER_RTEMS 1
+#else
+# define SANITIZER_RTEMS 0
+#endif
+
 #define SANITIZER_POSIX \
   (SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_MAC || \
     SANITIZER_NETBSD || SANITIZER_OPENBSD || SANITIZER_SOLARIS)
@@ -201,6 +207,12 @@
 # define SANITIZER_SOLARIS32 0
 #endif
 
+#if defined(__myriad2__)
+# define SANITIZER_MYRIAD2 1
+#else
+# define SANITIZER_MYRIAD2 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.




More information about the llvm-commits mailing list