-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Figure out which target features are required/incompatible for which ABI #131799
Copy link
Copy link
Open
Labels
A-ABIArea: Concerning the application binary interface (ABI)Area: Concerning the application binary interface (ABI)A-floating-pointArea: Floating point numbers and arithmeticArea: Floating point numbers and arithmeticA-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.Area: Enabling/disabling target features like AVX, Neon, etc.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-ABIArea: Concerning the application binary interface (ABI)Area: Concerning the application binary interface (ABI)A-floating-pointArea: Floating point numbers and arithmeticArea: Floating point numbers and arithmeticA-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.Area: Enabling/disabling target features like AVX, Neon, etc.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
The context for this is #116344: some target features change the way floats are passed between functions. Changing those target features is unsound as code compiled for the same target may now use different ABIs.
In #134794, I am adding the infrastructure to have the compiler recognize this. But this infrastructure needs to be fed with information about which ABIs exist (e.g. softfloat/hardfloat), and which target features they require or are incompatible with. This will have to be done for each architecture we support.
soft-floatcan be set to swap the ABI; if unset, a hardfloat ABI is used!soft-float && x87(see here). IOW, hardfloat ABI requiresx87.f16uses SSE registers so that's extra fun, see x86-32 "f16" ABI needs SSE, incompatible with i586 targets #131819!soft-float && sseis the relevant check -- IOW, hardfloat ABI requiressse/sse2.soft-floatcan be set to swap the ABI; if unset, a hardfloat ABI is used!soft-float && fpregs(see here), so hardfloat ABI requiresfpregsfp-armv8; Rust makes-neonimply-fp-armv8so we have to forbid both -- butneonis stable! See The (stable)neonaarch64 target feature is unsound: it changes the float ABI #131058-Ctarget-features must be restrained on RISCV #132618Tier 3 only: