feat: add 32-bit assembly checksum backends (ARM, x86, RV32, MIPS32, PowerPC) #27
No reviewers
Labels
No labels
Clean up
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
core/libAPG!27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/arch32-asm"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds optimized scalar assembly implementations of the checksum backend
(CRC-32, MD5, SHA-256) for five 32-bit architectures, extending the existing
64-bit backends (x86-64, aarch64, riscv64, mips64) to 32-bit targets:
arch/arm/— ARM (AArch32 / ARMv7)arch/x86/— x86 (i386 / IA-32)arch/riscv32/— RISC-V (RV32)arch/mips/— MIPS32 (MIPS32r2)arch/powerpc/— PowerPC (32-bit)Each backend implements the ABI the C drivers already dispatch to
(
apg_<algo>_hw_supported/apg_<algo>_transform_hw/apg_crc32_update_hw)and is selected at build time in
meson.buildviahost_machine.cpu_family().Message words are assembled byte-wise (endian-independent) and symbol addressing
is position-independent, so the backends link cleanly into the shared library.
Type of Change
Related Issues
Checklist
Testing
For every target the library's own C checksum drivers were built against the new
assembly and the full CRC-32, MD5 and SHA-256 were computed over test vectors
(empty input, sub-block, exact block, multi-block, odd tails, all-byte-value
data), with digests compared byte-for-byte against independent reference values.
Verified under QEMU user-mode on
arm,i386,riscv32,mipsel, big-endianmips, andpowerpc(big-endian MIPS and PowerPC confirm endian independence).PIC-safety was checked by assembling each backend with
-fPICand linking ashared object with
-Wl,-z,text. Nativex86_64build and the existing testsuite continue to pass unchanged.
New
cross-*.txtfiles and CI coverage were added: anarch-asmjob thatassembles and PIC-links every 32-bit backend, plus a full
armhfcross job.Additional Notes
Base integer instructions only (no crypto extensions), matching the existing
mips64 backend;
-marchis raised only where encodings require it (armv7-afor
movw/movt,mips32r2forrotr).