Commit 25def01
committed
scripts/cfify: refactor — hoist per-arch constants and helpers
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>1 parent 0ddc125 commit 25def01
1 file changed
Lines changed: 189 additions & 145 deletions
0 commit comments