summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_platform_limits_posix.h
diff options
context:
space:
mode:
authorMarcin Koscielnicki <koriakin@0x04.net>2016-04-14 21:17:19 +0000
committerMarcin Koscielnicki <koriakin@0x04.net>2016-04-14 21:17:19 +0000
commit89f0b9e6c5b460e0a73cddc3331ae728b06952c1 (patch)
treec49e0177e55bc7d2025c305528675a8039be5f0f /lib/sanitizer_common/sanitizer_platform_limits_posix.h
parent339c6e51d48be82b99a0d0f194a0ba215f19c203 (diff)
[sanitizer] [SystemZ] Add/fix kernel and libc type definitions.
This is the first part of upcoming asan support for s390 and s390x. Note that there are bits for 31-bit support in this and subsequent patches - while LLVM itself doesn't support it, gcc should be able to make use of it just fine. Differential Revision: http://reviews.llvm.org/D18888 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266370 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_platform_limits_posix.h')
-rw-r--r--lib/sanitizer_common/sanitizer_platform_limits_posix.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/lib/sanitizer_common/sanitizer_platform_limits_posix.h
index af33a45dc..0afc40ed9 100644
--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.h
+++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -81,6 +81,12 @@ namespace __sanitizer {
SANITIZER_ANDROID ? FIRST_32_SECOND_64(104, 128) :
FIRST_32_SECOND_64(144, 216);
const unsigned struct_kernel_stat64_sz = 104;
+#elif defined(__s390__) && !defined(__s390x__)
+ const unsigned struct_kernel_stat_sz = 64;
+ const unsigned struct_kernel_stat64_sz = 104;
+#elif defined(__s390x__)
+ const unsigned struct_kernel_stat_sz = 144;
+ const unsigned struct_kernel_stat64_sz = 0;
#endif
struct __sanitizer_perf_event_attr {
unsigned type;
@@ -101,7 +107,7 @@ namespace __sanitizer {
#if SANITIZER_LINUX || SANITIZER_FREEBSD
-#if defined(__powerpc64__)
+#if defined(__powerpc64__) || defined(__s390__)
const unsigned struct___old_kernel_stat_sz = 0;
#else
const unsigned struct___old_kernel_stat_sz = 32;
@@ -188,7 +194,7 @@ namespace __sanitizer {
unsigned __seq;
u64 __unused1;
u64 __unused2;
-#elif defined(__mips__) || defined(__aarch64__)
+#elif defined(__mips__) || defined(__aarch64__) || defined(__s390x__)
unsigned int mode;
unsigned short __seq;
unsigned short __pad1;
@@ -576,7 +582,11 @@ namespace __sanitizer {
int sa_flags;
__sanitizer_sigset_t sa_mask;
#else
+#if defined(__s390x__)
+ int sa_resv;
+#else
__sanitizer_sigset_t sa_mask;
+#endif
#ifndef __mips__
int sa_flags;
#endif
@@ -587,6 +597,9 @@ namespace __sanitizer {
#if defined(__mips__) && (SANITIZER_WORDSIZE == 32)
int sa_resv[1];
#endif
+#if defined(__s390x__)
+ __sanitizer_sigset_t sa_mask;
+#endif
};
#endif // !SANITIZER_ANDROID