[llvm] ARM: Remove check for isAAPCS_ABI when enabling various aeabi calls (PR #152108)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 7 07:26:02 PDT 2025


smithp35 wrote:

I've only seen the `-meabi=` https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-meabi used in practice. That controls whether some of the runtime calls that mirror the string.h functions are used {{__aeabi_memcpy}} or not.

The -mabi option looks to mirror a GCC option https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html#index-mabi-1 which I believe was used during the transition from the pre-ABI to post ABI (2004).

Assuming that that ATPCS, APCS and AAPCS are referring to the ABI names [1]. The APCS and ATPCS are pre ABI (2004 ish). I think ARM Linux stayed on the pre-ABI PCS for some time after that, but I don't think that would be supported anymore in GCC.

As to what these options do in clang/LLVM we'd need to reverse engineer them. I expect that keeping -mabi might aid in command-line compatibility with GCC but I wouldn't expect it to be used in embedded systems.

>From the ABI https://github.com/ARM-software/abi-aa/blob/main/aapcs32/aapcs32.rst#23terms-and-abbreviations 
```
PCS
Procedure Call Standard.
AAPCS
Procedure Call Standard for the Arm Architecture (this standard).
APCS
Arm Procedure Call Standard (obsolete).
TPCS
Thumb Procedure Call Standard (obsolete).
ATPCS
Arm-Thumb Procedure Call Standard (precursor to this standard).
```



https://github.com/llvm/llvm-project/pull/152108


More information about the llvm-commits mailing list