Skip to content

sha2: remove macros from sha256/x86_sha#853

Merged
newpavlov merged 4 commits intomasterfrom
sha2/rm_macros
May 7, 2026
Merged

sha2: remove macros from sha256/x86_sha#853
newpavlov merged 4 commits intomasterfrom
sha2/rm_macros

Conversation

@newpavlov
Copy link
Copy Markdown
Member

Additionally, performs a minor refactoring.

@newpavlov
Copy link
Copy Markdown
Member Author

With enabled optimizations the new code compiles down to the exactly same assembly (old vs new).

Comment thread sha2/src/sha256.rs
target_feature = "sse4.1",
)))]
compile_error!("x86-sha backend requires sha, sse2, ssse3, sse4.1 target features");
compile_error!("x86-sha backend requires sha and sse4.1 target features");
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that sse4.1 implies ssse3, which implies sse3, which in turn (together with sha) implies sse2.

@newpavlov newpavlov merged commit 65a1694 into master May 7, 2026
29 checks passed
@newpavlov newpavlov deleted the sha2/rm_macros branch May 7, 2026 17:24
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.

2 participants