diff options
| author | Igor Kudrin <ikudrin@accesssoftek.com> | 2018-05-08 04:39:00 +0000 |
|---|---|---|
| committer | Igor Kudrin <ikudrin@accesssoftek.com> | 2018-05-08 04:39:00 +0000 |
| commit | 47db4e6e5b1bb3afde316466ab44e6216d843304 (patch) | |
| tree | 000b9a3a6e8ef87a32ca58aba6a5beb4bff7ec8c | |
| parent | 1739b7d076c4fc9c51158ba828d1d3eb6dfb42a8 (diff) | |
| download | bcm5719-llvm-47db4e6e5b1bb3afde316466ab44e6216d843304.tar.gz bcm5719-llvm-47db4e6e5b1bb3afde316466ab44e6216d843304.zip | |
Revert "[sanitizer] Be more accurate when calculating the previous instruction address on ARM."
This reverts commit r331626 because it causes build bot failures:
http://lab.llvm.org:8011/builders/clang-cmake-aarch64-full/builds/5069
Differential Revision: https://reviews.llvm.org/D46004
llvm-svn: 331734
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h index 826bee9e14f..14debe70a4f 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h @@ -75,11 +75,10 @@ struct StackTrace { ALWAYS_INLINE uptr StackTrace::GetPreviousInstructionPc(uptr pc) { #if defined(__arm__) - // T32 (Thumb) branch instructions can be 16 or 32 bit long, - // so we return (pc-2) in that case in order to be safe. - // For A32 mode we return (pc-4) because all instructions are 32 bit long. - return (pc - 3) & (~1); -#elif defined(__powerpc__) || defined(__powerpc64__) || defined(__aarch64__) + // Cancel Thumb bit. + pc = pc & (~1); +#endif +#if defined(__powerpc__) || defined(__powerpc64__) // PCs are always 4 byte aligned. return pc - 4; #elif defined(__sparc__) || defined(__mips__) |

