Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable double-SHA256-for-64-byte code on 32-bit x86 #13393

Merged
merged 1 commit into from Jun 12, 2018

Conversation

Projects
None yet
5 participants
@sipa
Copy link
Member

sipa commented Jun 4, 2018

The SSE4 and AVX2 double-SHA256-for-64-byte input code from #13191 compiles fine on 32-bit x86 systems, but the autodetection logic in sha256.cpp doesn't enable it. Fix this.

Note that these instruction sets are only available on CPUs that support 64-bit mode as well, so it is only beneficial in the (perhaps unlikely) scenario where a 64-bit CPU is running a 32-bit Bitcoin Core binary.

@DrahtBot

This comment has been minimized.

Copy link
Contributor

DrahtBot commented Jun 5, 2018

Note to reviewers: This pull request conflicts with the following ones:
  • #13386 (SHA256 implementations based on Intel SHA Extensions by sipa)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@theuni

This comment has been minimized.

Copy link
Member

theuni commented Jun 5, 2018

utACK 57ba401. See #13386 (comment) though.

@laanwj

This comment has been minimized.

Copy link
Member

laanwj commented Jun 12, 2018

As we've discussed on IRC I'm skeptical about doing anything special for 32-bit x86 as architecture (besides basic support), but as the changes are minimal I don't have opposition to this either.

@sipa

This comment has been minimized.

Copy link
Member Author

sipa commented Jun 12, 2018

@laanwj Right; given that we're already compiling and linking the SSE4/AVX2 code for 32-bit but just not using them, this seems much preferable over the alternative (removing them from the build).

@laanwj

This comment has been minimized.

Copy link
Member

laanwj commented Jun 12, 2018

@sipa agree; utACK 57ba401

@laanwj laanwj merged commit 57ba401 into bitcoin:master Jun 12, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Jun 12, 2018

Merge #13393: Enable double-SHA256-for-64-byte code on 32-bit x86
57ba401 Enable double-SHA256-for-64-byte code on 32-bit x86 (Pieter Wuille)

Pull request description:

  The SSE4 and AVX2 double-SHA256-for-64-byte input code from #13191 compiles fine on 32-bit x86 systems, but the autodetection logic in sha256.cpp doesn't enable it. Fix this.

  Note that these instruction sets are only available on CPUs that support 64-bit mode as well, so it is only beneficial in the (perhaps unlikely) scenario where a 64-bit CPU is running a 32-bit Bitcoin Core binary.

Tree-SHA512: 39d5963c1ba8c33932549d5fe98bd184932689a40aeba95043eca31dd6824f566197c546b60905555eccaf407408a5f0f200247bb0907450d309b0a70b245102
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.