[llvm] [clang] [AArch64] Add soft-float ABI (PR #74460)

2023-12-06 Thread via cfe-commits
ostannard wrote: I originally implemented it this way to avoid making two ABIs valid for one target, but I agree that it would be confusing to have the ABI change automatically. How about we use the `-mabi=` option as you suggest, with values `aapcs` (already accepted by clang) and

[llvm] [clang] [AArch64] Add soft-float ABI (PR #74460)

2023-12-06 Thread via cfe-commits
ktkachov-arm wrote: Changing the ABI through the architecture flags i.e. +nofp has potential to greatly confuse users, who may come from other architectures that have soft-float ABIs already (including 32-bit arm) - Does this also happen when using +nosimd? - What about users like the Linux

[llvm] [clang] [AArch64] Add soft-float ABI (PR #74460)

2023-12-06 Thread via cfe-commits
ostannard wrote: > I'm a little surprised we don't need any LLVM backend changes, but I guess in > soft-float mode we basically treat floats as ints anyway, so maybe things > just work. I'd like to see appropriate regression tests, though (if they > don't already exist). Yes, the backend

[llvm] [clang] [AArch64] Add soft-float ABI (PR #74460)

2023-12-06 Thread via cfe-commits
@@ -534,7 +540,8 @@ Address AArch64ABIInfo::EmitAAPCSVAArg(Address VAListAddr, QualType Ty, BaseTy = ArrTy->getElementType(); NumRegs = ArrTy->getNumElements(); } - bool IsFPR = BaseTy->isFloatingPointTy() || BaseTy->isVectorTy(); + bool IsFPR = Kind ==

[llvm] [clang] [AArch64] Add soft-float ABI (PR #74460)

2023-12-06 Thread via cfe-commits
https://github.com/ostannard updated https://github.com/llvm/llvm-project/pull/74460 >From 316854b6558811aaa03b9f96be1849e0426f8aac Mon Sep 17 00:00:00 2001 From: Oliver Stannard Date: Fri, 1 Dec 2023 10:06:57 + Subject: [PATCH 1/6] [AArch64] Split feature tests for FP and SIMD

[clang] [AArch64] Add soft-float ABI (PR #74460)

2023-12-05 Thread David Green via cfe-commits
@@ -534,7 +540,8 @@ Address AArch64ABIInfo::EmitAAPCSVAArg(Address VAListAddr, QualType Ty, BaseTy = ArrTy->getElementType(); NumRegs = ArrTy->getNumElements(); } - bool IsFPR = BaseTy->isFloatingPointTy() || BaseTy->isVectorTy(); + bool IsFPR = Kind ==

[clang] [AArch64] Add soft-float ABI (PR #74460)

2023-12-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I'm a little surprised we don't need any LLVM backend changes, but I guess in soft-float mode we basically treat floats as ints anyway, so maybe things just work. I'd like to see appropriate regression tests, though (if they don't already exist).

[clang] [AArch64] Add soft-float ABI (PR #74460)

2023-12-05 Thread David Spickett via cfe-commits
DavidSpickett wrote: That makes sense. Didn't realise we had an `fp` flag, I don't see it in `llvm/include/llvm/TargetParser/AArch64TargetParser.h`. https://github.com/llvm/llvm-project/pull/74460 ___ cfe-commits mailing list

[clang] [AArch64] Add soft-float ABI (PR #74460)

2023-12-05 Thread via cfe-commits
ostannard wrote: This doesn't add any new options, and I'd like to avoid that if possible, instead it is turned on by `-march=...+nofp`. https://github.com/llvm/llvm-project/pull/74460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [AArch64] Add soft-float ABI (PR #74460)

2023-12-05 Thread David Spickett via cfe-commits
DavidSpickett wrote: (maybe this is for a later patch but...) Does this patch include the clang side options for the ABI or does `-march=...+no-fp-armv8` already work for that? https://github.com/llvm/llvm-project/pull/74460 ___ cfe-commits mailing

[clang] [AArch64] Add soft-float ABI (PR #74460)

2023-12-05 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff ecf881838045985f381003cc27569c73a207d0cc b68ed60a3fe78bc0e9f57b45bed9dd78ed851904 --

[clang] [AArch64] Add soft-float ABI (PR #74460)

2023-12-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: None (ostannard) Changes This adds support for the AArch64 soft-float ABI. The specification for this ABI is currently in review at https://github.com/ARM-software/abi-aa/pull/232, and I won't commit this until that PR is merged.

[clang] [AArch64] Add soft-float ABI (PR #74460)

2023-12-05 Thread via cfe-commits
https://github.com/ostannard created https://github.com/llvm/llvm-project/pull/74460 This adds support for the AArch64 soft-float ABI. The specification for this ABI is currently in review at https://github.com/ARM-software/abi-aa/pull/232, and I won't commit this until that PR is merged.