Repository navigation
abicheck: Use the native build's CPU feature flags - #1945
Open
hanno-becker wants to merge 3 commits into
Open
hanno-becker wants to merge 3 commits into
hanno-becker wants to merge 3 commits into
Conversation
Contributor
CBMC Results (ML-KEM-512)
Full Results (195 configurations)
|
Contributor
CBMC Results (ML-KEM-1024)
Full Results (195 configurations)
|
Contributor
CBMC Results (ML-KEM-768)
Full Results (195 configurations)
|
hanno-becker
force-pushed
the
abicheck-cflags
branch
from
October 20, 2026 05:14
3e4bfb0 to
d8ecbf4
Compare
hanno-becker
marked this pull request as ready for review
October 20, 2026 05:15
Contributor
Author
|
@mkannwischer Note the slight complication in making sure we only build the backend .S files which the compiler can handle; the commit message also describes an alternative. |
hanno-becker
force-pushed
the
abicheck-cflags
branch
from
October 20, 2026 05:23
d8ecbf4 to
5af086b
Compare
hanno-becker
marked this pull request as draft
October 20, 2026 08:03
Contributor
Author
Turns out that there's another issue which basically forces the alternative of additional guards in the backend files. I'll pursue that. No need to review for now @mkannwischer |
hanno-becker
force-pushed
the
abicheck-cflags
branch
from
October 20, 2026 09:28
5af086b to
e269a95
Compare
hanno-becker
marked this pull request as ready for review
October 20, 2026 09:43
Backend assembly is gated by backend and parameter-set macros. The ABI checker enables those macros for every kernel and adds CPU feature flags so the files assemble. It cannot simply use the platform's flags while unsupported files still contain instructions. Guard backend assembly with the architecture and feature macros for its instructions. Use `__ARM_FEATURE_SHA3` for the SHA3 kernels alongside `MLK_SYS_AARCH64_NEON`. Apply matching guards to the ABI stubs and generated checks. Define `MLK_SYS_ARMV81M_MVE` only when `__ARM_FEATURE_MVE` is present: Armv8.1-M architecture support alone does not enable MVE. GCC exposes the feature macro only with a softfp or hard float ABI, so use `-mfloat-abi=hard` when autogen regenerates MVE assembly. The AWS-LC importer replaces `common.h` with s2n-bignum headers after running `unifdef`. Add a pre-import patch that resolves the NEON and AVX2 guards for the selected assembly, so imported files do not depend on mlkem-native's system macros. Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
The ABI checker adds CPU feature flags to individual assembly objects. This can enable kernels which the platform disabled and leaves Make responsible for compiler capabilities that a custom build, such as Zephyr, determines itself. The preceding commit guards assembly with the same architecture and feature checks as the generated C tests. Compile the fixed source list with the platform's flags and let those guards omit unsupported kernels. Remove the generated feature makefiles and the separate SHA3 source filter. Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
The Zig 0.17 jobs skip ABI checks because the checker previously added AArch64 `-march` flags which Zig parses as CPU names. The checker now uses the platform's CPU flags, so that restriction no longer applies. Remove `--no-abicheck` from the Extended compiler matrix and the Linux and macOS legacy matrices. Drop the comments about the old `-march` flags. Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
hanno-becker
force-pushed
the
abicheck-cflags
branch
from
October 21, 2026 08:27
e269a95 to
9ff7f2e
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.