summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/ubsan
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2018-02-17 13:35:09 +0000
committerKamil Rytarowski <n54@gmx.com>2018-02-17 13:35:09 +0000
commit7cde46764a10c389e4fbfd4be2435a061edab3c6 (patch)
tree65b32bc1a469f5e2bc79618401e2b8a2af5c1e16 /compiler-rt/lib/ubsan
parent7d4a974d8bf111542cb7c48fb3f930c3732b1b0e (diff)
downloadbcm5719-llvm-7cde46764a10c389e4fbfd4be2435a061edab3c6.tar.gz
bcm5719-llvm-7cde46764a10c389e4fbfd4be2435a061edab3c6.zip
Recognize all NetBSD architectures in UBSan
Summary: Use uniform accessors for Program Pointer, Stack Pointer and Frame Pointer. Remove CPU check in UBSan supported platforms and rely only on the OS type. This adds NetBSD support in GetPcSpBp() for: - ARM - ARM64 - HPPA - PowerPC/PowerPC64 - SPARC/SPARC64 - MIPS - DEC Alpha AXP - DEC VAX - M68K and M68010 - SH3 - IA64 - OR1K - RISCV Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, ro Reviewed By: vitalybuka Subscribers: aemerson, jyknight, sdardis, kubamracek, arichardson, llvm-commits, kristof.beyls, fedor.sergeev, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D43021 llvm-svn: 325431
Diffstat (limited to 'compiler-rt/lib/ubsan')
-rw-r--r--compiler-rt/lib/ubsan/ubsan_platform.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/compiler-rt/lib/ubsan/ubsan_platform.h b/compiler-rt/lib/ubsan/ubsan_platform.h
index 72eb4199960..d781869f98e 100644
--- a/compiler-rt/lib/ubsan/ubsan_platform.h
+++ b/compiler-rt/lib/ubsan/ubsan_platform.h
@@ -14,13 +14,9 @@
#define UBSAN_PLATFORM_H
// Other platforms should be easy to add, and probably work as-is.
-#if (defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \
- defined(__NetBSD__)) && \
- (defined(__x86_64__) || defined(__i386__) || defined(__arm__) || \
- defined(__aarch64__) || defined(__mips__) || defined(__powerpc64__) || \
- defined(__s390__)) || (defined(__sun__) && defined(__svr4__))
-# define CAN_SANITIZE_UB 1
-#elif defined(_WIN32) || defined(__Fuchsia__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) || \
+ defined(__NetBSD__) || (defined(__sun__) && defined(__svr4__)) || \
+ defined(_WIN32) || defined(__Fuchsia__)
# define CAN_SANITIZE_UB 1
#else
# define CAN_SANITIZE_UB 0
OpenPOWER on IntegriCloud