diff options
| author | Wladimir J. van der Laan <[email protected]> | 2020-04-22 15:07:16 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2020-04-22 15:09:19 +0200 |
| commit | ce4e1f0282c6a622e8252f06028f1da416a79e23 (patch) | |
| tree | 79522d5117216cfd8182b595de6366b0af5d4ce9 /src/script/script_error.cpp | |
| parent | Merge #18410: Docs: Improve commenting for coins.cpp|h (diff) | |
| parent | Avoid non-trivial global constants in SHA-NI code (diff) | |
| download | discoin-ce4e1f0282c6a622e8252f06028f1da416a79e23.tar.xz discoin-ce4e1f0282c6a622e8252f06028f1da416a79e23.zip | |
Merge #18553: Avoid non-trivial global constants in SHA-NI code
850847309458f43fc7ce6c13fa08c86e1cae042a Avoid non-trivial global constants in SHA-NI code (Pieter Wuille)
Pull request description:
This is a potential solution for #18456.
It seems that the compiler cannot turn `_mm_set_epi64x(<constant>,<constnant>)` into a constant itself, and thus emits a global initializer for the `MASK`, `INIT0`, and `INIT1` global constants in the sha-ni SHA256 implementation.
Change this by turning them into dumb byte arrays, loading them into an SSE variable whenever needed.
Tested on a SHA-NI capable machine. I do not observe any obvious performance impact (but this is hard to measure, it's already very fast...).
ACKs for top commit:
laanwj:
Code review ACK 850847309458f43fc7ce6c13fa08c86e1cae042a
elichai:
ACK 850847309458f43fc7ce6c13fa08c86e1cae042a
Tree-SHA512: 07049cf1a33624c22df2be48b814d5636c037b368861eb13ee073bdce2b7c902a56e96518218961f55a2a1631a40825ded6dbbc28d7fe0e7fec267d704e39112
Diffstat (limited to 'src/script/script_error.cpp')
0 files changed, 0 insertions, 0 deletions