ARM32/Thumb2 ASM SHA-256: provide small code size option#9491
Merged
dgarske merged 1 commit intowolfSSL:masterfrom Dec 4, 2025
Merged
ARM32/Thumb2 ASM SHA-256: provide small code size option#9491dgarske merged 1 commit intowolfSSL:masterfrom
dgarske merged 1 commit intowolfSSL:masterfrom
Conversation
Contributor
Author
|
Code generated from PR: |
WOLFSSL_ARMASM_SHA256_SMALL for Thumb2 and ARM32 using base instructions compiles implementations that are smaller but slower.
5169bce to
bff29a8
Compare
Contributor
Author
|
retest this please generic: |
dgarske
approved these changes
Dec 4, 2025
Member
dgarske
left a comment
There was a problem hiding this comment.
Reduces SHA256 by 1,472 bytes on Cortex-M. Test results:
STM32L4 - Cortex-M4 at 80MHz
190936 836 3656 195428 2fb64 STM32L4.elf
SHA-256 800 KiB took 1.012 seconds, 790.514 KiB/s
WOLFSSL_ARMASM_SHA256_SMALL
189464 836 3656 193956 2f5a4 STM32L4.elf
SHA-256 750 KiB took 1.000 seconds, 750.000 KiB/s
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.
Description
WOLFSSL_ARMASM_SHA256_SMALL for Thumb2 and ARM32 using base instructions compiles implementations that are smaller but slower.
Fixes zd#20831
Testing
./configure --disable-shared LDFLAGS=--static --host=armv7m CC=arm-linux-gnueabi-gcc --enable-armasm
./configure --disable-shared LDFLAGS=--static --host=armv7m CC=arm-linux-gnueabi-gcc --enable-armasm=sha256-small
../configure --disable-shared LDFLAGS=--static --host=armv7m CC=arm-linux-gnueabi-gcc --enable-armasm=inline
./configure --disable-shared LDFLAGS=--static --host=armv7m CC=arm-linux-gnueabi-gcc --enable-armasm=inline,sha256-small
./configure --disable-shared LDFLAGS=--static --host=armv6 CC=arm-linux-gnueabi-gcc --enable-armasm
./configure --disable-shared LDFLAGS=--static --host=armv6 CC=arm-linux-gnueabi-gcc --enable-armasm=sha256-small
/configure --disable-shared LDFLAGS=--static --host=armv6 CC=arm-linux-gnueabi-gcc --enable-armasm=inline
./configure --disable-shared LDFLAGS=--static --host=armv6 CC=arm-linux-gnueabi-gcc --enable-armasm=inline,sha256-small
Checklist