__ARM_PCS_AAPCS64 is incorrectly defined for aarch64-macos, aarch64-windows/aarch64-mingw and a few other aarch64 targets
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
According to the ACLE __ARM_PCS_AAPCS64 should only be defined:
```
__ARM_PCS_AAPCS64 is defined to 1 if the default procedure calling standard for the translation unit conforms to the [[AAPCS64]](https://arm-software.github.io/acle/main/acle.html#AAPCS64).
```
But windows/mingw procedure call standard is different from AAPCS64 (e.g. var_args is different).
Mac OS's precedure calling standard is also different (e.g. arguments are zero/sign extended).
I should note I found this while auditing GCC's macros definitions too (and yes GCC incorrectly defines it).
Contributor guide
Research direction
The issue names no files or tests. Start by locating the target-specific definitions of __ARM_PCS_AAPCS64 for aarch64-macos, aarch64-windows, and aarch64-mingw, then compare them with the ACLE AAPCS64 requirement and the calling conventions described in the report. Done means the macro is defined only where the default procedure calling standard conforms to AAPCS64.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100