[all-commits] [llvm/llvm-project] d2ce3e: [builtins] Support building the 128-bit float func...

Alexander Richardson via All-commits all-commits at lists.llvm.org
Tue Oct 24 09:32:15 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d2ce3e9621411f3391def327f89e3a650918989f
      https://github.com/llvm/llvm-project/commit/d2ce3e9621411f3391def327f89e3a650918989f
  Author: Alexander Richardson <alexrichardson at google.com>
  Date:   2023-10-24 (Tue, 24 Oct 2023)

  Changed paths:
    M compiler-rt/lib/builtins/CMakeLists.txt
    M compiler-rt/lib/builtins/README.txt
    M compiler-rt/lib/builtins/divtc3.c
    M compiler-rt/lib/builtins/extenddftf2.c
    M compiler-rt/lib/builtins/extendhftf2.c
    M compiler-rt/lib/builtins/extendsftf2.c
    M compiler-rt/lib/builtins/extendxftf2.c
    M compiler-rt/lib/builtins/fp_extend.h
    M compiler-rt/lib/builtins/fp_lib.h
    M compiler-rt/lib/builtins/fp_trunc.h
    M compiler-rt/lib/builtins/int_math.h
    M compiler-rt/lib/builtins/int_to_fp.h
    M compiler-rt/lib/builtins/int_types.h
    M compiler-rt/lib/builtins/multc3.c
    M compiler-rt/lib/builtins/powitf2.c
    M compiler-rt/lib/builtins/trunctfdf2.c
    M compiler-rt/lib/builtins/trunctfhf2.c
    M compiler-rt/lib/builtins/trunctfsf2.c
    M compiler-rt/lib/builtins/trunctfxf2.c
    M compiler-rt/test/builtins/Unit/addtf3_test.c
    M compiler-rt/test/builtins/Unit/compiler_rt_fmaxl_test.c
    M compiler-rt/test/builtins/Unit/compiler_rt_logbl_test.c
    M compiler-rt/test/builtins/Unit/compiler_rt_scalbnl_test.c
    M compiler-rt/test/builtins/Unit/divtc3_test.c
    M compiler-rt/test/builtins/Unit/divtf3_test.c
    M compiler-rt/test/builtins/Unit/extendxftf2_test.c
    M compiler-rt/test/builtins/Unit/floatditf_test.c
    M compiler-rt/test/builtins/Unit/floattitf_test.c
    M compiler-rt/test/builtins/Unit/floatunditf_test.c
    M compiler-rt/test/builtins/Unit/floatunsitf_test.c
    M compiler-rt/test/builtins/Unit/floatuntitf_test.c
    M compiler-rt/test/builtins/Unit/fp_test.h
    M compiler-rt/test/builtins/Unit/trunctfxf2_test.c

  Log Message:
  -----------
  [builtins] Support building the 128-bit float functions on ld80 platforms (#68132)

GCC provides these functions (e.g. __addtf3, etc.) in libgcc on x86_64.
Since Clang supports float128, we can also enable the existing code by
using float128 for fp_t if either __FLOAT128__ or __SIZEOF_FLOAT128__ is
defined instead of only supporting these builtins for platforms with
128-bit IEEE long doubles.
This commit defines a new tf_float typedef that matches a float with
attribute((mode(TF)) on each given architecture.

There are more tests that could be enabled for x86, but to keep the diff
smaller, I restricted test changes to ones that started failing as part
of this refactoring.

This change has been tested on x86 (natively) and
aarch64,powerpc64,riscv64 and sparc64 via qemu-user.

This supersedes https://reviews.llvm.org/D98261 and should also cover
the changes from https://github.com/llvm/llvm-project/pull/68041.




More information about the All-commits mailing list