Armv8.1-M: Add CFI directives for stack unwinding #1558
Merged
hanno-becker merged 3 commits intomainfrom Apr 18, 2026
Merged
Conversation
Contributor
CBMC Results (ML-KEM-512)Full Results (191 proofs)
|
Contributor
CBMC Results (ML-KEM-768)Full Results (191 proofs)
|
Contributor
CBMC Results (ML-KEM-1024)Full Results (191 proofs)
|
mkannwischer
added a commit
to pq-code-package/mldsa-native
that referenced
this pull request
Feb 11, 2026
Extend scripts/cfify with Armv8.1-M architecture support, handling push/pop, vpush/vpop, sub/add sp, and bx lr. Enable cfify for armv81m in scripts/autogen. Also removes pushing/poping r3 and r12 in keccak_f1600_x4_mve_asm - they do not have to be preserved according ot the AAPCS. - Ports pq-code-package/mlkem-native#1558 Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
d5c656e to
caa13a2
Compare
caa13a2 to
25def01
Compare
Neither r3 nor r12 is callee-saved according to AAPCS. Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
Extend scripts/cfify with Armv8.1-M architecture support, handling push/pop, vpush/vpop, sub/add sp, and bx lr. Enable cfify for armv81m in scripts/autogen. - Resolves #1517 Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
Pure cleanup of scripts/cfify, no behavior change: - Add a top-level module docstring describing what the script does. - Fix the parse_reg docstring, which previously claimed to return a (prefix, number) tuple but actually returns a canonical register name. - Hoist constants, compiled regex patterns, and helper functions out of the per-line while loop in add_cfi_directives() to module scope. The loop previously rebuilt them on every line of input. Applies to all three architectures: aarch64, x86_64, and the newly-added armv81m branch. Names are prefixed by architecture (AARCH64_*, X86_64_*, ARMV81M_*, armv81m_*) to keep the module namespace legible. Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
25def01 to
b963056
Compare
hanno-becker
approved these changes
Apr 18, 2026
mkannwischer
added a commit
to pq-code-package/mldsa-native
that referenced
this pull request
Apr 20, 2026
Ports pq-code-package/mlkem-native#1558 Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>
mkannwischer
added a commit
to pq-code-package/mldsa-native
that referenced
this pull request
Apr 20, 2026
Ports pq-code-package/mlkem-native#1558 Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>
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.
Extend scripts/cfify with Armv8.1-M architecture support, handling
push/pop, vpush/vpop, sub/add sp, and bx lr.
Enable cfify for armv81m in scripts/autogen.
cfifyfor the Armv8.1-M backend #1517