Repository navigation
PPC64: Guard ABI checks with POWER8 vector support - #1943
Merged
Merged
Conversation
Contributor
CBMC Results (ML-KEM-1024)
Full Results (195 configurations)
|
Contributor
CBMC Results (ML-KEM-768)
Full Results (195 configurations)
|
Contributor
CBMC Results (ML-KEM-512)
Full Results (195 configurations)
|
hanno-becker
force-pushed
the
power8-fixes
branch
from
October 19, 2026 19:22
145057f to
53ab491
Compare
hanno-becker
marked this pull request as ready for review
October 19, 2026 19:25
The PPC64 ABI checker registered kernels whenever the target was PPC64LE, while the kernels require POWER8 vector support. Removing the checker's forced assembly flags would leave checks referring to kernels omitted by the build's CPU flags. Add `MLK_SYS_PPC64LE_POWER8_VECTOR`, requiring `__ALTIVEC__`, `__VSX__`, and `__POWER8_VECTOR__` on PPC64LE. Use it to select the default PPC64 backend in `native/meta.h`, as for the NEON and AVX2 backends. Unsupported targets then use portable C without selecting the native wrappers. Remove the per-kernel and constant-table `__POWER8_VECTOR__` guards and the wrappers' compile-time fallback branches. Explicitly selecting the PPC64 backend now requires a target with its documented features, matching the other backends. The PPC64 wrappers previously checked only `__POWER8_VECTOR__` at compile time, so a custom capability function could not disable them at runtime. Append `MLK_SYS_CAP_PPC64LE_POWER8_VECTOR` and have all four wrappers consult the capability hook before calling assembly. Return `MLK_NATIVE_FUNC_FALLBACK` without modifying the input if it rejects POWER8 vector support. Use the same feature macro for the generated ABI checks, registry, call stub and self-test. Name the ABI feature `POWER8_VECTOR` and consult the capability hook before calling assembly from ABI checks or the self-test. Correct the backend READMEs from POWER9 to POWER8 and state the AltiVec and VSX requirement. The default capability hook assumes compile-time features are supported; runtime detection requires a custom function. Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
hanno-becker
force-pushed
the
power8-fixes
branch
from
October 20, 2026 05:23
53ab491 to
b26e10d
Compare
mkannwischer
approved these changes
Oct 20, 2026
mkannwischer
left a comment
Contributor
There was a problem hiding this comment.
Thanks @hanno-becker. This LGTM - just one nit.
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.