hanchenye-llvm-project/compiler-rt/lib
Saleem Abdulrasool 8817bfe7e2 ARM: fix division in some cases
For ARM cores that are ARMv6T2+ but not ARMv7ve or ARMv7-r and not an updated
ARMv7-a that has the idiv extension (chips with clz but not idiv), an incorrect
jump would be calculated due to the preference to thumb instructions over ARM.

Rather than computing the target at runtime, use a jumptable instead.  This
trades a bit of storage for performance.  The overhead is 32-bytes for each of
the three routines, but avoid the calculation of the offset.

Because clz was introduced in ARMv6T2 and idiv in certain versions of ARMv7,
the non-clz, non-idiv case implies a target which does not support Thumb-2, and
thus we cannot use Thumb on those targets (as it is unlikely that the assembly
will assemble).

Take the opportunity to refactor the IT block macros into assembly.h rather than
redefining them in the TUs where they are used.

Existing tests cover the full change already, so no new tests are added.

This effectively reverts SVN r213309.

llvm-svn: 213467
2014-07-20 04:44:21 +00:00
..
BlocksRuntime Move tests for BlocksRuntime and builtins to corresponding directories under test/ 2014-02-14 09:47:31 +00:00
asan Add FreeBSD support to the Asan symbolization script 2014-07-18 12:07:00 +00:00
builtins ARM: fix division in some cases 2014-07-20 04:44:21 +00:00
dfsan [dfsan] Fix the declaration of dfsan_add_label. 2014-06-04 17:54:51 +00:00
interception Add support for intercepting thunks of the form 2014-07-14 20:28:21 +00:00
lsan [sanitizer] support c11 aligned_alloc, Linux only for now 2014-07-04 07:30:34 +00:00
msan [msan] Stop demangling function name in the stack origin report. 2014-07-14 09:35:27 +00:00
msandr [msandr] Access app TLS directly in native exec mode. 2014-01-20 13:09:29 +00:00
profile Fix building InstrProfilingFile.c on FreeBSD 2014-06-15 14:01:18 +00:00
sanitizer_common [ASan/Win] Handle situations when the client app has used DbgHelp before 2014-07-16 14:11:02 +00:00
tsan tsan: fix Go runtime build with clang 2014-07-18 15:32:22 +00:00
ubsan [Sanitizer] Merge AnsiColorDecorator and SanitizerCommonDecorator, use the latter in UBSan 2014-06-13 23:46:37 +00:00
CMakeLists.txt Enable building of sanitizers on FreeBSD 2014-04-09 18:45:12 +00:00
Makefile.mk Move original compiler-rt functions (libgcc replacement) to lib/builtins directory 2014-02-14 09:20:33 +00:00