Repository navigation
Port abicheck: Use the native build's CPU feature flags - #1532
Open
mkannwischer wants to merge 3 commits into
Open
mkannwischer wants to merge 3 commits into
mkannwischer wants to merge 3 commits into
Conversation
mkannwischer
commented
Nov 5, 2026
Contributor
- Ports abicheck: Use the native build's CPU feature flags mlkem-native#1945
- Resolves Port: abicheck: Use the native build's CPU feature flags #1488
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 `MLD_SYS_AARCH64_NEON`, and `MLD_SYS_RISCV32_M` for the RV32IM kernels. Apply matching guards to the ABI stubs and generated checks. Define `MLD_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 mldsa-native's system macros. Ports pq-code-package/mlkem-native#1945. Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>
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, the separate SHA3 source filter and the RV32 `-march` selection. Ports pq-code-package/mlkem-native#1945. Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>
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. Ports pq-code-package/mlkem-native#1945. Resolves #1488. Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>
Contributor
CBMC Results (ML-DSA-44, REDUCE-RAM)
Full Results (433 configurations)
|
Contributor
CBMC Results (ML-DSA-44)
Full Results (433 configurations)
|
Contributor
CBMC Results (ML-DSA-65, REDUCE-RAM)
Full Results (433 configurations)
|
Contributor
CBMC Results (ML-DSA-65)
Full Results (433 configurations)
|
Contributor
CBMC Results (ML-DSA-87, REDUCE-RAM)
Full Results (433 configurations)
|
Contributor
CBMC Results (ML-DSA-87)
Full Results (433 configurations)
|
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.