Skip to content

Enforce file format checks and normalize SIMD kernel headers#99

Merged
Xor-el merged 3 commits into
refactor/simd-facade-backendfrom
refactor/normalization
Jul 13, 2026
Merged

Enforce file format checks and normalize SIMD kernel headers#99
Xor-el merged 3 commits into
refactor/simd-facade-backendfrom
refactor/normalization

Conversation

@Xor-el

@Xor-el Xor-el commented Jul 13, 2026

Copy link
Copy Markdown
Owner

No description provided.

Xor-el added 3 commits July 13, 2026 06:07
A new scripts/maintenance/check-file-format.ps1 verifies CRLF, strict
UTF-8 and no BOM across the source/text tree.
Phase A - format: 74 files converted to CRLF (10 x86_64 kernel
includes, 29 library units, one test unit, the scripts tree). The repo
encoding rule is valid UTF-8 without BOM; a new
scripts/maintenance/check-file-format.ps1 enforces CRLF + strict UTF-8
+ no BOM and the pre-commit hook chains it after the duplicate-GUID
check.

Phase B - headers: all 107 kernel .inc headers now follow one
canonical shape: title, strategy notes, "ABI (after
HlpSimdProcNBegin_<arch>.inc): ..." with layout sub-lines, register
map, frame/saves, the encoding one-liner, and "Reference:" always
last. Typographic punctuation in the Simd tree normalized to ASCII
(BOM-less sources render non-ASCII as mojibake in the IDEs). The
Common/CpuFeatures prologue includes keep their structure - per-
compiler adaptation is their purpose - with punctuation normalized.

Every aarch64 header was changed through its generator constant, so
regeneration stays byte-idempotent (asm-check passes for all 15
generated kernels). Two stale headers were corrected: Blake2B NEON now
documents its d8-d15 save/restore via the shared include, and Blake3
hash4 NEON's duplicated G-temps map lines are merged.
FPC flags "lea esp, [esp - $60]" with "Use of -offset(%esp), access
may cause a crash or value may be lost" in the SSE2/SSSE3/AVX SHA-256
i386 kernels. The warning is a false positive - lea is address
arithmetic, not a memory access; the line is the CRYPTOGAMS
flag-neutral spelling of a stack allocation and nothing ever
dereferences below esp. Spelled it "sub esp, $60" instead: no flag
consumer lives between the allocation and the next flag-setting
instruction at any of the three sites, so the forms are equivalent -
and the recurring build noise is gone.
@Xor-el Xor-el merged commit ad5febf into refactor/simd-facade-backend Jul 13, 2026
12 checks passed
@Xor-el Xor-el deleted the refactor/normalization branch July 13, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant