[all-commits] [llvm/llvm-project] 1fd196: [AArch64] Diagnose more functions when FP not enab...

ostannard via All-commits all-commits at lists.llvm.org
Tue May 7 01:17:27 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1fd196c8df8e9fa4e0eddddc92b012824d8d1b0b
      https://github.com/llvm/llvm-project/commit/1fd196c8df8e9fa4e0eddddc92b012824d8d1b0b
  Author: ostannard <oliver.stannard at arm.com>
  Date:   2024-05-07 (Tue, 07 May 2024)

  Changed paths:
    M clang/lib/CodeGen/CGCall.cpp
    M clang/lib/CodeGen/TargetInfo.h
    M clang/lib/CodeGen/Targets/AArch64.cpp
    M clang/lib/CodeGen/Targets/X86.cpp
    M clang/test/CodeGen/aarch64-soft-float-abi-errors.c

  Log Message:
  -----------
  [AArch64] Diagnose more functions when FP not enabled (#90832)

When using a hard-float ABI for a target without FP registers, it's not
possible to correctly generate code for functions with arguments which
must be passed in floating-point registers. This is diagnosed in CodeGen
instead of Sema, to more closely match GCC's behaviour around inline
functions, which is relied on by the Linux kernel.

Previously, this only checked function signatures as they were
code-generated, but this missed some cases:
* Calls to functions not defined in this translation unit.
* Calls through function pointers.
* Calls to variadic functions, where the variadic arguments have a
floating-point type.

This adds checks to function calls, as well as definitions, so that
these cases are correctly diagnosed.



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