[all-commits] [llvm/llvm-project] f398e0: [builtins][Android] Define HAS_80_BIT_LONG_DOUBLE ...

Ryan Prichard via All-commits all-commits at lists.llvm.org
Mon Jul 13 16:54:12 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f398e0f3d1fd56e5d06e95f3522bdcde48310088
      https://github.com/llvm/llvm-project/commit/f398e0f3d1fd56e5d06e95f3522bdcde48310088
  Author: Ryan Prichard <rprichard at google.com>
  Date:   2020-07-13 (Mon, 13 Jul 2020)

  Changed paths:
    M compiler-rt/lib/builtins/int_types.h

  Log Message:
  -----------
  [builtins][Android] Define HAS_80_BIT_LONG_DOUBLE to 0

Android 32-bit x86 uses a 64-bit long double.

Android 64-bit x86 uses a 128-bit quad-precision long double.

Differential Revision: https://reviews.llvm.org/D82152


  Commit: 8cbb6ccc7fcb4184724b57ab78d7839469158c5b
      https://github.com/llvm/llvm-project/commit/8cbb6ccc7fcb4184724b57ab78d7839469158c5b
  Author: Ryan Prichard <rprichard at google.com>
  Date:   2020-07-13 (Mon, 13 Jul 2020)

  Changed paths:
    M compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
    M compiler-rt/cmake/Modules/CompilerRTUtils.cmake
    M compiler-rt/lib/builtins/CMakeLists.txt

  Log Message:
  -----------
  [builtins] Cleanup generic-file filtering

Split filter_builtin_sources into two functions:
 - filter_builtin_sources that removes generic files when an
   arch-specific file is selected.
 - darwin_filter_builtin_sources that implements the EXCLUDE/INCLUDE
   lists (using the files in lib/builtins/Darwin-excludes).

darwin_filter_builtin_sources delegates to filter_builtin_sources.

Previously, lib/builtins/CMakeLists.txt had a number of calls to
filter_builtin_sources (with a confusing/broken use of the
`excluded_list` parameter), as well as a redundant arch-vs-generic
filtering for the non-Apple code path at the end of the file. Replace
all of this with a single call to filter_builtin_sources.

Remove i686_SOURCES. Previously, this list contained only the
arch-specific files common to 32-bit and 64-bit x86, which is a strange
set. Normally the ${ARCH}_SOURCES list contains everything needed for
the arch. "i686" isn't in ALL_BUILTIN_SUPPORTED_ARCH.

NFCI, but i686_SOURCES won't be defined, and the order of files in
${arch}_SOURCES lists will change.

Differential Revision: https://reviews.llvm.org/D82151


  Commit: 9b7e24c2a5b32e25b773bc8b4ca84dbda995d959
      https://github.com/llvm/llvm-project/commit/9b7e24c2a5b32e25b773bc8b4ca84dbda995d959
  Author: Ryan Prichard <rprichard at google.com>
  Date:   2020-07-13 (Mon, 13 Jul 2020)

  Changed paths:
    M compiler-rt/cmake/Modules/CompilerRTUtils.cmake
    M compiler-rt/cmake/base-config-ix.cmake

  Log Message:
  -----------
  [compiler-rt][Android] Stop using detect_target_arch

For Android only, compiler-rt used detect_target_arch to select the
architecture to target. detect_target_arch was added in Sept 2014
(SVN r218605). At that time, compiler-rt selected the default arch
using ${LLVM_NATIVE_ARCH}, which seems to have been the host
architecture and therefore not suitable for cross-compilation.

The compiler-rt build system was refactored in Sept 2015 (SVN r247094
and SVN r247099) to use COMPILER_RT_DEFAULT_TARGET_TRIPLE to control
the target arch rather than LLVM_NATIVE_ARCH. This approach is simpler
and also works for Android cross-compilation, so remove the
detect_target_arch function.

Android targets i686, but compiler-rt seems to identify 32-bit x86 as
"i386". For Android, we were previously calling add_default_target_arch
with i386, and calling add_default_target_arch with i686 does not build
anything. i686 is not listed in builtin-config-ix.cmake,
ALL_BUILTIN_SUPPORTED_ARCH.

Differential Revision: https://reviews.llvm.org/D82148


  Commit: 36f9947aac9e09e783a5d29be31ef5b00723d747
      https://github.com/llvm/llvm-project/commit/36f9947aac9e09e783a5d29be31ef5b00723d747
  Author: Ryan Prichard <rprichard at google.com>
  Date:   2020-07-13 (Mon, 13 Jul 2020)

  Changed paths:
    M compiler-rt/test/builtins/Unit/arm/aeabi_cdcmpeq_test.c
    M compiler-rt/test/builtins/Unit/arm/aeabi_cdcmple_test.c
    M compiler-rt/test/builtins/Unit/arm/aeabi_cfcmpeq_test.c
    M compiler-rt/test/builtins/Unit/arm/aeabi_cfcmple_test.c
    R compiler-rt/test/builtins/Unit/arm/call_apsr.S
    M compiler-rt/test/builtins/Unit/arm/call_apsr.h
    M compiler-rt/test/builtins/Unit/lit.cfg.py

  Log Message:
  -----------
  [builtins][ARM] Replace call_apsr.S with inline asm

The %arm_call_apsr expansion doesn't work when config.clang is a clang
driver defaulting to a non-ARM arch. Rather than fix it, replace
call_apsr.S with inline asm in call_apsr.h, which also resolves the
FIXME added in D31259.

Maybe the `__attribute__((noinline,pcs("aapcs")))` attributes are
unnecessary on the static functions, but I was unsure what liberty the
compiler had to insert instructions that modified the condition codes,
so it seemed helpful.

Differential Revision: https://reviews.llvm.org/D82147


Compare: https://github.com/llvm/llvm-project/compare/b8460fb2cd03...36f9947aac9e


More information about the All-commits mailing list