[all-commits] [llvm/llvm-project] ef395a: [AArch64] Add soft-float ABI (#84146)

ostannard via All-commits all-commits at lists.llvm.org
Tue Mar 19 06:59:13 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ef395a492aa931f428e99e1c0a93d4ad2fb0fcfa
      https://github.com/llvm/llvm-project/commit/ef395a492aa931f428e99e1c0a93d4ad2fb0fcfa
  Author: ostannard <oliver.stannard at arm.com>
  Date:   2024-03-19 (Tue, 19 Mar 2024)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticCommonKinds.td
    M clang/include/clang/Basic/DiagnosticFrontendKinds.td
    M clang/include/clang/Basic/DiagnosticIDs.h
    M clang/lib/Basic/DiagnosticIDs.cpp
    M clang/lib/Basic/Targets/AArch64.cpp
    M clang/lib/Basic/Targets/AArch64.h
    M clang/lib/CodeGen/CodeGenFunction.cpp
    M clang/lib/CodeGen/CodeGenModule.cpp
    M clang/lib/CodeGen/ModuleBuilder.cpp
    M clang/lib/CodeGen/TargetInfo.h
    M clang/lib/CodeGen/Targets/AArch64.cpp
    A clang/test/CodeGen/aarch64-soft-float-abi-errors.c
    A clang/test/CodeGen/aarch64-soft-float-abi.c
    M clang/test/CodeGen/attr-target-clones-aarch64.c
    M clang/test/CodeGen/target-avx-abi-diag.c
    A clang/test/Driver/aarch64-soft-float-abi.c
    M clang/test/Preprocessor/aarch64-target-features.c
    M clang/test/Sema/arm-vector-types-support.c
    A llvm/test/CodeGen/AArch64/soft-float-abi.ll

  Log Message:
  -----------
  [AArch64] Add soft-float ABI (#84146)

This is re-working of #74460, which adds a soft-float ABI for AArch64.
That was reverted because it causes errors when building the linux and
fuchsia kernels.

The problem is that GCC's implementation of the ABI compatibility checks
when using the hard-float ABI on a target without FP registers does it's
checks after optimisation. The previous version of this patch reported
errors for all uses of floating-point types, which is stricter than what
GCC does in practice.

This changes two things compared to the first version:
* Only check the types of function arguments and returns, not the types
of other values. This is more relaxed than GCC, while still guaranteeing
ABI compatibility.
* Move the check from Sema to CodeGen, so that inline functions are only
checked if they are actually used. There are some cases in the linux
kernel which depend on this behaviour of GCC.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list