[sanitizer] Support PTRACE_GETEVENTMSG in the ptrace() interceptor.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@211022 91177308-0d34-0410-b5e6-96231b3b80d8
Swap getdtablesize() for sysconf(_SC_OPEN_MAX).

Bionic is no removing this as it was removed from POSIX 2004.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@211027 91177308-0d34-0410-b5e6-96231b3b80d8
compiler-rt: prefer thumb over ARM

When possible, use Thumb or Thumb-2 over ARM instructions.  This is particularly
important for pure-Thumb environments (e.g. Windows on ARM).  Although, it is
possible to conditionalise this for that target specifically, this is available
on most newer ARM CPUs, and the code remains compatible with older CPUs with no
adverse effects.  It therefore feels better to always prefer Thumb when
possible.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@211032 91177308-0d34-0410-b5e6-96231b3b80d8
builtins: add it blocks for Thumb-2

Add the missing IT-blocks for Thumb-2 compilation for code paths exercised by
older ARM CPUs.  This should fix the buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@211035 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Fix handling of multiplication by a constant with a number of trailing zeroes.

Multiplication by an integer with a number of trailing zero bits leaves
the same number of lower bits of the result initialized to zero.
This change makes MSan take this into account in the case of multiplication by
a compile-time constant.

We don't handle the general, non-constant, case because
(a) it's not going to be cheap (computation-wise);
(b) multiplication by a partially uninitialized value in user code is
    a bad idea anyway.

Constant case must be handled because it appears from LLVM optimization of a
completely valid user code, as the test case in compiler-rt demonstrates.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@211092 91177308-0d34-0410-b5e6-96231b3b80d8