hebasto
commented at 2:42 PM on November 16, 2023:
member
Fix the test for SSE4.1 intrinsics during build system configuration, which currently can be false positive, for example, when CXXFLAGS="-mno-sse4.1" provided.
This PR fixes the test by adding the _mm_blend_epi16 SSE4.1 function used in our codebase.
Guard sha_x86_shani.cpp code with ENABLE_SSE41 macro as it uses the _mm_blend_epi16 function from
the SSE4.1 instruction set.
It is possible that SHA-NI is enabled even when SSE4.1 is disabled, which causes compile errors in the master branch.
DrahtBot removed the label DrahtBot Guix build requested on Nov 17, 2023
fanquake
commented at 5:54 PM on November 23, 2023:
member
Concept ACK
luke-jr
commented at 1:12 AM on December 5, 2023:
member
Weak Concept NACK: We should probably still build the SSE4.1 code if the compiler supports it. The flag should only affect the rest of the codebase, so that the software will run on a system without SSE4.1 (but still use the optimised crypto on systems that have it).
hebasto
commented at 11:09 AM on December 5, 2023:
member
Weak Concept NACK: We should probably still build the SSE4.1 code if the compiler supports it.
This PR branch still builds the SSE4.1 code if the compiler supports it, no?
DrahtBot added the label CI failed on Jan 16, 2024
DrahtBot added the label Needs rebase on Jan 27, 2024
hebasto force-pushed on Feb 12, 2024
hebasto
commented at 2:27 PM on February 12, 2024:
member
Rebased.
DrahtBot removed the label Needs rebase on Feb 12, 2024
DrahtBot removed the label CI failed on Feb 12, 2024
fanquake
commented at 11:17 AM on March 5, 2024:
member
I think this could be rebased again, given the recent build system changes, and removal of the sse4 lib.
build: Fix test for SSE4.1 intrinsics
This change uses the `_mm_blend_epi16` SSE4.1 function used in our code
and fixes false-positive cases, for example, when CXXFLAGS="-mno-sse4.1"
provided.
6ec1ca7c85
crypto: Guard code with `ENABLE_SSE41` macro
The code in `sha_x86_shani.cpp` uses the `_mm_blend_epi16` function from
the SSE4.1 instruction set. However, it is possible that SHA-NI is
enabled even when SSE4.1 is disabled.
This changes avoid compilation errors in such a condition.
d440f13db0
hebasto force-pushed on Mar 5, 2024
hebasto
commented at 11:44 AM on March 5, 2024:
member
I think this could be rebased again, given the recent build system changes, and removal of the sse4 lib.
Sure! Rebased.
fanquake
commented at 4:19 PM on March 5, 2024:
member
@theuni probably interested here, given you might als be refactoring the define usage?
maflcko added the label DrahtBot Guix build requested on May 26, 2024
DrahtBot
commented at 6:18 PM on May 26, 2024:
contributor
<!--9cd9c72976c961c55c7acef8f6ba82cd-->
Guix builds (on x86_64) [untrusted test-only build, possibly unsafe, not for production use]
Now that I've found this PR, the mechanics of the two change-sets appear very similar, but @hebasto gates SHANI from the Makefile whereas I opted to gate in configure.ac. Not sure if either has any advantages, but I'm concept ACK here!
willcl-ark approved
willcl-ark
commented at 9:58 AM on July 2, 2024:
member
tACKd440f13db02c82c842000abe4fe4d0c721a4ad3b
These changes fix the issues correctly in my testing on Ubuntu.
I do slightly prefer how my changeset printed a configure-time warning message for the user that SHANI support would be disabled if SSE4.1 was not enabled, but overall prefer the approach of this fix.
DrahtBot requested review from laanwj on Jul 2, 2024
DrahtBot requested review from dergoegge on Jul 2, 2024
DrahtBot requested review from fanquake on Jul 2, 2024
maflcko added the label Build system on Jul 2, 2024
maflcko added the label Needs CMake port on Jul 2, 2024
DrahtBot added the label CI failed on Jul 14, 2024
DrahtBot removed the label CI failed on Jul 16, 2024
sipa
commented at 3:51 PM on July 16, 2024:
member
utACKd440f13db02c82c842000abe4fe4d0c721a4ad3b
theuni approved
theuni
commented at 3:48 PM on July 17, 2024:
member
utACKd440f13db02c82c842000abe4fe4d0c721a4ad3b
fanquake merged this on Jul 17, 2024
fanquake closed this on Jul 17, 2024
hebasto deleted the branch on Jul 17, 2024
hebasto
commented at 5:44 PM on July 18, 2024:
member
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2026-04-24 21:13 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me