Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sysvabi] Make hard-float a requirement for sysvabi #233

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

smithp35
Copy link
Contributor

@smithp35 smithp35 commented Dec 5, 2023

The aapcs64 base procedure call standard requires floating point and simd registers. With the advent of a soft-float ABI for R-profile CPUs without floating point, we are making it explicit that platforms based on the System V ABI are required to use the base procedure call standard.

Soft-float pull request in #232

The aapcs64 base procedure call standard requires floating point and
simd registers. With the advent of a soft-float ABI for R-profile
CPUs without floating point, we are making it explicit that platforms
based on the System V ABI are required to use the base procedure call
standard.
Procedure call standard requirements
------------------------------------

The AArch64 System V ABI uses The Base Procedure Call Standard from (AAPCS64_).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some other ABI variations mentioned in the The standard variants section of AAPCS64 (fp16 format, sizes of some types), should we mention any of them here too? I think it would be enough to say that the LP64 data model must be used, maybe with an option to use ILP32.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have a think. I am a little worried that the statement is a bit too strong, and could rule out things like the vector PCS.

The opening paragraph of https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#6the-base-procedure-call-standard has:

Application code is expected to conform to one of three data models defined in this standard; ILP32, LP64 or LLP64.

I think that is something close to what I want to say, without duplicating the text exactly. Perhaps I can find a way of referencing it more directly.

ostannard added a commit to llvm/llvm-project that referenced this pull request Feb 15, 2024
This adds support for the AArch64 soft-float ABI. The specification for
this ABI was added by ARM-software/abi-aa#232.

Because all existing AArch64 hardware has floating-point hardware, we
expect this to be a niche option, only used for embedded systems on
R-profile systems. We are going to document that SysV-like systems
should only ever use the base (hard-float) PCS variant:
ARM-software/abi-aa#233. For that reason, I've
not added an option to select the ABI independently of the FPU hardware,
instead the new ABI is enabled iff the target architecture does not have
an FPU.

For testing, I have run this through an ABI fuzzer, but since this is
the first implementation it can only test for internal consistency
(callers and callees agree on the PCS), not for conformance to the ABI
spec.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants